├── .coveralls.yml ├── .gitignore ├── .jscsrc ├── test ├── .jshintrc ├── index.html └── tests.js ├── .travis.yml ├── CHANGELOG.md ├── .jshintrc ├── bower.json ├── package.json ├── dist └── dynamic-time-warping.min.js ├── LICENSE.md ├── CONTRIBUTING.md ├── CONDUCT.md ├── Gruntfile.js ├── README.md └── src └── dynamic-time-warping.js /.coveralls.yml: -------------------------------------------------------------------------------- 1 | src_dir: src -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /node_modules 3 | -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "jquery" 3 | } 4 | -------------------------------------------------------------------------------- /test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "qunit": true, 3 | "globals": { 4 | "DynamicTimeWarping": false 5 | }, 6 | "extends": "../.jshintrc" 7 | } 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | sudo: false 4 | 5 | node_js: 6 | - '0.10' 7 | 8 | before_script: 9 | - npm install -g grunt-cli 10 | 11 | script: 12 | - ./node_modules/.bin/grunt ci 13 | 14 | after_script: 15 | - ./node_modules/.bin/grunt coveralls 16 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ## [1.0.0] - 2016-07-20 6 | ### Added 7 | - Created class DynamicTimeWarping 8 | - Created function DynamicTimeWarping.getDistance 9 | - Created function DynamicTimeWarping.getPath 10 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "boss": true, 3 | "browser": true, 4 | "curly": true, 5 | "eqeqeq": true, 6 | "eqnull": true, 7 | "expr": true, 8 | "immed": true, 9 | "noarg": true, 10 | "node": true, 11 | "onevar": true, 12 | "predef" : [ 13 | "define" 14 | ], 15 | "globals": { 16 | "self": false 17 | }, 18 | "quotmark": "double", 19 | "smarttabs": true, 20 | "strict": true, 21 | "trailing": true, 22 | "undef": true, 23 | "unused": true 24 | } 25 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dynamic-time-warping", 3 | "version": "1.0.0", 4 | "description": "Dynamic time warping for Javascript", 5 | "main": "src/dynamic-time-warping.js", 6 | "authors": [ 7 | "Gordon Lesti " 8 | ], 9 | "license": "MIT", 10 | "keywords": [ 11 | "dynamic", 12 | "time", 13 | "warping" 14 | ], 15 | "homepage": "https://github.com/GordonLesti/dynamic-time-warping", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "test" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dynamic-time-warping Tests 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dynamic-time-warping", 3 | "version": "1.0.0", 4 | "description": "Dynamic time warping for Javascript", 5 | "main": "src/dynamic-time-warping.js", 6 | "scripts": { 7 | "test": "grunt test" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/GordonLesti/dynamic-time-warping.git" 12 | }, 13 | "keywords": [ 14 | "dynamic", 15 | "time", 16 | "warping" 17 | ], 18 | "author": "Gordon Lesti ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/GordonLesti/dynamic-time-warping/issues" 22 | }, 23 | "devDependencies": { 24 | "grunt": "^0.4.5", 25 | "grunt-cli": "^1.2.0", 26 | "grunt-contrib-connect": "^1.0.2", 27 | "grunt-contrib-jshint": "^1.0.0", 28 | "grunt-contrib-qunit": "^1.2.0", 29 | "grunt-contrib-uglify": "^2.0.0", 30 | "grunt-contrib-watch": "^1.0.0", 31 | "grunt-coveralls": "^1.0.1", 32 | "grunt-jscs": "^3.0.1", 33 | "grunt-jsonlint": "^1.1.0", 34 | "grunt-qunit-istanbul": "^0.6.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /dist/dynamic-time-warping.min.js: -------------------------------------------------------------------------------- 1 | /*! dynamic-time-warping v1.0.0 | MIT */ 2 | !function(){"use strict";function a(a,b,c){var d,e,f,g=a,h=b,i=c,j=function(){if(void 0!==d)return d;e=[];for(var a=0;a0?(c=Math.min(c,e[a-1][b]),b>0&&(c=Math.min(c,e[a-1][b-1]),c=Math.min(c,e[a][b-1]))):c=b>0?Math.min(c,e[a][b-1]):0,e[a][b]=c+i(g[a],h[b])}}return e[g.length-1][h.length-1]};this.getDistance=j;var k=function(){if(void 0!==f)return f;void 0===e&&j();var a=g.length-1,b=h.length-1;for(f=[[a,b]];a>0||b>0;)a>0?b>0?e[a-1][b] 4 | 5 | > Permission is hereby granted, free of charge, to any person obtaining a copy 6 | > of this software and associated documentation files (the "Software"), to deal 7 | > in the Software without restriction, including without limitation the rights 8 | > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | > copies of the Software, and to permit persons to whom the Software is 10 | > furnished to do so, subject to the following conditions: 11 | > 12 | > The above copyright notice and this permission notice shall be included in 13 | > all copies or substantial portions of the Software. 14 | > 15 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | > THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | We accept contributions via Pull Requests on [Github](https://github.com/GordonLesti/dynamic-time-warping). 6 | 7 | 8 | ## Pull Requests 9 | 10 | - **jQuery Coding Standard** 11 | 12 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 13 | 14 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 15 | 16 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 17 | 18 | - **Create feature branches** - Don't ask us to pull from your master branch. 19 | 20 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 21 | 22 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 23 | 24 | 25 | ## Running Tests 26 | 27 | ``` bash 28 | $ grunt 29 | ``` 30 | 31 | 32 | **Happy coding**! 33 | -------------------------------------------------------------------------------- /CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 4 | 5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. 6 | 7 | Examples of unacceptable behavior by participants include: 8 | 9 | * The use of sexualized language or imagery 10 | * Personal attacks 11 | * Trolling or insulting/derogatory comments 12 | * Public or private harassment 13 | * Publishing other's private information, such as physical or electronic addresses, without explicit permission 14 | * Other unethical or unprofessional conduct. 15 | 16 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. 17 | 18 | This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations. 19 | 20 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. 21 | 22 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) 23 | -------------------------------------------------------------------------------- /test/tests.js: -------------------------------------------------------------------------------- 1 | QUnit.test( "getDistance test", function( assert ) { 2 | "use strict"; 3 | var dtw1 = new DynamicTimeWarping( 4 | [ 83, 65, 80, 49, 87 ], 5 | [ 57, 99, 11, 75, 78 ], 6 | function( a, b ) { 7 | return Math.abs( a - b ); 8 | } 9 | ); 10 | assert.strictEqual( dtw1.getDistance(), 112 ); 11 | 12 | var dtw2 = new DynamicTimeWarping( 13 | [ 17, 72, 50, 9 ], 14 | [ 21, 43, 13, 23, 40 ], 15 | function( a, b ) { 16 | return Math.abs( a - b ); 17 | } 18 | ); 19 | assert.strictEqual( dtw2.getDistance(), 89 ); 20 | 21 | var dtw3 = new DynamicTimeWarping( 22 | [ 17, 72, 50, 9 ], 23 | [ 21, 43, 13, 23, 40 ], 24 | function( a, b ) { 25 | return Math.abs( a - b ); 26 | } 27 | ); 28 | assert.strictEqual( dtw3.getDistance(), 89 ); 29 | assert.strictEqual( dtw3.getDistance(), 89 ); 30 | } ); 31 | 32 | QUnit.test( "getPath test", function( assert ) { 33 | "use strict"; 34 | var dtw1 = new DynamicTimeWarping( 35 | [ 9, 93, 15, 19, 24 ], 36 | [ 31, 97, 81, 82, 39 ], 37 | function( a, b ) { 38 | return Math.abs( a - b ); 39 | } 40 | ); 41 | assert.strictEqual( dtw1.getDistance(), 108 ); 42 | assert.deepEqual( 43 | dtw1.getPath(), 44 | [ [ 0, 0 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ], [ 2, 4 ], [ 3, 4 ], [ 4, 4 ] ] 45 | ); 46 | assert.deepEqual( 47 | dtw1.getPath(), 48 | [ [ 0, 0 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ], [ 2, 4 ], [ 3, 4 ], [ 4, 4 ] ] 49 | ); 50 | 51 | var dtw2 = new DynamicTimeWarping( 52 | [ 83, 72, 52, 83 ], 53 | [ 19, 18, 77, 4, 14 ], 54 | function( a, b ) { 55 | return Math.abs( a - b ); 56 | } 57 | ); 58 | assert.deepEqual( dtw2.getPath(), [ [ 0, 0 ], [ 1, 1 ], [ 1, 2 ], [ 2, 3 ], [ 3, 4 ] ] ); 59 | 60 | var dtw3 = new DynamicTimeWarping( 61 | [ 49, 79, 19, 39, 80 ], 62 | [ 77, 14, 95, 6 ], 63 | function( a, b ) { 64 | return Math.abs( a - b ); 65 | } 66 | ); 67 | assert.deepEqual( 68 | dtw3.getPath(), 69 | [ [ 0, 0 ], [ 1, 0 ], [ 2, 1 ], [ 3, 1 ], [ 4, 2 ], [ 4, 3 ] ] 70 | ); 71 | } ); 72 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function( grunt ) { 2 | "use strict"; 3 | var key; 4 | 5 | grunt.initConfig( { 6 | pkg: grunt.file.readJSON( "package.json" ), 7 | qunit: { 8 | options: { 9 | timout: 30000, 10 | "--web-security": "no", 11 | coverage: { 12 | src: [ "src/dynamic-time-warping.js" ], 13 | instrumentedFiles: "temp/", 14 | htmlReport: "build/report/coverage", 15 | lcovReport: "build/report/lcov", 16 | linesThresholdPct: 0 17 | } 18 | }, 19 | all: "test/index.html" 20 | }, 21 | coveralls: { 22 | options: { 23 | force: true 24 | }, 25 | 26 | // jscs:disable requireCamelCaseOrUpperCaseIdentifiers 27 | 28 | main_target: { 29 | src: "build/report/lcov/lcov.info" 30 | } 31 | 32 | // jscs:enable requireCamelCaseOrUpperCaseIdentifiers 33 | }, 34 | jshint: { 35 | options: { 36 | jshintrc: true 37 | }, 38 | grunt: "Gruntfile.js", 39 | src: "src/**/*.js", 40 | tests: "test/**/*.js" 41 | }, 42 | jscs: { 43 | src: "src/*.js", 44 | gruntfile: "Gruntfile.js", 45 | tests: "test/*.js", 46 | options: { 47 | config: ".jscsrc" 48 | } 49 | }, 50 | jsonlint: { 51 | pkg: { 52 | src: [ 53 | "package.json" 54 | ] 55 | } 56 | }, 57 | uglify: { 58 | options: { 59 | banner: "/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> */\n" 60 | }, 61 | build: { 62 | src: "src/dynamic-time-warping.js", 63 | dest: "dist/dynamic-time-warping.min.js" 64 | } 65 | }, 66 | connect: { 67 | server: { 68 | options: { 69 | base: "", 70 | port: 9999 71 | } 72 | } 73 | }, 74 | watch: {} 75 | } ); 76 | 77 | for ( key in grunt.file.readJSON( "package.json" ).devDependencies ) { 78 | if ( key !== "grunt" && key.indexOf( "grunt" ) === 0 ) { 79 | grunt.loadNpmTasks( key ); 80 | } 81 | } 82 | 83 | grunt.registerTask( "default", [ "jshint", "jscs", "jsonlint", "qunit", "uglify" ] ); 84 | grunt.registerTask( "dev", [ "connect", "watch" ] ); 85 | grunt.registerTask( "saucelabs", [ "connect", "saucelabs-qunit" ] ); 86 | grunt.registerTask( "ci", [ "jshint", "jscs", "jsonlint", "qunit" ] ); 87 | }; 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dynamic-time-warping 2 | 3 | [![Latest Version on npm][ico-version]][link-npm] 4 | [![Software License][ico-license]](LICENSE.md) 5 | [![Build Status][ico-travis]][link-travis] 6 | [![Coverage Status][ico-coverall]][link-coveralls] 7 | [![Total Downloads][ico-downloads]][link-downloads] 8 | 9 | [Dynamic time warping](https://en.wikipedia.org/wiki/Dynamic_time_warping) for JavaScript. A simple usecase would be 10 | [Touch signature identification with JavaScript](https://gordonlesti.com/touch-signature-identification-with-javascript/) 11 | for example. 12 | 13 | ## Install 14 | 15 | Several quick start options are available: 16 | * [Download the latest release](https://github.com/GordonLesti/dynamic-time-warping/releases/latest). 17 | * Clone the repo: `git clone https://github.com/GordonLesti/dynamic-time-warping.git`. 18 | * Install with [npm](https://www.npmjs.com/): `npm install dynamic-time-warping`. 19 | * Install with [Bower](http://bower.io): `bower install dynamic-time-warping`. 20 | 21 | Include script (unless you are packaging scripts somehow else): 22 | 23 | ```html 24 | 25 | ``` 26 | 27 | The plugin can also be loaded as AMD or Node module. 28 | 29 | ## Usage 30 | 31 | ### Initialization 32 | 33 | `DynamicTimeWarping` needs two arrays containing objects of the the same type and function that calculates the distance 34 | between two objects and returns a float. 35 | 36 | ```javascript 37 | var ser1 = [ 9, 93, 15, 19, 24 ]; 38 | var ser2 = [ 31, 97, 81, 82, 39 ]; 39 | var distFunc = function( a, b ) { 40 | return Math.abs( a - b ); 41 | }; 42 | 43 | var dtw = new DynamicTimeWarping(ser1, ser2, distFunc); 44 | ``` 45 | 46 | ### getDistance 47 | 48 | Will return the distance of the dynamic time warping as float. 49 | 50 | ```javascript 51 | // 108 52 | var dist = dtw.getDistance(); 53 | ``` 54 | 55 | ### getPath 56 | 57 | Will return the path of the dynamic time warping as array of arrays with two integers. 58 | 59 | ```javascript 60 | // [ [ 0, 0 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ], [ 2, 4 ], [ 3, 4 ], [ 4, 4 ] ] 61 | var dist = dtw.getPath(); 62 | ``` 63 | 64 | ## Change log 65 | 66 | Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. 67 | 68 | ## Testing 69 | 70 | ``` bash 71 | $ grunt 72 | ``` 73 | 74 | ## Contributing 75 | 76 | Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details. 77 | 78 | ## Security 79 | 80 | If you discover any security related issues, please email info@gordonlesti.com instead of using the issue tracker. 81 | 82 | ## Credits 83 | 84 | - [Gordon Lesti][link-author] 85 | - [All Contributors][link-contributors] 86 | 87 | ## License 88 | 89 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 90 | 91 | [ico-version]: https://img.shields.io/npm/v/dynamic-time-warping.svg?style=flat-square 92 | [ico-license]: https://img.shields.io/github/license/GordonLesti/dynamic-time-warping.svg?style=flat-square 93 | [ico-travis]: https://img.shields.io/travis/GordonLesti/dynamic-time-warping/master.svg?style=flat-square 94 | [ico-coverall]: https://img.shields.io/coveralls/GordonLesti/dynamic-time-warping/master.svg?style=flat-square 95 | [ico-downloads]: https://img.shields.io/npm/dt/dynamic-time-warping.svg?style=flat-square 96 | 97 | [link-npm]: https://www.npmjs.com/package/dynamic-time-warping 98 | [link-travis]: https://travis-ci.org/GordonLesti/dynamic-time-warping 99 | [link-coveralls]: https://coveralls.io/r/GordonLesti/dynamic-time-warping 100 | [link-downloads]: https://www.npmjs.com/package/dynamic-time-warping 101 | [link-author]: https://gordonlesti.com/ 102 | [link-contributors]: ../../contributors 103 | -------------------------------------------------------------------------------- /src/dynamic-time-warping.js: -------------------------------------------------------------------------------- 1 | ( function() { 2 | "use strict"; 3 | function DynamicTimeWarping ( ts1, ts2, distanceFunction ) { 4 | var ser1 = ts1; 5 | var ser2 = ts2; 6 | var distFunc = distanceFunction; 7 | var distance; 8 | var matrix; 9 | var path; 10 | 11 | var getDistance = function() { 12 | if ( distance !== undefined ) { 13 | return distance; 14 | } 15 | matrix = []; 16 | for ( var i = 0; i < ser1.length; i++ ) { 17 | matrix[ i ] = []; 18 | for ( var j = 0; j < ser2.length; j++ ) { 19 | var cost = Infinity; 20 | if ( i > 0 ) { 21 | cost = Math.min( cost, matrix[ i - 1 ][ j ] ); 22 | if ( j > 0 ) { 23 | cost = Math.min( cost, matrix[ i - 1 ][ j - 1 ] ); 24 | cost = Math.min( cost, matrix[ i ][ j - 1 ] ); 25 | } 26 | } else { 27 | if ( j > 0 ) { 28 | cost = Math.min( cost, matrix[ i ][ j - 1 ] ); 29 | } else { 30 | cost = 0; 31 | } 32 | } 33 | matrix[ i ][ j ] = cost + distFunc( ser1[ i ], ser2[ j ] ); 34 | } 35 | } 36 | 37 | return matrix[ ser1.length - 1 ][ ser2.length - 1 ]; 38 | }; 39 | 40 | this.getDistance = getDistance; 41 | 42 | var getPath = function() { 43 | if ( path !== undefined ) { 44 | return path; 45 | } 46 | if ( matrix === undefined ) { 47 | getDistance(); 48 | } 49 | var i = ser1.length - 1; 50 | var j = ser2.length - 1; 51 | path = [ [ i, j ] ]; 52 | while ( i > 0 || j > 0 ) { 53 | if ( i > 0 ) { 54 | if ( j > 0 ) { 55 | if ( matrix[ i - 1 ][ j ] < matrix[ i - 1 ][ j - 1 ] ) { 56 | if ( matrix[ i - 1 ][ j ] < matrix[ i ][ j - 1 ] ) { 57 | path.push( [ i - 1, j ] ); 58 | i--; 59 | } else { 60 | path.push( [ i, j - 1 ] ); 61 | j--; 62 | } 63 | } else { 64 | if ( matrix[ i - 1 ][ j - 1 ] < matrix[ i ][ j - 1 ] ) { 65 | path.push( [ i - 1, j - 1 ] ); 66 | i--; 67 | j--; 68 | } else { 69 | path.push( [ i, j - 1 ] ); 70 | j--; 71 | } 72 | } 73 | } else { 74 | path.push( [ i - 1, j ] ); 75 | i--; 76 | } 77 | } else { 78 | path.push( [ i, j - 1 ] ); 79 | j--; 80 | } 81 | } 82 | path = path.reverse(); 83 | 84 | return path; 85 | }; 86 | 87 | this.getPath = getPath; 88 | } 89 | 90 | var root = typeof self === "object" && self.self === self && self || 91 | typeof global === "object" && global.global === global && global || 92 | this; 93 | 94 | if ( typeof exports !== "undefined" && !exports.nodeType ) { 95 | if ( typeof module !== "undefined" && !module.nodeType && module.exports ) { 96 | exports = module.exports = DynamicTimeWarping; 97 | } 98 | exports.DynamicTimeWarping = DynamicTimeWarping; 99 | } else { 100 | root.DynamicTimeWarping = DynamicTimeWarping; 101 | } 102 | 103 | if ( typeof define === "function" && define.amd ) { 104 | define( "dynamic-time-warping", [], function() { 105 | return DynamicTimeWarping; 106 | } ); 107 | } 108 | }() ); 109 | --------------------------------------------------------------------------------