bulutfon_dashboard 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +66 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.eot +0 -0
  6. data/app/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.svg +164 -0
  7. data/app/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.ttf +0 -0
  8. data/app/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.woff +0 -0
  9. data/app/assets/images/bulutfon_dashboard/screenshot-step-1.png +0 -0
  10. data/app/assets/images/bulutfon_dashboard/screenshot-step-2.png +0 -0
  11. data/app/assets/images/bulutfon_dashboard/screenshot-step-3.png +0 -0
  12. data/app/assets/javascripts/bulutfon_dashboard/application.js +13 -0
  13. data/app/assets/javascripts/bulutfon_dashboard/audiojs/audiojs-player-graphics.gif +0 -0
  14. data/app/assets/javascripts/bulutfon_dashboard/audiojs/audiojs.js.erb +695 -0
  15. data/app/assets/javascripts/bulutfon_dashboard/audiojs/audiojs.swf +0 -0
  16. data/app/assets/javascripts/bulutfon_dashboard/cdrs.js +19 -0
  17. data/app/assets/stylesheets/bulutfon_dashboard/application.css +15 -0
  18. data/app/assets/stylesheets/bulutfon_dashboard/bulutfon-fonts.css.sass +114 -0
  19. data/app/controllers/bulutfon_dashboard/application_controller.rb +28 -0
  20. data/app/controllers/bulutfon_dashboard/base_controller.rb +4 -0
  21. data/app/controllers/bulutfon_dashboard/bulutfon_users_controller.rb +59 -0
  22. data/app/controllers/bulutfon_dashboard/cdrs_controller.rb +27 -0
  23. data/app/controllers/bulutfon_dashboard/dashboards_controller.rb +15 -0
  24. data/app/helpers/bulutfon_dashboard/application_helper.rb +4 -0
  25. data/app/helpers/bulutfon_dashboard/cdrs_helper.rb +145 -0
  26. data/app/models/bulutfon_dashboard/api_user.rb +19 -0
  27. data/app/models/bulutfon_dashboard/bulutfon_user.rb +21 -0
  28. data/app/models/bulutfon_dashboard/cdr.rb +54 -0
  29. data/app/views/bulutfon_dashboard/bulutfon_users/_form.html.haml +24 -0
  30. data/app/views/bulutfon_dashboard/bulutfon_users/edit.html.haml +3 -0
  31. data/app/views/bulutfon_dashboard/bulutfon_users/new.html.haml +3 -0
  32. data/app/views/bulutfon_dashboard/bulutfon_users/show.html.haml +93 -0
  33. data/app/views/bulutfon_dashboard/cdrs/_blank.html.haml +14 -0
  34. data/app/views/bulutfon_dashboard/cdrs/_cdr.html.haml +12 -0
  35. data/app/views/bulutfon_dashboard/cdrs/_list.html.haml +24 -0
  36. data/app/views/bulutfon_dashboard/cdrs/index.html.haml +5 -0
  37. data/app/views/bulutfon_dashboard/cdrs/show.html.haml +82 -0
  38. data/app/views/bulutfon_dashboard/dashboards/index.html.haml +53 -0
  39. data/app/views/layouts/bulutfon_dashboard/application.html.erb +14 -0
  40. data/config/initializers/simple_form.rb +165 -0
  41. data/config/initializers/simple_form_bootstrap.rb +149 -0
  42. data/config/locales/models.tr.yml +201 -0
  43. data/config/locales/simple_form.en.yml +31 -0
  44. data/config/routes.rb +5 -0
  45. data/lib/bulutfon_dashboard.rb +5 -0
  46. data/lib/bulutfon_dashboard/engine.rb +6 -0
  47. data/lib/bulutfon_dashboard/version.rb +3 -0
  48. data/lib/generators/bulutfon_dashboard/assets_generator.rb +57 -0
  49. data/lib/generators/bulutfon_dashboard/controllers_generator.rb +24 -0
  50. data/lib/generators/bulutfon_dashboard/helpers_generator.rb +24 -0
  51. data/lib/generators/bulutfon_dashboard/initializers_generator.rb +14 -0
  52. data/lib/generators/bulutfon_dashboard/install/install_generator.rb +17 -0
  53. data/lib/generators/bulutfon_dashboard/migrations_generator.rb +24 -0
  54. data/lib/generators/bulutfon_dashboard/views_generator.rb +55 -0
  55. data/lib/generators/templates/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.eot +0 -0
  56. data/lib/generators/templates/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.svg +164 -0
  57. data/lib/generators/templates/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.ttf +0 -0
  58. data/lib/generators/templates/assets/fonts/fontcustom_d9192ef5338659432e550700796cc26b.woff +0 -0
  59. data/lib/generators/templates/assets/stylesheets/bulutfon-fonts.css.sass +114 -0
  60. data/lib/generators/templates/controllers/base_controller.rb +9 -0
  61. data/lib/generators/templates/helpers/application_helper.rb +5 -0
  62. data/lib/generators/templates/initializers/bulutfon_dashboard.rb +2 -0
  63. data/lib/generators/templates/migrations/create_bulutfon_dashboard_bulutfon_users.rb +14 -0
  64. data/lib/tasks/bulutfon_dashboard_tasks.rake +4 -0
  65. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  66. data/test/bulutfon_dashboard_test.rb +7 -0
  67. data/test/controllers/bulutfon_dashboard/bulutfon_users_controller_test.rb +13 -0
  68. data/test/controllers/bulutfon_dashboard/cdrs_controller_test.rb +13 -0
  69. data/test/controllers/bulutfon_dashboard/dashboards_controller_test.rb +13 -0
  70. data/test/dummy/README.rdoc +28 -0
  71. data/test/dummy/Rakefile +6 -0
  72. data/test/dummy/app/assets/javascripts/application.js +13 -0
  73. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  74. data/test/dummy/app/controllers/application_controller.rb +5 -0
  75. data/test/dummy/app/helpers/application_helper.rb +2 -0
  76. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  77. data/test/dummy/bin/bundle +3 -0
  78. data/test/dummy/bin/rails +4 -0
  79. data/test/dummy/bin/rake +4 -0
  80. data/test/dummy/bin/setup +29 -0
  81. data/test/dummy/config.ru +4 -0
  82. data/test/dummy/config/application.rb +26 -0
  83. data/test/dummy/config/boot.rb +5 -0
  84. data/test/dummy/config/database.yml +25 -0
  85. data/test/dummy/config/environment.rb +5 -0
  86. data/test/dummy/config/environments/development.rb +41 -0
  87. data/test/dummy/config/environments/production.rb +79 -0
  88. data/test/dummy/config/environments/test.rb +42 -0
  89. data/test/dummy/config/initializers/assets.rb +11 -0
  90. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  92. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  93. data/test/dummy/config/initializers/inflections.rb +16 -0
  94. data/test/dummy/config/initializers/mime_types.rb +4 -0
  95. data/test/dummy/config/initializers/session_store.rb +3 -0
  96. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  97. data/test/dummy/config/locales/en.yml +23 -0
  98. data/test/dummy/config/routes.rb +4 -0
  99. data/test/dummy/config/secrets.yml +22 -0
  100. data/test/dummy/public/404.html +67 -0
  101. data/test/dummy/public/422.html +67 -0
  102. data/test/dummy/public/500.html +66 -0
  103. data/test/dummy/public/favicon.ico +0 -0
  104. data/test/fixtures/bulutfon_dashboard/bulutfon_users.yml +11 -0
  105. data/test/integration/navigation_test.rb +8 -0
  106. data/test/models/bulutfon_dashboard/bulutfon_user_test.rb +9 -0
  107. data/test/test_helper.rb +21 -0
  108. metadata +221 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 59559562451ce827fa9c6cff6bf84c62147d1363
4
+ data.tar.gz: ea6860e14a166df4f505e5acdb5a17972e94e4bf
5
+ SHA512:
6
+ metadata.gz: e04988f02da897940c314cf5f34a28a45adb3685f0e8f8d8fcdc4755b02086e1e749424dc124975cafee46d89c7009057089633bf72155557bc18309d890a1cf
7
+ data.tar.gz: 738bed76a283885251adc75738846f6d657f5af67fb5c3f72c1fbc7c77a70011b7075806cad1884c90c6196089e705e089304e014e8e2422f5bb0b287d938c24
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # BulutfonDashboardRails
2
+
3
+ Bulutfon rails dashboard mountable engine.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'bulutfon_dashboard', git: 'https://github.com/lab2023/bulutfon-dashboard-rails.git', branch: 'master'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```ruby
16
+ $ bundle install
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Run required commands in terminal:
22
+
23
+ ```ruby
24
+ rails generate bulutfon_dashboard:assets
25
+ rails generate bulutfon_dashboard:initializers
26
+ rails generate bulutfon_dashboard:helpers
27
+ rails generate bulutfon_dashboard:migrations
28
+ rails generate bulutfon_dashboard:controllers
29
+ ```
30
+
31
+ If you want to change views run this command:
32
+
33
+ ```bash
34
+ rails generate bulutfon_dashboard:views
35
+ ```
36
+
37
+ Add this line to your application's config/routes.rb:
38
+
39
+ ```ruby
40
+ mount BulutfonDashboard::Engine => '/bulutfon', as: 'bulutfon_dashboard'
41
+ ```
42
+
43
+ Access root path like this:
44
+
45
+ ```ruby
46
+ bulutfon_dashboard.root_path
47
+ ```
48
+ ## Contributing
49
+
50
+ 1. Fork it
51
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
52
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
53
+ 4. Push to the branch (`git push origin my-new-feature`)
54
+ 5. Create new Pull Request
55
+
56
+ ## Credits
57
+
58
+ ![lab2023](http://lab2023.com/assets/images/named-logo.png)
59
+
60
+ - BulutfonDashboardRails is maintained and funded by [lab2023 - information technologies](http://lab2023.com/)
61
+ - Thank you to all the [contributors!](../../graphs/contributors)
62
+ - The names and logos for lab2023 are trademarks of lab2023, inc.
63
+
64
+ ## License
65
+
66
+ Copyright © 2013-2015 [lab2023 - information technologies](http://lab2023.com)
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'BulutfonDashboard'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('lib/**/*.rb')
14
+ end
15
+
16
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
17
+ load 'rails/tasks/engine.rake'
18
+
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+
23
+
24
+ Bundler::GemHelper.install_tasks
25
+
26
+ require 'rake/testtask'
27
+
28
+ Rake::TestTask.new(:test) do |t|
29
+ t.libs << 'lib'
30
+ t.libs << 'test'
31
+ t.pattern = 'test/**/*_test.rb'
32
+ t.verbose = false
33
+ end
34
+
35
+
36
+ task default: :test
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <!--
4
+ 2015-2-10: Created.
5
+ -->
6
+ <svg xmlns="http://www.w3.org/2000/svg">
7
+ <metadata>
8
+ Created by FontForge 20120731 at Tue Feb 10 10:48:58 2015
9
+ By turku,,,
10
+ Created by turku,,, with FontForge 2.0 (http://fontforge.sf.net)
11
+ </metadata>
12
+ <defs>
13
+ <font id="fontcustom" horiz-adv-x="512" >
14
+ <font-face
15
+ font-family="fontcustom"
16
+ font-weight="500"
17
+ font-stretch="normal"
18
+ units-per-em="512"
19
+ panose-1="2 0 6 3 0 0 0 0 0 0"
20
+ ascent="448"
21
+ descent="-64"
22
+ bbox="-0.137665 -64.166 1056.43 451.583"
23
+ underline-thickness="25.6"
24
+ underline-position="-51.2"
25
+ unicode-range="U+0020-F149"
26
+ />
27
+ <missing-glyph />
28
+ <glyph glyph-name="space" unicode=" " horiz-adv-x="200"
29
+ />
30
+ <glyph glyph-name="uniF13D" unicode="&#xf13d;"
31
+ d="M173.419 256.413v-9.91016v9.91016zM431.071 49.9609c1.65137 0 1.65137 0 0 0c1.65137 0 1.65137 0 0 0zM439.329 43.3545v0v0zM442.632 36.748c1.65234 -1.65137 1.65234 -1.65137 0 0c1.65234 -1.65137 1.65234 -1.65137 0 0zM160.206 165.574
32
+ c4.95508 -4.95508 9.91016 -9.91016 13.2129 -14.8643c-3.30273 4.9541 -8.25781 9.90918 -13.2129 14.8643zM391.433 78.0391l-34.6846 23.1221c-3.30273 1.65137 -4.9541 3.30371 -8.25781 4.95508c3.30371 -1.65137 4.95508 -3.30371 8.25781 -4.95508zM308.852 109.419
33
+ c-11.5615 -1.65137 -23.123 -8.25781 -31.3809 -18.167l-16.5156 -18.168l16.5156 18.168c8.25879 9.90918 19.8193 14.8643 31.3809 18.167zM110.658 352.206c-1.65137 3.30371 -4.95508 4.95508 -6.60645 8.25879v0c6.60645 -1.65234 16.5156 -1.65234 21.4707 -4.95508
34
+ c-4.95508 -3.30371 -9.90918 -4.95508 -13.2129 -6.60645zM257.651 353.858c3.30371 0 18.168 -8.25879 19.8193 -8.25879c-6.60645 -3.30273 -16.5156 -3.30273 -24.7744 -3.30273c-8.25781 0 -28.0771 -3.30371 -21.4707 -9.91016
35
+ c1.65137 -1.65137 9.91016 -14.8643 -14.8643 -9.90918c-6.60645 1.65137 -37.9873 19.8193 -47.8965 21.4707c-3.30371 1.65137 -8.25879 1.65137 -11.5615 0c-1.65137 3.30371 -1.65137 4.95508 1.65137 4.95508c1.65137 1.65137 18.168 9.90918 21.4707 11.5615
36
+ c9.91016 3.30273 19.8193 4.9541 29.7295 4.9541c16.5156 1.65234 33.0322 -8.25781 47.8965 -11.5605zM320.413 111.071v0h9.90918h-9.90918zM1053.73 122.632c4.95508 -6.60645 3.30371 -18.167 -6.60645 -28.0771c-8.25781 -9.90918 -19.8193 -11.5615 -29.7285 -4.95508
37
+ c-16.5166 11.5615 -33.0322 19.8193 -54.5029 16.5166c-13.2129 -1.65137 -23.123 -6.60645 -34.6846 -13.2129c-6.60645 -3.30371 -13.2129 -4.95508 -21.4707 -4.95508c-9.90918 1.65137 -18.168 3.30371 -28.0771 3.30371
38
+ c-9.91016 0 -19.8193 -1.65234 -29.7295 -4.95508c-33.0322 -9.91016 -67.7158 -28.0771 -104.052 -23.123c-14.8643 1.65234 -28.0771 4.95508 -42.9414 0c-8.25781 -3.30273 -18.168 -6.60645 -28.0771 -8.25781c-16.5166 -1.65137 -31.3809 -1.65137 -46.2451 3.30371
39
+ c0 -11.5615 -1.65234 -23.123 -9.91016 -33.0322c-3.30273 -3.30371 -3.30273 -9.91016 -6.60645 -14.8652c-1.65137 -4.9541 -6.60645 -8.25781 -11.5615 -9.90918c-19.8193 -8.25781 -41.29 13.2129 -33.0322 33.0322c4.95508 11.5615 14.8652 14.8643 24.7744 21.4707
40
+ c1.65137 9.91016 -1.65137 13.2129 -8.25781 9.91016c-1.65137 -1.65234 -3.30371 -1.65234 -4.95508 -3.30371c-3.30273 -1.65137 -6.60645 -4.95508 -9.90918 -6.60645c-4.95508 -3.30273 -11.5615 -3.30273 -18.168 -3.30273
41
+ c-19.8193 1.65137 -34.6836 1.65137 -52.8516 -6.60645c-16.5166 -6.60645 -31.3809 -14.8652 -47.8975 -18.168h-3.30273c0 3.30273 -1.65137 6.60645 -3.30371 8.25781v1.65137c-1.65137 1.65234 -3.30273 4.95508 -4.9541 6.60645v0
42
+ c-1.65234 3.30371 -3.30371 4.95508 -4.95508 6.60645l-1.65137 1.65234c-1.65234 1.65137 -4.95508 3.30273 -6.60645 4.9541l-34.6846 23.123l-34.6836 23.1221c-3.30273 1.65234 -4.95508 3.30371 -8.25781 4.95508c-4.95508 1.65137 -11.5615 4.95508 -18.168 4.95508
43
+ h-9.90918v0v0c-3.30371 0 -8.25879 0 -11.5615 -1.65137c-11.5615 -3.30371 -23.123 -9.91016 -31.3809 -18.168l-16.5166 -18.168c-16.5156 13.2129 -31.3799 26.4258 -47.8965 39.6387c-4.95508 4.95508 -9.90918 9.91016 -14.8643 14.8643
44
+ c-8.25781 8.25879 -16.5166 14.8652 -23.123 23.123c-3.30273 4.95508 -8.25781 9.90918 -13.2129 14.8643c-8.25781 6.60645 -14.8643 14.8643 -21.4707 23.123l16.5166 18.167c6.60645 8.25879 13.2129 18.168 14.8643 28.0781
45
+ c1.65137 3.30273 1.65137 6.60645 1.65137 9.90918v9.91016c0 3.30273 0 6.60645 -1.65137 9.90918c-1.65137 6.60645 -4.95508 13.2129 -9.91016 19.8193l-47.8965 62.7617c4.95508 3.30273 8.25781 4.95508 13.2129 6.60645
46
+ c-4.95508 3.30273 -14.8643 3.30273 -21.4707 4.95508v0c-3.30371 1.65137 -6.60645 4.9541 -9.91016 6.60645v0c-1.65137 0 -1.65137 1.65137 -1.65137 1.65137c-6.60645 26.4258 34.6836 16.5156 37.9873 34.6836c1.65137 18.168 0 39.6387 21.4707 44.5938
47
+ c23.123 3.30273 39.6387 -9.91016 56.1553 -23.123c49.5479 -39.6387 113.961 -74.3223 173.419 -33.0322c11.5615 8.25879 23.123 16.5166 37.9873 18.168c13.2129 1.65137 26.4258 3.30371 39.6387 3.30371c33.0322 1.65137 67.7158 3.30273 100.748 4.9541
48
+ c4.95508 0 6.60645 -4.9541 3.30371 -8.25781c-14.8643 -14.8643 28.0771 -23.1221 34.6836 -29.7285c8.25781 -6.60645 13.2129 -11.5615 24.7744 -13.2129c4.95508 0 9.90918 -1.65234 13.2129 -3.30371c6.60645 -6.60645 11.5605 -11.5615 19.8193 -14.8643
49
+ c1.65137 -1.65137 3.30273 -1.65137 4.9541 -1.65137c1.65234 0 4.95508 -1.65234 6.60742 -1.65234c6.60547 -1.65137 13.2129 -1.65137 21.4707 -1.65137c19.8193 -1.65137 37.9873 -1.65137 56.1543 -1.65137c21.4717 1.65137 42.9424 3.30273 64.4131 9.90918
50
+ c16.5166 4.95508 31.3809 11.5615 47.8975 18.168c31.3799 11.5615 64.4121 21.4707 97.4443 9.91016c14.8652 -4.95508 28.0781 -16.5166 34.6846 -29.7295c1.65137 -4.95508 4.9541 -11.5615 4.9541 -18.168c0 -9.90918 -3.30273 -18.167 -1.65137 -26.4258
51
+ c3.30371 -23.1221 33.0322 1.65234 44.5938 -9.90918c8.25781 -8.25781 8.25781 -18.168 3.30273 -28.0771c-3.30273 -8.25879 -19.8193 -9.91016 -21.4707 -18.168s1.65234 -16.5166 6.60645 -23.123c1.65137 -1.65137 3.30371 -3.30273 4.95508 -6.60645v-1.65137
52
+ c8.25781 -14.8643 6.60645 -28.0771 4.95508 -44.5938c-1.65137 -8.25781 -3.30371 -21.4707 0 -29.7285c3.30273 -9.91016 11.5615 -13.2129 18.167 -21.4717zM254.349 343.948c8.25781 0 18.167 0 26.4258 3.30371c-3.30371 0 -18.168 6.60645 -23.123 8.25781
53
+ c-16.5156 3.30273 -31.3809 13.2129 -47.8965 11.5615c-9.91016 0 -19.8193 -1.65234 -29.7295 -4.95508c-1.65137 -1.65137 -19.8193 -11.5615 -21.4707 -11.5615c-3.30273 -1.65137 -3.30273 -3.30273 0 -4.95508c3.30371 0 8.25781 1.65234 11.5615 0
54
+ c9.90918 -1.65137 41.29 -19.8193 47.8965 -21.4707c24.7744 -6.60645 16.5166 8.25781 14.8643 9.91016c-6.60645 6.60645 13.2129 9.90918 21.4717 9.90918zM320.413 111.071v0c-3.30371 0 -8.25781 0 -11.5615 -1.65234c3.30371 1.65234 6.60645 1.65234 11.5615 1.65234
55
+ zM173.419 246.503c0 -4.9541 0 -8.25781 -1.65137 -9.90918c1.65137 3.30273 1.65137 6.60645 1.65137 9.90918zM94.1416 367.071c3.30371 -1.65234 6.60645 -4.95508 9.91016 -6.60645c-3.30371 1.65137 -6.60645 4.9541 -9.91016 6.60645zM161.858 286.142
56
+ c4.9541 -6.60645 8.25781 -13.2129 9.90918 -19.8193c-3.30273 6.60645 -6.60645 13.2129 -9.90918 19.8193l-49.5488 62.7617v0zM138.735 188.697l16.5166 18.167c6.60645 8.25879 13.2129 18.168 14.8643 28.0781c-1.65137 -9.91016 -6.60645 -19.8193 -14.8643 -28.0781
57
+ l-16.5166 -18.167c8.25781 -8.25879 14.8643 -16.5166 21.4707 -23.123c-8.25781 6.60645 -14.8643 14.8643 -21.4707 23.123zM447.587 26.8389v0c-1.65137 3.30273 -1.65137 4.95508 -3.30273 8.25781c1.65137 -3.30273 1.65137 -4.95508 3.30273 -8.25781z
58
+ M196.542 127.587l-23.123 23.123c8.25879 -8.25879 14.8652 -16.5166 23.123 -23.123l14.8643 -14.8643zM431.071 49.9609c-1.65234 1.65234 -4.95508 3.30371 -6.60645 4.95508l-34.6846 23.123l34.6846 -23.123c3.30273 0 4.9541 -3.30273 6.60645 -4.95508z
59
+ M439.329 43.3545c1.65137 -1.65137 3.30273 -4.9541 4.95508 -6.60645c-1.65234 1.65234 -3.30371 4.95508 -4.95508 6.60645zM432.723 49.9609c1.65137 -3.30273 4.95508 -4.9541 4.95508 -6.60645c-1.65234 3.30371 -3.30371 4.95508 -4.95508 6.60645zM0 281.188
60
+ l56.1553 56.1543c8.25781 8.25781 19.8193 6.60645 26.4258 -3.30273l49.5479 -66.0645c6.60645 -8.25879 4.95508 -21.4717 -3.30273 -29.7295l-41.291 -41.29c19.8193 -28.0781 46.2451 -59.458 79.2773 -92.4902s64.4131 -57.8066 92.4902 -79.2773l41.291 41.29
61
+ c8.25781 8.25781 21.4707 8.25781 29.7285 3.30273l66.0645 -47.8965c8.25879 -6.60645 11.5615 -19.8193 3.30371 -26.4258l-54.5029 -59.458s-97.4453 -8.25781 -226.271 118.916c-127.174 128.826 -118.916 226.271 -118.916 226.271z" />
62
+ <glyph glyph-name="uniF13F" unicode="&#xf13f;"
63
+ d="M1.59961 374.4l71.2002 71.1992c9.60059 9.60059 25.6006 7.2002 33.6006 -4l61.5996 -84.7998c8 -11.2002 5.59961 -28 -4 -37.5996l-52 -52c25.5996 -36 57.5996 -75.2002 100 -117.601c42.4004 -42.3994 81.5996 -73.5996 117.6 -100l52 52
64
+ c9.60059 9.60059 27.2002 11.2002 38.4004 3.2002l84 -60c11.2002 -8 14.4004 -24 4 -34.3994l-71.2002 -71.2002s-123.2 -11.2002 -284.8 150.399c-160.8 160.801 -150.4 284.801 -150.4 284.801zM445.6 384c0 -1.59961 -0.799805 -2.40039 -1.59961 -3.2002
65
+ l-66.4004 -5.59961c-1.59961 0 -1.59961 0.799805 -1.59961 0.799805l12.7998 20c-9.59961 6.40039 -20 9.59961 -31.2002 9.59961c-20 0 -38.3994 -10.3994 -49.5996 -28c-12 -17.5996 -15.2002 -42.3994 -8 -64l1.59961 -4
66
+ c0 -1.59961 -0.799805 -2.39941 -1.59961 -2.39941h-30.4004c-0.799805 0 -1.59961 0.799805 -1.59961 1.59961l-0.799805 2.40039c-7.2002 30.3994 -2.40039 62.3994 13.5996 87.2002c17.6006 26.3994 45.6006 42.3994 76 42.3994
67
+ c17.6006 0 35.2002 -4.7998 50.4004 -15.2002l13.5996 20.8008c0.799805 1.59961 1.60059 1.59961 2.40039 0zM283.2 276.8c0 0.799805 0.799805 2.40039 2.39941 4l66.4004 5.60059c0.799805 0.799805 1.59961 -0.800781 0.799805 -1.60059l-12.7998 -20
68
+ c9.59961 -6.39941 20 -9.59961 31.2002 -9.59961c20 0 38.3994 10.3994 49.5996 28c12 17.5996 15.2002 42.3994 8 64l-1.59961 4c0 1.59961 0.799805 2.39941 1.59961 2.39941h30.4004c0.799805 0 1.59961 -0.799805 1.59961 -1.59961l0.799805 -2.40039
69
+ c7.2002 -30.3994 2.40039 -62.3994 -13.5996 -87.1992c-17.5996 -26.4004 -45.5996 -42.4004 -76 -42.4004c-17.5996 0 -35.2002 4.7998 -50.4004 15.2002l-13.5996 -20.7998c-0.799805 -1.60059 -1.59961 -1.60059 -2.40039 0z" />
70
+ <glyph glyph-name="uniF13C" unicode="&#xf13c;"
71
+ d="M213.6 113.6c3.2002 2.40039 2.40039 8 -1.59961 10.4004l-25.5996 18.4004c-4 2.39941 -8.80078 2.39941 -12 -0.800781l-16 -16c-11.2002 8 -23.2002 17.6006 -36 30.4004c-12.8008 12.7998 -22.4004 24.7998 -30.4004 36l16 16c3.2002 2.40039 4 8 1.59961 11.2002
72
+ l-18.3994 25.5996c-2.40039 3.2002 -7.2002 4 -10.4004 0.799805l-21.5996 -21.5996s-4 -37.5996 45.5996 -87.2002c49.6006 -48.7998 87.2002 -45.5996 87.2002 -45.5996zM464.8 153.6c1.60059 2.40039 2.40039 6.40039 2.40039 10.4004
73
+ c-2.40039 3.2002 -5.60059 4 -7.2002 8s-0.799805 8.7998 0 12c0.799805 5.59961 1.59961 11.2002 -1.59961 16.7998v0c-0.800781 1.60059 -0.800781 2.40039 -1.60059 3.2002c-1.59961 2.40039 -3.2002 5.59961 -2.39941 8.7998c0.799805 3.2002 7.19922 4 8.7998 7.2002
74
+ c1.59961 4 1.59961 8 -1.60059 11.2002c-4 4.7998 -16 -4.7998 -16.7998 4c0 3.2002 0.799805 6.39941 0.799805 9.59961c-0.799805 2.40039 -1.59961 4.7998 -2.39941 7.2002c-2.40039 5.59961 -7.2002 10.4004 -12.7998 12c-12.8008 4.7998 -25.6006 0.799805 -37.6006 -4
75
+ c-6.39941 -2.40039 -12 -5.59961 -18.3994 -7.2002c-8 -3.2002 -16.8008 -4 -24.8008 -4c-7.19922 -0.799805 -14.3994 0 -21.5996 0c-3.2002 0 -5.59961 0.799805 -8.7998 0.799805c-0.799805 0.800781 -1.60059 0.800781 -2.40039 0.800781
76
+ c0 0.799805 -0.799805 0.799805 -1.59961 0.799805c-3.2002 1.59961 -5.60059 3.2002 -8 5.59961c-1.60059 1.60059 -4 2.40039 -5.60059 2.40039c-4 0.799805 -6.39941 2.39941 -9.59961 4.7998c-2.40039 2.40039 -19.2002 5.59961 -13.5996 11.2002
77
+ c0.799805 0.799805 0 3.2002 -1.60059 3.2002c-12.7998 0 -25.5996 -0.800781 -38.3994 -1.60059c-5.60059 -0.799805 -10.4004 -0.799805 -15.2002 -1.59961c-5.60059 -1.60059 -9.60059 -4 -14.4004 -7.2002c-23.2002 -15.2002 -48 -2.40039 -67.2002 12.7998
78
+ c-6.39941 4.7998 -12.7998 10.4004 -21.5996 8.7998c-9.59961 -1.59961 -8.7998 -9.59961 -9.59961 -16.7998c-1.60059 -7.2002 -17.6006 -4 -14.4004 -13.5996v-0.799805v0c0.799805 -0.800781 2.40039 -1.60059 3.2002 -2.40039
79
+ c1.59961 -0.799805 2.39941 -2.40039 3.2002 -3.2002l0.799805 -0.799805l18.3994 -24.7998c1.60059 -2.40039 3.2002 -4.7998 4 -7.2002c0 -1.59961 0.800781 -2.40039 0.800781 -4v-4s-0.800781 -2.40039 -0.800781 -4c-0.799805 -4 -2.39941 -8 -5.59961 -11.2002
80
+ l-6.40039 -7.2002c2.40039 -3.19922 5.60059 -5.59961 8 -8.7998c1.60059 -1.59961 4 -4 5.60059 -5.59961c3.2002 -3.2002 5.59961 -5.60059 8.7998 -8.7998c2.40039 -1.60059 4 -4 6.40039 -5.60059c5.59961 -5.59961 12 -10.3994 18.3994 -15.2002l6.40039 7.2002
81
+ c3.2002 3.2002 7.2002 5.60059 12 6.40039c1.59961 0.799805 3.2002 0.799805 4.7998 0.799805h4c2.40039 0 4.7998 -0.799805 7.2002 -1.59961c0.799805 0 2.39941 -0.800781 3.2002 -1.60059l12.7998 -8.7998l12.7998 -8.7998
82
+ c0.799805 -0.799805 1.59961 -1.60059 2.40039 -2.40039l0.799805 -0.799805c0.799805 -0.799805 1.59961 -1.59961 2.39941 -2.40039v0c0.800781 -0.799805 0.800781 -1.59961 1.60059 -2.39941v-0.799805c0.799805 -1.60059 1.59961 -2.40039 1.59961 -3.2002v0h1.60059
83
+ c6.39941 1.59961 12 4.7998 18.3994 7.2002c7.2002 3.19922 12.7998 3.19922 20 2.39941c2.40039 0 4.7998 0 7.2002 1.60059c1.59961 0 2.40039 1.59961 4 2.39941c0.799805 0 1.59961 0.799805 2.40039 0.799805c3.19922 1.60059 4 0 3.19922 -4
84
+ c-4 -3.19922 -8 -4 -9.59961 -8.7998c-3.2002 -8 4.7998 -16.7998 12.7998 -12.7998c1.60059 0.799805 4 2.40039 4.7998 4c0.800781 1.59961 0.800781 4 2.40039 5.59961c2.40039 3.2002 4 8 3.2002 12.8008c5.59961 -2.40039 11.2002 -2.40039 17.5996 -1.60059
85
+ c4 0 8 1.60059 11.2002 3.2002c5.59961 2.40039 11.2002 0.799805 16.7998 0c13.6006 -2.40039 27.2002 4.7998 40 8.7998c3.2002 1.60059 7.2002 2.40039 11.2002 2.40039c4 0.799805 7.2002 -0.799805 11.2002 -0.799805c3.2002 0 5.59961 0.799805 8 2.39941
86
+ c4.7998 3.2002 8.7998 4.7998 13.5996 5.60059c8 0.799805 14.4004 -1.60059 20.7998 -6.40039c4 -3.2002 8 -1.59961 11.2002 1.59961zM416.8 448c52.7998 0 95.2002 -42.4004 95.2002 -95.2002v-321.6c0 -52.7998 -42.4004 -95.2002 -95.2002 -95.2002h-321.6
87
+ c-52.7998 0 -95.2002 42.4004 -95.2002 95.2002v321.6c0 52.7998 42.4004 95.2002 95.2002 95.2002h321.6zM159.2 249.6c-4 0 -12.7998 -1.59961 -10.4004 -4.7998c0.799805 -0.799805 4.7998 -7.2002 -7.2002 -4.7998c-3.19922 0.799805 -17.5996 8.7998 -22.3994 9.59961
88
+ h-5.60059c-0.799805 0.800781 -0.799805 1.60059 0.800781 2.40039c0.799805 0 8.7998 4.7998 9.59961 4.7998c4 1.60059 8.7998 2.40039 13.5996 2.40039c7.2002 0 14.4004 -4 21.6006 -5.60059c2.39941 -0.799805 8.7998 -4 10.3994 -3.19922
89
+ c-2.39941 -0.800781 -6.39941 0 -10.3994 -0.800781z" />
90
+ <glyph glyph-name="uniF143" unicode="&#xf143;"
91
+ d="M0 208.853l44.9404 44.9404c6.41992 6.41992 16.0498 4.81543 20.8652 -2.40723l38.5205 -52.9658c4.81445 -7.22266 4.0127 -17.6553 -2.40723 -23.2725l-32.9033 -32.9033c16.0498 -22.4697 36.1133 -47.3477 62.5957 -73.8301
92
+ c26.4824 -26.4834 50.5576 -46.5459 73.8311 -62.5957l32.9023 32.9023c6.41992 6.41992 16.8525 7.22266 24.0752 1.60547l52.9658 -37.7178c7.22266 -4.81543 8.82715 -15.248 2.40723 -21.668l-44.9404 -44.9404s-77.8428 -6.41992 -178.156 93.8936
93
+ c-101.116 101.116 -94.6963 178.959 -94.6963 178.959zM302.546 379.787c0 -14.4453 12.0371 -27.2852 12.8398 -41.7305c-14.4453 3.20996 -35.3105 3.20996 -48.1504 12.0371c2.40723 8.02539 12.8398 12.8408 12.0371 20.8652
94
+ c2.4082 -3.20996 6.41992 -4.81445 10.4326 -4.0127c4.0127 4.0127 7.22266 10.4326 12.8408 12.8408zM513.605 232.125c0 -101.918 -70.6211 -187.786 -165.317 -209.454c-3.20996 7.22266 -8.82715 13.6426 -15.2471 18.458l-52.9658 37.7178
95
+ c-8.02539 5.61719 -17.6553 8.82715 -28.0879 8.82715c-13.6426 0 -26.4824 -5.61719 -35.3105 -14.4453l-13.6426 -13.6426c-16.8525 13.6426 -32.9023 28.0879 -48.9531 44.1387c-16.0498 16.0498 -30.4951 32.0996 -44.1377 48.9521l13.6426 13.6426
96
+ c16.8525 16.8535 19.2607 43.3359 5.61816 62.5957l-38.5205 52.9658c-0.802734 0.802734 -1.60547 2.40723 -2.4082 3.20996c23.2734 93.8936 108.339 162.909 209.455 162.909c119.573 0 215.875 -97.1035 215.875 -215.875zM415.699 86.0693
97
+ c16.8525 16.8525 35.3105 34.5078 39.3232 58.583c-7.22266 6.41992 -13.6436 2.40723 -20.8652 0.801758c-11.2354 13.6436 -32.1006 8.02539 -44.9404 18.458c-16.8535 -0.802734 -35.3105 0.802734 -52.1631 -4.81445
98
+ c-5.61816 -1.60547 -27.2852 -20.0635 -34.5078 -8.82812c-2.4082 4.0127 0 14.4453 -0.802734 19.2598c-4.0127 7.22266 -12.8398 4.81543 -19.2607 8.82812c0.802734 8.02539 6.4209 19.2598 -3.20996 24.0752c-12.0371 2.40723 -12.8398 -4.81543 -21.667 -8.02539
99
+ c-20.0635 -6.41992 -21.668 29.6934 -7.22266 35.3105c10.4326 -1.60449 21.667 0.802734 32.0996 -2.40723c11.2354 -4.0127 12.0381 -16.0508 27.2861 -16.0508c9.62988 8.02539 4.01172 16.8535 4.81445 27.2861c3.20996 8.02441 11.2354 12.8398 14.4453 20.0625
100
+ c1.60449 4.81445 0.802734 13.6426 2.40723 19.2598c3.20996 11.2354 12.0381 16.8525 22.4707 21.668c-1.60547 5.61719 0 9.62988 4.0127 13.6426c12.8398 0 24.0752 -4.81543 33.7051 6.41992c-10.4326 24.0752 -38.5205 33.7051 -60.1885 45.7432
101
+ c1.60547 5.61719 0.802734 11.2354 0.802734 16.8525c12.8398 -4.81543 26.4824 -6.41992 40.125 -5.61719l0.802734 2.40723c5.61719 31.2979 -34.5078 25.6807 -51.3604 39.3232l-0.802734 -0.802734h-12.0371l-0.802734 0.802734
102
+ c-12.0381 -9.63086 -26.4824 -12.0381 -41.7305 -14.4453c-7.22266 -0.802734 -14.4453 -2.4082 -21.668 -4.0127c-7.22266 -1.60547 -12.0371 2.40723 -19.2598 2.40723c-14.4453 0 -27.2852 -10.4326 -37.7178 -20.0625
103
+ c-9.62988 -8.82715 3.20996 -11.2354 1.60449 -19.2598c-1.60449 -18.458 -11.2354 -34.5078 -17.6553 -51.3613c-3.20996 -8.82715 -5.61719 -18.457 -6.41992 -28.0869c-0.802734 -9.63086 4.0127 -17.6553 7.22266 -26.4834
104
+ c4.0127 -12.8398 -0.802734 -20.8652 9.62988 -31.2979c9.63086 -9.62988 18.458 -17.6553 16.8525 -32.9023c15.248 -16.0508 36.916 -23.2734 56.9785 -31.2979c5.61719 -2.40723 12.0381 -4.81543 18.458 -8.02539c3.20996 -4.81445 6.41992 -8.82715 10.4326 -12.0371
105
+ c8.02441 -7.22266 18.457 -9.63086 28.8896 -8.02539c6.41992 -12.8398 -15.2471 -25.6807 -12.8398 -41.7305c8.02539 -12.0381 17.6553 -26.4824 32.9033 -29.6924c0 -6.4209 -6.4209 -9.63086 -0.802734 -16.8535c28.8896 -0.801758 63.3975 20.0635 82.6582 40.9287z
106
+ " />
107
+ <glyph glyph-name="uniF148" unicode="&#xf148;"
108
+ d="M236.8 71.2002c0 14.9329 7.4668 22.3994 22.4004 22.3994c14.933 0 22.3994 -7.46647 22.3994 -22.3994c0 -14.9336 -7.46646 -22.4004 -22.3994 -22.4004c-14.9336 0 -22.4004 7.4668 -22.4004 22.4004zM196 103.2v189.6h126.4v-189.6h-126.4zM416.8 448
109
+ c26.3999 0 48.8666 -9.26672 67.4 -27.8002s27.8002 -41.0001 27.8002 -67.4v-321.6c0 -26.3999 -9.26672 -48.8666 -27.8002 -67.4s-41.0001 -27.8002 -67.4 -27.8002h-321.6c-26.3999 0 -48.8666 9.26672 -67.4 27.8002s-27.8002 41.0001 -27.8002 67.4v321.6
110
+ c0 26.3999 9.26672 48.8666 27.8002 67.4s41.0001 27.8002 67.4 27.8002h321.6zM348 71.2002v240c0 8.7998 -3.13339 16.3331 -9.40015 22.5999s-13.8 9.40015 -22.5999 9.40015h-113.6c-8.80019 0 -16.3336 -3.13336 -22.6001 -9.40005
111
+ c-6.26659 -6.26669 -9.39987 -13.8 -9.39987 -22.5999v-240c0 -8.80029 3.13326 -16.3337 9.39978 -22.6002s13.7999 -9.39978 22.6002 -9.39978h113.6c8.79993 0 16.3333 3.13329 22.5999 9.39986s9.40005 13.8 9.40005 22.6001zM196 103.2v189.6h126.4v-189.6h-126.4z" />
112
+ <glyph glyph-name="uniF145" unicode="&#xf145;"
113
+ d="M0 370.4l71.2002 71.1992c9.59961 9.60059 25.5996 7.2002 33.5996 -4l60.7998 -84.7998c8 -11.2002 5.60059 -28 -4 -37.5996l-52 -52c25.6006 -36 57.6006 -75.2002 100 -117.601c42.4004 -41.5996 81.6006 -73.5996 117.601 -99.1992l52 52
114
+ c9.59961 9.59961 27.2002 11.1992 38.3994 3.19922l84 -60c11.2002 -8 14.4004 -24 4 -34.3994l-71.1992 -71.2002s-123.2 -11.2002 -284.801 150.4c-160 160.8 -149.6 284 -149.6 284zM418.4 248.8l-32.8008 32.7998l-53.5996 -53.5996
115
+ c-1.59961 -1.59961 -4.7998 -1.59961 -6.40039 0l-31.1992 31.2002c-1.60059 1.59961 -1.60059 4.7998 0 6.39941l53.5996 53.6006l-32.7998 32.7998c-1.60059 1.59961 -0.799805 3.2002 1.59961 4l116.8 15.2002c2.40039 0 4 -1.60059 4 -4l-15.1992 -116.8
116
+ c-0.800781 -3.2002 -2.40039 -4 -4 -1.60059z" />
117
+ <glyph glyph-name="uniF142" unicode="&#xf142;"
118
+ d="M371.2 162.4c4.7998 0.799805 8.7998 3.19922 7.2002 -1.60059c-1.60059 -16.7998 -13.6006 -28.7998 -24.8008 -39.2002c-12 -13.5996 -35.1992 -27.1992 -53.5996 -26.3994c-3.2002 4.7998 0.799805 7.2002 0.799805 11.2002
119
+ c-9.59961 1.59961 -16 11.1992 -20.7998 19.1992c-1.59961 10.4004 12.7998 18.4004 8.7998 27.2002c-6.39941 -0.799805 -12.7998 0.799805 -18.3994 4.7998c-2.40039 2.40039 -4.80078 4.80078 -6.40039 8c-4 2.40039 -8 4 -12 5.60059
120
+ c-12.7998 4.7998 -27.2002 9.59961 -36.7998 20c0.799805 9.59961 -4.7998 15.2002 -11.2002 21.5996c-6.40039 7.2002 -3.2002 12 -6.40039 20.7998c-2.39941 5.60059 -5.59961 10.4004 -4.7998 16.8008c0 6.39941 1.60059 12.7998 4 18.3994
121
+ c4 11.2002 10.4004 21.6006 11.2002 33.6006c0.799805 5.59961 -7.2002 7.19922 -0.799805 12.7998c7.2002 6.39941 15.2002 13.5996 24.7998 13.5996c5.59961 0 8 -2.39941 12.7998 -1.59961s9.60059 1.59961 14.4004 2.39941
122
+ c9.59961 1.60059 19.2002 3.2002 27.2002 9.60059l0.799805 -0.799805h8l0.799805 0.799805c11.2002 -8.7998 36.7998 -5.60059 33.5996 -25.6006v-1.59961c-9.59961 -0.799805 -17.5996 0 -26.3994 3.2002c0 -3.2002 0.799805 -7.2002 0 -10.4004
123
+ c13.5996 -8 32 -13.5996 39.2002 -29.5996c-5.60059 -7.2002 -13.6006 -4 -21.6006 -4c-2.39941 -2.40039 -3.2002 -4.7998 -2.39941 -8.7998c-6.40039 -3.2002 -12 -7.2002 -14.4004 -14.4004c-0.799805 -4 0 -9.59961 -1.59961 -12.7998
124
+ c-2.40039 -4.7998 -7.2002 -8 -9.60059 -12.7998c-0.799805 -6.40039 3.2002 -12 -3.2002 -17.6006c-9.59961 0 -10.3994 8 -17.5996 10.4004c-6.40039 2.39941 -13.5996 0 -20.7998 1.59961c-8.7998 -3.2002 -8 -27.2002 4.7998 -22.3994
125
+ c6.40039 1.59961 6.40039 6.39941 14.4004 4.7998c6.39941 -3.2002 3.19922 -10.4004 2.39941 -15.2002c4 -2.40039 10.4004 -0.799805 12.7998 -5.59961c0.800781 -4 -1.59961 -10.4004 0.800781 -12.8008c4.7998 -7.19922 18.3994 4 22.3994 5.60059
126
+ c10.4004 4 22.4004 2.39941 33.6006 3.2002c8 -7.2002 21.5996 -3.2002 28.7998 -12zM270.4 308.8c0 -5.59961 -6.40039 -8.7998 -7.2002 -13.5996c8 -5.60059 21.5996 -5.60059 31.2002 -8c-0.800781 9.59961 -8.80078 17.5996 -8.80078 27.2002
127
+ c-3.19922 -1.60059 -5.59961 -5.60059 -8 -8c-3.19922 -0.800781 -5.59961 0 -7.19922 2.39941zM416.8 448c52.7998 0 95.2002 -42.4004 95.2002 -95.2002v-321.6c0 -52.7998 -42.4004 -95.2002 -95.2002 -95.2002h-321.6c-52.7998 0 -95.2002 42.4004 -95.2002 95.2002
128
+ v321.6c0 52.7998 42.4004 95.2002 95.2002 95.2002h321.6zM295.2 54.4004c4 4 3.2002 10.3994 -1.60059 14.3994l-34.3994 24.7998c-4.7998 3.2002 -12 2.40039 -16 -1.59961l-21.6006 -21.5996c-15.1992 10.3994 -30.3994 23.1992 -48 40.7998
129
+ c-17.5996 17.5996 -30.3994 33.5996 -40.7998 48l21.6006 21.5996c4 4 4.7998 10.4004 1.59961 15.2002l-24.7998 34.4004c-3.2002 4.7998 -9.60059 5.59961 -13.6006 1.59961l-28.7998 -28.7998s-4 -50.4004 61.6006 -116c65.5996 -66.4004 116 -61.6006 116 -61.6006z
130
+ M315.2 80.7998c61.5996 15.2002 108 70.4004 108.8 136.8c0 77.6006 -63.2002 140.801 -140.8 140.801c-65.6006 0 -120.8 -45.6006 -136 -106.4c0.799805 -0.799805 0.799805 -1.59961 1.59961 -2.40039l24.7998 -34.3994c8.80078 -12 7.2002 -29.6006 -4 -40.7998
131
+ l-8.7998 -8.80078c8.7998 -11.1992 18.4004 -21.5996 28.7998 -32c10.4004 -10.3994 20.8008 -20 32 -28.7998l8.80078 8.7998c5.59961 6.40039 13.5996 9.60059 22.3994 9.60059c6.40039 0 12.7998 -1.60059 18.4004 -5.60059l34.3994 -24.7998
132
+ c4 -3.2002 7.2002 -7.2002 9.60059 -12z" />
133
+ <glyph glyph-name="uniF140" unicode="&#xf140;"
134
+ d="M416.8 448c52.7998 0 95.2002 -42.4004 95.2002 -95.2002v-321.6c0 -52.7998 -42.4004 -95.2002 -95.2002 -95.2002h-321.6c-52.7998 0 -95.2002 42.4004 -95.2002 95.2002v321.6c0 52.7998 42.4004 95.2002 95.2002 95.2002h321.6zM314.4 320.8l-12 -85.5996
135
+ c0 -2.40039 1.59961 -3.2002 3.19922 -3.2002l86.4004 11.2002c1.59961 0 2.40039 0.799805 0.799805 2.39941l-24 24l40 40c1.60059 1.60059 1.60059 3.2002 0 4.80078l-23.2002 23.1992c-1.59961 1.60059 -3.19922 1.60059 -4.7998 0l-40 -40l-24 24
136
+ c-0.799805 1.60059 -2.39941 0.800781 -2.39941 -0.799805zM449.6 55.2002c7.2002 7.2002 4.80078 19.2002 -3.19922 24.7998l-62.4004 44c-8.7998 5.59961 -21.5996 4.7998 -28.7998 -2.40039l-38.4004 -38.3994c-27.2002 19.2002 -56 42.3994 -87.2002 73.5996
137
+ c-31.1992 31.2002 -54.3994 60.7998 -73.5996 87.2002l38.4004 38.4004c7.19922 7.19922 8.7998 20 3.19922 28l-44.7998 63.1992c-5.59961 8.80078 -17.5996 10.4004 -24.7998 3.2002l-52.7998 -52.7998s-8 -91.2002 111.2 -210.4
138
+ c119.199 -119.199 210.399 -111.199 210.399 -111.199z" />
139
+ <glyph glyph-name="uniF149" unicode="&#xf149;"
140
+ d="M42.4727 42.4141v320.175h213.294v-320.175h-213.294zM245.499 448c29.4033 0 53.2061 -23.8027 52.7402 -53.207v-405.586c0 -29.4043 -23.8037 -53.207 -53.207 -53.207h-191.825c-29.4043 0 -53.207 23.8027 -53.207 53.207v405.586
141
+ c0 29.4043 23.8027 53.207 53.207 53.207h192.292zM149.353 -48.5977c21.0029 0 37.8047 16.8018 37.8047 37.8047s-16.8018 37.8047 -37.8047 37.8047s-37.8047 -16.8018 -37.8047 -37.8047s16.8018 -37.8047 37.8047 -37.8047zM42.4727 42.4141h213.294v320.175h-213.294
142
+ v-320.175z" />
143
+ <glyph glyph-name="uniF144" unicode="&#xf144;"
144
+ d="M416.8 448c52.7998 0 95.2002 -42.4004 95.2002 -95.2002v-321.6c0 -52.7998 -42.4004 -95.2002 -95.2002 -95.2002h-321.6c-52.7998 0 -95.2002 42.4004 -95.2002 95.2002v321.6c0 52.7998 42.4004 95.2002 95.2002 95.2002h321.6zM292.8 248.8
145
+ c-1.59961 -1.59961 -1.59961 -4 0.799805 -5.59961l23.2002 -23.2002c1.60059 -1.59961 3.2002 -1.59961 4.7998 0l40 40l24 -24c0.800781 -1.59961 2.40039 -0.799805 2.40039 0.799805l11.2002 86.4004c0 2.39941 -1.60059 3.2002 -3.2002 3.2002l-86.4004 -11.2002
146
+ c-1.59961 0 -2.39941 -0.799805 -0.799805 -2.40039l24 -24zM449.6 55.2002c7.2002 7.2002 4.80078 19.2002 -3.19922 24.7998l-62.4004 44c-8.7998 5.59961 -21.5996 4.7998 -28.7998 -2.40039l-38.4004 -38.3994c-27.2002 19.2002 -56 42.3994 -87.2002 73.5996
147
+ c-31.1992 31.2002 -54.3994 60.7998 -73.5996 87.2002l38.4004 38.4004c7.19922 7.19922 8.7998 20 3.19922 28l-44.7998 63.1992c-5.59961 8.80078 -17.5996 10.4004 -24.7998 3.2002l-52.7998 -52.7998s-8 -91.2002 111.2 -210.4
148
+ c119.199 -119.199 210.399 -111.199 210.399 -111.199z" />
149
+ <glyph glyph-name="uniF141" unicode="&#xf141;"
150
+ d="M0 370.4l71.2002 71.1992c9.59961 9.60059 25.5996 7.2002 33.5996 -4l60.7998 -84.7998c8 -11.2002 5.60059 -28 -4 -37.5996l-52 -52c25.6006 -36 57.6006 -75.2002 100 -117.601c42.4004 -41.5996 81.6006 -73.5996 117.601 -99.1992l52 52
151
+ c9.59961 9.59961 27.2002 11.1992 38.3994 3.19922l84 -60c11.2002 -8 14.4004 -24 4 -34.3994l-71.1992 -71.2002s-123.2 -11.2002 -284.801 150.4c-160 160.8 -149.6 284 -149.6 284zM327.2 368.8l32.7998 -32.7998l53.5996 53.5996
152
+ c1.60059 1.60059 4.80078 1.60059 6.40039 0l31.2002 -31.1992c1.59961 -1.60059 1.59961 -4.80078 0 -6.40039l-53.6006 -53.5996l32.8008 -32.8008c1.59961 -1.59961 0.799805 -3.19922 -1.60059 -4l-116.8 -15.1992c-2.40039 0 -4 1.59961 -4 4l15.2002 116.8
153
+ c0.799805 2.39941 2.39941 3.2002 4 1.59961z" />
154
+ <glyph glyph-name="uniF13E" unicode="&#xf13e;"
155
+ d="M416.8 448c52.7998 0 95.2002 -42.4004 95.2002 -95.2002v-321.6c0 -52.7998 -42.4004 -95.2002 -95.2002 -95.2002h-321.6c-52.7998 0 -95.2002 42.4004 -95.2002 95.2002v321.6c0 52.7998 42.4004 95.2002 95.2002 95.2002h321.6zM416 311.2l-1.59961 1.59961h-22.4004
156
+ c-0.799805 0 -0.799805 -0.799805 -0.799805 -1.59961l0.799805 -3.2002c5.59961 -16.7998 3.2002 -34.4004 -5.59961 -48c-8.80078 -13.5996 -21.6006 -20.7998 -36.8008 -20.7998c-8 0 -16 2.39941 -23.1992 7.2002l9.59961 14.3994
157
+ c0.799805 0.799805 0 1.60059 -0.799805 1.60059l-48.7998 -4.80078c-1.60059 0 -1.60059 -0.799805 -1.60059 -1.59961l16.7998 -46.4004c0 -0.799805 0.800781 -0.799805 1.60059 0l9.59961 15.2002c12 -7.2002 24.7998 -11.2002 37.6006 -11.2002
158
+ c22.3994 0 43.1992 11.2002 56 31.2002c12 18.4004 16 42.4004 10.3994 64.7998zM283.2 345.6c-12 -19.1992 -16 -42.3994 -10.4004 -65.5996l0.799805 -1.59961c0.800781 -0.800781 0.800781 -0.800781 1.60059 -0.800781h22.3994
159
+ c0.800781 0 0.800781 0.800781 0.800781 1.60059l-0.800781 3.2002c-5.59961 16.7998 -3.19922 34.3994 5.60059 48c8.7998 13.5996 21.5996 20.7998 36.7998 20.7998c8 0 16 -2.40039 23.2002 -7.2002l-9.60059 -14.4004c-0.799805 -0.799805 0 -1.59961 0.800781 -1.59961
160
+ l48.7998 4.7998c1.59961 0 1.59961 0.799805 1.59961 1.60059l-16.7998 46.3994c0 0.799805 -0.799805 0.799805 -1.59961 0l-9.60059 -15.2002c-12 7.2002 -24.7998 11.2002 -37.5996 11.2002c-22.4004 0 -43.2002 -11.2002 -56 -31.2002zM449.6 55.2002
161
+ c7.2002 7.2002 4.80078 19.2002 -3.19922 24.7998l-62.4004 44c-8.7998 5.59961 -21.5996 4.7998 -28.7998 -2.40039l-38.4004 -38.3994c-27.2002 19.2002 -56 42.3994 -87.2002 73.5996c-31.1992 31.2002 -54.3994 60.7998 -73.5996 87.2002l38.4004 38.4004
162
+ c7.19922 7.19922 8.7998 20 3.19922 28l-44.7998 63.1992c-5.59961 8.80078 -17.5996 10.4004 -24.7998 3.2002l-52.7998 -52.7998s-8 -91.2002 111.2 -210.4c119.199 -119.199 210.399 -111.199 210.399 -111.199z" />
163
+ </font>
164
+ </defs></svg>
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,695 @@
1
+ // A cross-browser javascript shim for html5 audio
2
+ (function(audiojs, audiojsInstance, container) {
3
+ // Use the path to the audio.js file to create relative paths to the swf and player graphics
4
+ // Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
5
+ var path = (function() {
6
+ var re = new RegExp('audio(\.min)?\.js.*'),
7
+ scripts = document.getElementsByTagName('script');
8
+ for (var i = 0, ii = scripts.length; i < ii; i++) {
9
+ var path = scripts[i].getAttribute('src');
10
+ if(re.test(path)) return path.replace(re, '');
11
+ }
12
+ })();
13
+
14
+ // ##The audiojs interface
15
+ // This is the global object which provides an interface for creating new `audiojs` instances.
16
+ // It also stores all of the construction helper methods and variables.
17
+ container[audiojs] = {
18
+ instanceCount: 0,
19
+ instances: {},
20
+ // The markup for the swf. It is injected into the page if there is not support for the `<audio>` element. The `$n`s are placeholders.
21
+ // `$1` The name of the flash movie
22
+ // `$2` The path to the swf
23
+ // `$3` Cache invalidation
24
+ flashSource: '\
25
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="$1" width="1" height="1" name="$1" style="position: absolute; left: -1px;"> \
26
+ <param name="movie" value="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3"> \
27
+ <param name="allowscriptaccess" value="always"> \
28
+ <embed name="$1" src="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess="always"> \
29
+ </object>',
30
+
31
+ // ### The main settings object
32
+ // Where all the default settings are stored. Each of these variables and methods can be overwritten by the user-provided `options` object.
33
+ settings: {
34
+ autoplay: false,
35
+ loop: false,
36
+ preload: true,
37
+ imageLocation: '<%= asset_path 'audiojs-player-graphics.gif' %>',
38
+ swfLocation: '<%= asset_path 'audiojs.swf' %>',
39
+ useFlash: (function() {
40
+ var a = document.createElement('audio');
41
+ return !(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
42
+ })(),
43
+ hasFlash: (function() {
44
+ if (navigator.plugins && navigator.plugins.length && navigator.plugins['Shockwave Flash']) {
45
+ return true;
46
+ } else if (navigator.mimeTypes && navigator.mimeTypes.length) {
47
+ var mimeType = navigator.mimeTypes['application/x-shockwave-flash'];
48
+ return mimeType && mimeType.enabledPlugin;
49
+ } else {
50
+ try {
51
+ var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
52
+ return true;
53
+ } catch (e) {}
54
+ }
55
+ return false;
56
+ })(),
57
+ // The default markup and classes for creating the player:
58
+ createPlayer: {
59
+ markup: '\
60
+ <div class="play-pause"> \
61
+ <p class="play"></p> \
62
+ <p class="pause"></p> \
63
+ <p class="loading"></p> \
64
+ <p class="error"></p> \
65
+ </div> \
66
+ <div class="scrubber"> \
67
+ <div class="progress"></div> \
68
+ <div class="loaded"></div> \
69
+ </div> \
70
+ <div class="time"> \
71
+ <em class="played">00:00</em>/<strong class="duration">00:00</strong> \
72
+ </div> \
73
+ <div class="error-message"></div>',
74
+ playPauseClass: 'play-pause',
75
+ scrubberClass: 'scrubber',
76
+ progressClass: 'progress',
77
+ loaderClass: 'loaded',
78
+ timeClass: 'time',
79
+ durationClass: 'duration',
80
+ playedClass: 'played',
81
+ errorMessageClass: 'error-message',
82
+ playingClass: 'playing',
83
+ loadingClass: 'loading',
84
+ errorClass: 'error'
85
+ },
86
+ // The css used by the default player. This is is dynamically injected into a `<style>` tag in the top of the head.
87
+ css: '\
88
+ .audiojs audio { position: absolute; left: -1px; } \
89
+ .audiojs { width: 415px; height: 20px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px; } \
90
+ .audiojs .play-pause { width: 25px; height: 20px; padding: 0 6px; margin: 0px; float: left; overflow: hidden; } \
91
+ .audiojs p { display: none; width: 25px; height: 40px; margin: 0px; cursor: pointer; margin: -4px 0 0 -5px} \
92
+ .audiojs .play { display: block; } \
93
+ .audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 11px; margin: 4px 0 0 0; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; } \
94
+ .audiojs .progress { position: absolute; top: 0px; left: 0px; height: 10px; width: 0px; background: #1abc9c; z-index: 1; -moz-border-radius:0; -webkit-border-radius:0; -o-border-radius:0; border-radius:0; } \
95
+ .audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000; } \
96
+ .audiojs .time { float: left; height: 16px; line-height: 16px; margin: 2px 0px 0px 6px; padding: 0px 6px 0px 12px; color: #ddd; } \
97
+ .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; } \
98
+ .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; } \
99
+ .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff; \
100
+ text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; } \
101
+ .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; } \
102
+ \
103
+ .audiojs .play { background: url("$1") -2px -1px no-repeat; } \
104
+ .audiojs .loading { background: url("$1") -2px -31px no-repeat; } \
105
+ .audiojs .error { background: url("$1") -2px -61px no-repeat; } \
106
+ .audiojs .pause { background: url("$1") -2px -91px no-repeat; } \
107
+ \
108
+ .playing .play, .playing .loading, .playing .error { display: none; } \
109
+ .playing .pause { display: block; } \
110
+ \
111
+ .loading .play, .loading .pause, .loading .error { display: none; } \
112
+ .loading .loading { display: block; } \
113
+ \
114
+ .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; } \
115
+ .error .error { display: block; } \
116
+ .error .play-pause p { cursor: auto; } \
117
+ .error .error-message { display: block; }',
118
+ // The default event callbacks:
119
+ trackEnded: function(e) {},
120
+ flashError: function() {
121
+ var player = this.settings.createPlayer,
122
+ errorMessage = getByClass(player.errorMessageClass, this.wrapper),
123
+ html = 'Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';
124
+ if (this.mp3) html += ' <a href="'+this.mp3+'">Download audio file</a>.';
125
+ container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
126
+ container[audiojs].helpers.addClass(this.wrapper, player.errorClass);
127
+ errorMessage.innerHTML = html;
128
+ },
129
+ loadError: function(e) {
130
+ var player = this.settings.createPlayer,
131
+ errorMessage = getByClass(player.errorMessageClass, this.wrapper);
132
+ container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
133
+ container[audiojs].helpers.addClass(this.wrapper, player.errorClass);
134
+ errorMessage.innerHTML = 'Error loading: "'+this.mp3+'"';
135
+ },
136
+ init: function() {
137
+ var player = this.settings.createPlayer;
138
+ container[audiojs].helpers.addClass(this.wrapper, player.loadingClass);
139
+ },
140
+ loadStarted: function() {
141
+ var player = this.settings.createPlayer,
142
+ duration = getByClass(player.durationClass, this.wrapper),
143
+ m = Math.floor(this.duration / 60),
144
+ s = Math.floor(this.duration % 60);
145
+ container[audiojs].helpers.removeClass(this.wrapper, player.loadingClass);
146
+ duration.innerHTML = ((m<10?'0':'')+m+':'+(s<10?'0':'')+s);
147
+ },
148
+ loadProgress: function(percent) {
149
+ var player = this.settings.createPlayer,
150
+ scrubber = getByClass(player.scrubberClass, this.wrapper),
151
+ loaded = getByClass(player.loaderClass, this.wrapper);
152
+ loaded.style.width = (scrubber.offsetWidth * percent) + 'px';
153
+ },
154
+ playPause: function() {
155
+ if (this.playing) this.settings.play();
156
+ else this.settings.pause();
157
+ },
158
+ play: function() {
159
+ var player = this.settings.createPlayer;
160
+ container[audiojs].helpers.addClass(this.wrapper, player.playingClass);
161
+ },
162
+ pause: function() {
163
+ var player = this.settings.createPlayer;
164
+ container[audiojs].helpers.removeClass(this.wrapper, player.playingClass);
165
+ },
166
+ updatePlayhead: function(percent) {
167
+ var player = this.settings.createPlayer,
168
+ scrubber = getByClass(player.scrubberClass, this.wrapper),
169
+ progress = getByClass(player.progressClass, this.wrapper);
170
+ progress.style.width = (scrubber.offsetWidth * percent) + 'px';
171
+
172
+ var played = getByClass(player.playedClass, this.wrapper),
173
+ p = this.duration * percent,
174
+ m = Math.floor(p / 60),
175
+ s = Math.floor(p % 60);
176
+ played.innerHTML = ((m<10?'0':'')+m+':'+(s<10?'0':'')+s);
177
+ }
178
+ },
179
+
180
+ // ### Contructor functions
181
+
182
+ // `create()`
183
+ // Used to create a single `audiojs` instance.
184
+ // If an array is passed then it calls back to `createAll()`.
185
+ // Otherwise, it creates a single instance and returns it.
186
+ create: function(element, options) {
187
+ var options = options || {}
188
+ if (element.length) {
189
+ return this.createAll(options, element);
190
+ } else {
191
+ return this.newInstance(element, options);
192
+ }
193
+ },
194
+
195
+ // `createAll()`
196
+ // Creates multiple `audiojs` instances.
197
+ // If `elements` is `null`, then automatically find any `<audio>` tags on the page and create `audiojs` instances for them.
198
+ createAll: function(options, elements) {
199
+ var audioElements = elements || document.getElementsByTagName('audio'),
200
+ instances = []
201
+ options = options || {};
202
+ for (var i = 0, ii = audioElements.length; i < ii; i++) {
203
+ instances.push(this.newInstance(audioElements[i], options));
204
+ }
205
+ return instances;
206
+ },
207
+
208
+ // ### Creating and returning a new instance
209
+ // This goes through all the steps required to build out a usable `audiojs` instance.
210
+ newInstance: function(element, options) {
211
+ var element = element,
212
+ s = this.helpers.clone(this.settings),
213
+ id = 'audiojs'+this.instanceCount,
214
+ wrapperId = 'audiojs_wrapper'+this.instanceCount,
215
+ instanceCount = this.instanceCount++;
216
+
217
+ // Check for `autoplay`, `loop` and `preload` attributes and write them into the settings.
218
+ if (element.getAttribute('autoplay') != null) s.autoplay = true;
219
+ if (element.getAttribute('loop') != null) s.loop = true;
220
+ if (element.getAttribute('preload') == 'none') s.preload = false;
221
+ // Merge the default settings with the user-defined `options`.
222
+ if (options) this.helpers.merge(s, options);
223
+
224
+ // Inject the player html if required.
225
+ if (s.createPlayer.markup) element = this.createPlayer(element, s.createPlayer, wrapperId);
226
+ else element.parentNode.setAttribute('id', wrapperId);
227
+
228
+ // Return a new `audiojs` instance.
229
+ var audio = new container[audiojsInstance](element, s);
230
+
231
+ // If css has been passed in, dynamically inject it into the `<head>`.
232
+ if (s.css) this.helpers.injectCss(audio, s.css);
233
+
234
+ // If `<audio>` or mp3 playback isn't supported, insert the swf & attach the required events for it.
235
+ if (s.useFlash && s.hasFlash) {
236
+ this.injectFlash(audio, id);
237
+ this.attachFlashEvents(audio.wrapper, audio);
238
+ } else if (s.useFlash && !s.hasFlash) {
239
+ this.settings.flashError.apply(audio);
240
+ }
241
+
242
+ // Attach event callbacks to the new audiojs instance.
243
+ if (!s.useFlash || (s.useFlash && s.hasFlash)) this.attachEvents(audio.wrapper, audio);
244
+
245
+ // Store the newly-created `audiojs` instance.
246
+ this.instances[id] = audio;
247
+ return audio;
248
+ },
249
+
250
+ // ### Helper methods for constructing a working player
251
+ // Inject a wrapping div and the markup for the html player.
252
+ createPlayer: function(element, player, id) {
253
+ var wrapper = document.createElement('div'),
254
+ newElement = element.cloneNode(true);
255
+ wrapper.setAttribute('class', 'audiojs');
256
+ wrapper.setAttribute('className', 'audiojs');
257
+ wrapper.setAttribute('id', id);
258
+
259
+ // Fix IE's broken implementation of `innerHTML` & `cloneNode` for HTML5 elements.
260
+ if (newElement.outerHTML && !document.createElement('audio').canPlayType) {
261
+ newElement = this.helpers.cloneHtml5Node(element);
262
+ wrapper.innerHTML = player.markup;
263
+ wrapper.appendChild(newElement);
264
+ element.outerHTML = wrapper.outerHTML;
265
+ wrapper = document.getElementById(id);
266
+ } else {
267
+ wrapper.appendChild(newElement);
268
+ wrapper.innerHTML = wrapper.innerHTML + player.markup;
269
+ element.parentNode.replaceChild(wrapper, element);
270
+ }
271
+ return wrapper.getElementsByTagName('audio')[0];
272
+ },
273
+
274
+ // Attaches useful event callbacks to an `audiojs` instance.
275
+ attachEvents: function(wrapper, audio) {
276
+ if (!audio.settings.createPlayer) return;
277
+ var player = audio.settings.createPlayer,
278
+ playPause = getByClass(player.playPauseClass, wrapper),
279
+ scrubber = getByClass(player.scrubberClass, wrapper),
280
+ leftPos = function(elem) {
281
+ var curleft = 0;
282
+ if (elem.offsetParent) {
283
+ do { curleft += elem.offsetLeft; } while (elem = elem.offsetParent);
284
+ }
285
+ return curleft;
286
+ };
287
+
288
+ container[audiojs].events.addListener(playPause, 'click', function(e) {
289
+ audio.playPause.apply(audio);
290
+ });
291
+
292
+ container[audiojs].events.addListener(scrubber, 'click', function(e) {
293
+ var relativeLeft = e.clientX - leftPos(this);
294
+ audio.skipTo(relativeLeft / scrubber.offsetWidth);
295
+ });
296
+
297
+ // _If flash is being used, then the following handlers don't need to be registered._
298
+ if (audio.settings.useFlash) return;
299
+
300
+ // Start tracking the load progress of the track.
301
+ container[audiojs].events.trackLoadProgress(audio);
302
+
303
+ container[audiojs].events.addListener(audio.element, 'timeupdate', function(e) {
304
+ audio.updatePlayhead.apply(audio);
305
+ });
306
+
307
+ container[audiojs].events.addListener(audio.element, 'ended', function(e) {
308
+ audio.trackEnded.apply(audio);
309
+ });
310
+
311
+ container[audiojs].events.addListener(audio.source, 'error', function(e) {
312
+ // on error, cancel any load timers that are running.
313
+ clearInterval(audio.readyTimer);
314
+ clearInterval(audio.loadTimer);
315
+ audio.settings.loadError.apply(audio);
316
+ });
317
+
318
+ },
319
+
320
+ // Flash requires a slightly different API to the `<audio>` element, so this method is used to overwrite the standard event handlers.
321
+ attachFlashEvents: function(element, audio) {
322
+ audio['swfReady'] = false;
323
+ audio['load'] = function(mp3) {
324
+ // If the swf isn't ready yet then just set `audio.mp3`. `init()` will load it in once the swf is ready.
325
+ audio.mp3 = mp3;
326
+ if (audio.swfReady) audio.element.load(mp3);
327
+ }
328
+ audio['loadProgress'] = function(percent, duration) {
329
+ audio.loadedPercent = percent;
330
+ audio.duration = duration;
331
+ audio.settings.loadStarted.apply(audio);
332
+ audio.settings.loadProgress.apply(audio, [percent]);
333
+ }
334
+ audio['skipTo'] = function(percent) {
335
+ if (percent > audio.loadedPercent) return;
336
+ audio.updatePlayhead.call(audio, [percent])
337
+ audio.element.skipTo(percent);
338
+ }
339
+ audio['updatePlayhead'] = function(percent) {
340
+ audio.settings.updatePlayhead.apply(audio, [percent]);
341
+ }
342
+ audio['play'] = function() {
343
+ // If the audio hasn't started preloading, then start it now.
344
+ // Then set `preload` to `true`, so that any tracks loaded in subsequently are loaded straight away.
345
+ if (!audio.settings.preload) {
346
+ audio.settings.preload = true;
347
+ audio.element.init(audio.mp3);
348
+ }
349
+ audio.playing = true;
350
+ // IE doesn't allow a method named `play()` to be exposed through `ExternalInterface`, so lets go with `pplay()`.
351
+ // <http://dev.nuclearrooster.com/2008/07/27/externalinterfaceaddcallback-can-cause-ie-js-errors-with-certain-keyworkds/>
352
+ audio.element.pplay();
353
+ audio.settings.play.apply(audio);
354
+ }
355
+ audio['pause'] = function() {
356
+ audio.playing = false;
357
+ // Use `ppause()` for consistency with `pplay()`, even though it isn't really required.
358
+ audio.element.ppause();
359
+ audio.settings.pause.apply(audio);
360
+ }
361
+ audio['setVolume'] = function(v) {
362
+ audio.element.setVolume(v);
363
+ }
364
+ audio['loadStarted'] = function() {
365
+ // Load the mp3 specified by the audio element into the swf.
366
+ audio.swfReady = true;
367
+ if (audio.settings.preload) audio.element.init(audio.mp3);
368
+ if (audio.settings.autoplay) audio.play.apply(audio);
369
+ }
370
+ },
371
+
372
+ // ### Injecting an swf from a string
373
+ // Build up the swf source by replacing the `$keys` and then inject the markup into the page.
374
+ injectFlash: function(audio, id) {
375
+ var flashSource = this.flashSource.replace(/\$1/g, id);
376
+ flashSource = flashSource.replace(/\$2/g, audio.settings.swfLocation);
377
+ // `(+new Date)` ensures the swf is not pulled out of cache. The fixes an issue with Firefox running multiple players on the same page.
378
+ flashSource = flashSource.replace(/\$3/g, (+new Date + Math.random()));
379
+ // Inject the player markup using a more verbose `innerHTML` insertion technique that works with IE.
380
+ var html = audio.wrapper.innerHTML,
381
+ div = document.createElement('div');
382
+ div.innerHTML = flashSource + html;
383
+ audio.wrapper.innerHTML = div.innerHTML;
384
+ audio.element = this.helpers.getSwf(id);
385
+ },
386
+
387
+ // ## Helper functions
388
+ helpers: {
389
+ // **Merge two objects, with `obj2` overwriting `obj1`**
390
+ // The merge is shallow, but that's all that is required for our purposes.
391
+ merge: function(obj1, obj2) {
392
+ for (attr in obj2) {
393
+ if (obj1.hasOwnProperty(attr) || obj2.hasOwnProperty(attr)) {
394
+ obj1[attr] = obj2[attr];
395
+ }
396
+ }
397
+ },
398
+ // **Clone a javascript object (recursively)**
399
+ clone: function(obj){
400
+ if (obj == null || typeof(obj) !== 'object') return obj;
401
+ var temp = new obj.constructor();
402
+ for (var key in obj) temp[key] = arguments.callee(obj[key]);
403
+ return temp;
404
+ },
405
+ // **Adding/removing classnames from elements**
406
+ addClass: function(element, className) {
407
+ var re = new RegExp('(\\s|^)'+className+'(\\s|$)');
408
+ if (re.test(element.className)) return;
409
+ element.className += ' ' + className;
410
+ },
411
+ removeClass: function(element, className) {
412
+ var re = new RegExp('(\\s|^)'+className+'(\\s|$)');
413
+ element.className = element.className.replace(re,' ');
414
+ },
415
+ // **Dynamic CSS injection**
416
+ // Takes a string of css, inserts it into a `<style>`, then injects it in at the very top of the `<head>`. This ensures any user-defined styles will take precedence.
417
+ injectCss: function(audio, string) {
418
+
419
+ // If an `audiojs` `<style>` tag already exists, then append to it rather than creating a whole new `<style>`.
420
+ var prepend = '',
421
+ styles = document.getElementsByTagName('style'),
422
+ css = string.replace(/\$1/g, audio.settings.imageLocation);
423
+
424
+ for (var i = 0, ii = styles.length; i < ii; i++) {
425
+ var title = styles[i].getAttribute('title');
426
+ if (title && ~title.indexOf('audiojs')) {
427
+ style = styles[i];
428
+ if (style.innerHTML === css) return;
429
+ prepend = style.innerHTML;
430
+ break;
431
+ }
432
+ };
433
+
434
+ var head = document.getElementsByTagName('head')[0],
435
+ firstchild = head.firstChild,
436
+ style = document.createElement('style');
437
+
438
+ if (!head) return;
439
+
440
+ style.setAttribute('type', 'text/css');
441
+ style.setAttribute('title', 'audiojs');
442
+
443
+ if (style.styleSheet) style.styleSheet.cssText = prepend + css;
444
+ else style.appendChild(document.createTextNode(prepend + css));
445
+
446
+ if (firstchild) head.insertBefore(style, firstchild);
447
+ else head.appendChild(styleElement);
448
+ },
449
+ // **Handle all the IE6+7 requirements for cloning `<audio>` nodes**
450
+ // Create a html5-safe document fragment by injecting an `<audio>` element into the document fragment.
451
+ cloneHtml5Node: function(audioTag) {
452
+ var fragment = document.createDocumentFragment(),
453
+ doc = fragment.createElement ? fragment : document;
454
+ doc.createElement('audio');
455
+ var div = doc.createElement('div');
456
+ fragment.appendChild(div);
457
+ div.innerHTML = audioTag.outerHTML;
458
+ return div.firstChild;
459
+ },
460
+ // **Cross-browser `<object>` / `<embed>` element selection**
461
+ getSwf: function(name) {
462
+ var swf = document[name] || window[name];
463
+ return swf.length > 1 ? swf[swf.length - 1] : swf;
464
+ }
465
+ },
466
+ // ## Event-handling
467
+ events: {
468
+ memoryLeaking: false,
469
+ listeners: [],
470
+ // **A simple cross-browser event handler abstraction**
471
+ addListener: function(element, eventName, func) {
472
+ // For modern browsers use the standard DOM-compliant `addEventListener`.
473
+ if (element.addEventListener) {
474
+ element.addEventListener(eventName, func, false);
475
+ // For older versions of Internet Explorer, use `attachEvent`.
476
+ // Also provide a fix for scoping `this` to the calling element and register each listener so the containing elements can be purged on page unload.
477
+ } else if (element.attachEvent) {
478
+ this.listeners.push(element);
479
+ if (!this.memoryLeaking) {
480
+ window.attachEvent('onunload', function() {
481
+ if(this.listeners) {
482
+ for (var i = 0, ii = this.listeners.length; i < ii; i++) {
483
+ container[audiojs].events.purge(this.listeners[i]);
484
+ }
485
+ }
486
+ });
487
+ this.memoryLeaking = true;
488
+ }
489
+ element.attachEvent('on' + eventName, function() {
490
+ func.call(element, window.event);
491
+ });
492
+ }
493
+ },
494
+
495
+ trackLoadProgress: function(audio) {
496
+ // If `preload` has been set to `none`, then we don't want to start loading the track yet.
497
+ if (!audio.settings.preload) return;
498
+
499
+ var readyTimer,
500
+ loadTimer,
501
+ audio = audio,
502
+ ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
503
+
504
+ // Use timers here rather than the official `progress` event, as Chrome has issues calling `progress` when loading mp3 files from cache.
505
+ readyTimer = setInterval(function() {
506
+ if (audio.element.readyState > -1) {
507
+ // iOS doesn't start preloading the mp3 until the user interacts manually, so this stops the loader being displayed prematurely.
508
+ if (!ios) audio.init.apply(audio);
509
+ }
510
+ if (audio.element.readyState > 1) {
511
+ if (audio.settings.autoplay) audio.play.apply(audio);
512
+ clearInterval(readyTimer);
513
+ // Once we have data, start tracking the load progress.
514
+ loadTimer = setInterval(function() {
515
+ audio.loadProgress.apply(audio);
516
+ if (audio.loadedPercent >= 1) clearInterval(loadTimer);
517
+ });
518
+ }
519
+ }, 10);
520
+ audio.readyTimer = readyTimer;
521
+ audio.loadTimer = loadTimer;
522
+ },
523
+
524
+ // **Douglas Crockford's IE6 memory leak fix**
525
+ // <http://javascript.crockford.com/memory/leak.html>
526
+ // This is used to release the memory leak created by the circular references created when fixing `this` scoping for IE. It is called on page unload.
527
+ purge: function(d) {
528
+ var a = d.attributes, i;
529
+ if (a) {
530
+ for (i = 0; i < a.length; i += 1) {
531
+ if (typeof d[a[i].name] === 'function') d[a[i].name] = null;
532
+ }
533
+ }
534
+ a = d.childNodes;
535
+ if (a) {
536
+ for (i = 0; i < a.length; i += 1) purge(d.childNodes[i]);
537
+ }
538
+ },
539
+
540
+ // **DOMready function**
541
+ // As seen here: <https://github.com/dperini/ContentLoaded/>.
542
+ ready: (function() { return function(fn) {
543
+ var win = window, done = false, top = true,
544
+ doc = win.document, root = doc.documentElement,
545
+ add = doc.addEventListener ? 'addEventListener' : 'attachEvent',
546
+ rem = doc.addEventListener ? 'removeEventListener' : 'detachEvent',
547
+ pre = doc.addEventListener ? '' : 'on',
548
+ init = function(e) {
549
+ if (e.type == 'readystatechange' && doc.readyState != 'complete') return;
550
+ (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
551
+ if (!done && (done = true)) fn.call(win, e.type || e);
552
+ },
553
+ poll = function() {
554
+ try { root.doScroll('left'); } catch(e) { setTimeout(poll, 50); return; }
555
+ init('poll');
556
+ };
557
+ if (doc.readyState == 'complete') fn.call(win, 'lazy');
558
+ else {
559
+ if (doc.createEventObject && root.doScroll) {
560
+ try { top = !win.frameElement; } catch(e) { }
561
+ if (top) poll();
562
+ }
563
+ doc[add](pre + 'DOMContentLoaded', init, false);
564
+ doc[add](pre + 'readystatechange', init, false);
565
+ win[add](pre + 'load', init, false);
566
+ }
567
+ }
568
+ })()
569
+
570
+ }
571
+ }
572
+
573
+ // ## The audiojs class
574
+ // We create one of these per `<audio>` and then push them into `audiojs['instances']`.
575
+ container[audiojsInstance] = function(element, settings) {
576
+ // Each audio instance returns an object which contains an API back into the `<audio>` element.
577
+ this.element = element;
578
+ this.wrapper = element.parentNode;
579
+ this.source = element.getElementsByTagName('source')[0] || element;
580
+ // First check the `<audio>` element directly for a src and if one is not found, look for a `<source>` element.
581
+ this.mp3 = (function(element) {
582
+ var source = element.getElementsByTagName('source')[0];
583
+ return element.getAttribute('src') || (source ? source.getAttribute('src') : null);
584
+ })(element);
585
+ this.settings = settings;
586
+ this.loadStartedCalled = false;
587
+ this.loadedPercent = 0;
588
+ this.duration = 1;
589
+ this.playing = false;
590
+ }
591
+
592
+ container[audiojsInstance].prototype = {
593
+ // API access events:
594
+ // Each of these do what they need do and then call the matching methods defined in the settings object.
595
+ updatePlayhead: function() {
596
+ var percent = this.element.currentTime / this.duration;
597
+ this.settings.updatePlayhead.apply(this, [percent]);
598
+ },
599
+ skipTo: function(percent) {
600
+ if (percent > this.loadedPercent) return;
601
+ this.element.currentTime = this.duration * percent;
602
+ this.updatePlayhead();
603
+ },
604
+ load: function(mp3) {
605
+ this.loadStartedCalled = false;
606
+ this.source.setAttribute('src', mp3);
607
+ // The now outdated `load()` method is required for Safari 4
608
+ this.element.load();
609
+ this.mp3 = mp3;
610
+ container[audiojs].events.trackLoadProgress(this);
611
+ },
612
+ loadError: function() {
613
+ this.settings.loadError.apply(this);
614
+ },
615
+ init: function() {
616
+ this.settings.init.apply(this);
617
+ },
618
+ loadStarted: function() {
619
+ // Wait until `element.duration` exists before setting up the audio player.
620
+ if (!this.element.duration) return false;
621
+
622
+ this.duration = this.element.duration;
623
+ this.updatePlayhead();
624
+ this.settings.loadStarted.apply(this);
625
+ },
626
+ loadProgress: function() {
627
+ if (this.element.buffered != null && this.element.buffered.length) {
628
+ // Ensure `loadStarted()` is only called once.
629
+ if (!this.loadStartedCalled) {
630
+ this.loadStartedCalled = this.loadStarted();
631
+ }
632
+ var durationLoaded = this.element.buffered.end(this.element.buffered.length - 1);
633
+ this.loadedPercent = durationLoaded / this.duration;
634
+
635
+ this.settings.loadProgress.apply(this, [this.loadedPercent]);
636
+ }
637
+ },
638
+ playPause: function() {
639
+ if (this.playing) this.pause();
640
+ else this.play();
641
+ },
642
+ play: function() {
643
+ var ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
644
+ // On iOS this interaction will trigger loading the mp3, so run `init()`.
645
+ if (ios && this.element.readyState == 0) this.init.apply(this);
646
+ // If the audio hasn't started preloading, then start it now.
647
+ // Then set `preload` to `true`, so that any tracks loaded in subsequently are loaded straight away.
648
+ if (!this.settings.preload) {
649
+ this.settings.preload = true;
650
+ this.element.setAttribute('preload', 'auto');
651
+ container[audiojs].events.trackLoadProgress(this);
652
+ }
653
+ this.playing = true;
654
+ this.element.play();
655
+ this.settings.play.apply(this);
656
+ },
657
+ pause: function() {
658
+ this.playing = false;
659
+ this.element.pause();
660
+ this.settings.pause.apply(this);
661
+ },
662
+ setVolume: function(v) {
663
+ this.element.volume = v;
664
+ },
665
+ trackEnded: function(e) {
666
+ this.skipTo.apply(this, [0]);
667
+ if (!this.settings.loop) this.pause.apply(this);
668
+ this.settings.trackEnded.apply(this);
669
+ }
670
+ }
671
+
672
+ // **getElementsByClassName**
673
+ // Having to rely on `getElementsByTagName` is pretty inflexible internally, so a modified version of Dustin Diaz's `getElementsByClassName` has been included.
674
+ // This version cleans things up and prefers the native DOM method if it's available.
675
+ var getByClass = function(searchClass, node) {
676
+ var matches = [];
677
+ node = node || document;
678
+
679
+ if (node.getElementsByClassName) {
680
+ matches = node.getElementsByClassName(searchClass);
681
+ } else {
682
+ var i, l,
683
+ els = node.getElementsByTagName("*"),
684
+ pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
685
+
686
+ for (i = 0, l = els.length; i < l; i++) {
687
+ if (pattern.test(els[i].className)) {
688
+ matches.push(els[i]);
689
+ }
690
+ }
691
+ }
692
+ return matches.length > 1 ? matches : matches[0];
693
+ };
694
+ // The global variable names are passed in here and can be changed if they conflict with anything else.
695
+ })('audiojs', 'audiojsInstance', this);