mosaico 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (425) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +680 -0
  5. data/README.md +179 -0
  6. data/Rakefile +5 -0
  7. data/app/assets/images/mosaico/logo_transparent.png +0 -0
  8. data/app/assets/javascripts/mosaico/application.js.erb +51 -0
  9. data/app/assets/javascripts/mosaico/plugins/debug.js.erb +10 -0
  10. data/app/assets/javascripts/mosaico/plugins/logo.js.erb +10 -0
  11. data/app/assets/javascripts/mosaico/plugins/preview.js +85 -0
  12. data/app/assets/javascripts/mosaico/plugins/save.js.erb +72 -0
  13. data/app/assets/javascripts/mosaico/plugins/template_path.js.erb +22 -0
  14. data/app/assets/javascripts/mosaico/plugins/translations.js +10 -0
  15. data/app/assets/javascripts/mosaico/utilities.js +25 -0
  16. data/app/assets/stylesheets/mosaico/application.css +6 -0
  17. data/app/controllers/mosaico/application_controller.rb +17 -0
  18. data/app/controllers/mosaico/images_controller.rb +142 -0
  19. data/app/controllers/mosaico/projects_controller.rb +31 -0
  20. data/app/controllers/mosaico/templates_controller.rb +8 -0
  21. data/app/helpers/mosaico/application_helper.rb +7 -0
  22. data/app/models/mosaico/image.rb +9 -0
  23. data/app/models/mosaico/placeholder_image.rb +9 -0
  24. data/app/models/mosaico/project.rb +13 -0
  25. data/app/models/mosaico/uploaded_image.rb +26 -0
  26. data/app/views/layouts/mosaico/application.html.erb +13 -0
  27. data/app/views/mosaico/projects/new.html.erb +1 -0
  28. data/app/views/mosaico/projects/show.html.erb +1 -0
  29. data/app/views/mosaico/shared/_metadata.html.erb +12 -0
  30. data/config/routes.rb +12 -0
  31. data/db/migrate/20170817202255_add_images.rb +14 -0
  32. data/db/migrate/20170824233755_add_projects.rb +11 -0
  33. data/lib/mosaico.rb +100 -0
  34. data/lib/mosaico/engine.rb +72 -0
  35. data/lib/mosaico/local_backend.rb +23 -0
  36. data/lib/mosaico/local_image_backend.rb +7 -0
  37. data/lib/mosaico/local_placeholder_backend.rb +7 -0
  38. data/lib/mosaico/placeholder.png +0 -0
  39. data/lib/mosaico/template.rb +89 -0
  40. data/lib/mosaico/versafix_template.rb +43 -0
  41. data/lib/mosaico/version.rb +4 -0
  42. data/lib/tasks/makeThumbs.js.erb +57 -0
  43. data/lib/tasks/thumbs.rake +35 -0
  44. data/mosaico.gemspec +22 -0
  45. data/screenshot.png +0 -0
  46. data/vendor/assets/fonts/LiberationSans-Regular.ttf +0 -0
  47. data/vendor/assets/mosaico-0.16.0/mosaico/.jsbeautifyrc +6 -0
  48. data/vendor/assets/mosaico-0.16.0/mosaico/.jshintrc +8 -0
  49. data/vendor/assets/mosaico-0.16.0/mosaico/.travis.yml +6 -0
  50. data/vendor/assets/mosaico-0.16.0/mosaico/CONTRIBUTING.md +37 -0
  51. data/vendor/assets/mosaico-0.16.0/mosaico/Dockerfile +21 -0
  52. data/vendor/assets/mosaico-0.16.0/mosaico/Gruntfile.js +241 -0
  53. data/vendor/assets/mosaico-0.16.0/mosaico/LICENSE +680 -0
  54. data/vendor/assets/mosaico-0.16.0/mosaico/NOTICE.txt +87 -0
  55. data/vendor/assets/mosaico-0.16.0/mosaico/README.md +73 -0
  56. data/vendor/assets/mosaico-0.16.0/mosaico/backend/README.txt +23 -0
  57. data/vendor/assets/mosaico-0.16.0/mosaico/backend/main.js +162 -0
  58. data/vendor/assets/mosaico-0.16.0/mosaico/bower.json +76 -0
  59. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico-material.css +7425 -0
  60. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.css +7133 -0
  61. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.debug.js +1517 -0
  62. data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.js +12828 -0
  63. data/vendor/assets/mosaico-0.16.0/mosaico/build/templates.js +15 -0
  64. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.eot +0 -0
  65. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.svg +685 -0
  66. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.ttf +0 -0
  67. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff +0 -0
  68. data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff2 +0 -0
  69. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/byvoxmail.png +0 -0
  70. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-badge.gif +0 -0
  71. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-v.gif +0 -0
  72. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico32.png +0 -0
  73. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaicologo.png +0 -0
  74. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot-orig.png +0 -0
  75. data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot.png +0 -0
  76. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/README.md +26 -0
  77. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-de.json +88 -0
  78. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-en.json +88 -0
  79. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-es.json +88 -0
  80. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-fr.json +88 -0
  81. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-it.json +88 -0
  82. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-nl.json +88 -0
  83. data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-sv.json +88 -0
  84. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css +5 -0
  85. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css.map +1 -0
  86. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css +5 -0
  87. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css.map +1 -0
  88. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js +1517 -0
  89. data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js.map +147 -0
  90. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/canvas-to-blob.min.js +2 -0
  91. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.css +7 -0
  92. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.js +13 -0
  93. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-image.js +324 -0
  94. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-process.js +175 -0
  95. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-validate.js +122 -0
  96. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload.js +1482 -0
  97. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.iframe-transport.js +217 -0
  98. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.js +5 -0
  99. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.map +1 -0
  100. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.ui.touch-punch.min.js +11 -0
  101. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout-jqueryui.min.js +1 -0
  102. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout.js +123 -0
  103. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/load-image.all.min.js +2 -0
  104. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.eot +0 -0
  105. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.ttf +0 -0
  106. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.woff +0 -0
  107. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/stylesheet.css +9 -0
  108. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.js +101 -0
  109. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.min.js +1 -0
  110. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.js +55 -0
  111. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.min.js +1 -0
  112. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.js +204 -0
  113. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.min.js +1 -0
  114. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.js +162 -0
  115. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.min.js +1 -0
  116. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.js +165 -0
  117. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.min.js +1 -0
  118. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.js +123 -0
  119. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.min.js +1 -0
  120. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.js +462 -0
  121. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.min.js +1 -0
  122. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.js +60 -0
  123. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.min.js +1 -0
  124. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/css/prism.css +138 -0
  125. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.js +1319 -0
  126. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.min.js +1 -0
  127. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.js +112 -0
  128. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.min.js +1 -0
  129. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.js +100 -0
  130. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.min.js +1 -0
  131. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.js +64 -0
  132. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.min.js +1 -0
  133. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cool.gif +0 -0
  134. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cry.gif +0 -0
  135. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  136. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  137. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-frown.gif +0 -0
  138. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-innocent.gif +0 -0
  139. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-kiss.gif +0 -0
  140. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-laughing.gif +0 -0
  141. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  142. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-sealed.gif +0 -0
  143. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-smile.gif +0 -0
  144. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-surprised.gif +0 -0
  145. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  146. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-undecided.gif +0 -0
  147. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-wink.gif +0 -0
  148. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-yell.gif +0 -0
  149. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.js +65 -0
  150. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.min.js +1 -0
  151. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.js +490 -0
  152. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.min.js +1 -0
  153. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.js +154 -0
  154. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.min.js +1 -0
  155. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.js +30 -0
  156. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.min.js +1 -0
  157. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.js +630 -0
  158. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.min.js +1 -0
  159. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.js +2944 -0
  160. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.min.js +1 -0
  161. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.js +273 -0
  162. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.min.js +1 -0
  163. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.js +121 -0
  164. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.min.js +1 -0
  165. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.js +225 -0
  166. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.min.js +1 -0
  167. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.js +208 -0
  168. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.min.js +1 -0
  169. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.js +403 -0
  170. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.min.js +1 -0
  171. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.js +965 -0
  172. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.min.js +1 -0
  173. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/moxieplayer.swf +0 -0
  174. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.js +879 -0
  175. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.min.js +1 -0
  176. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.js +53 -0
  177. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.min.js +1 -0
  178. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.js +101 -0
  179. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.min.js +1 -0
  180. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.js +88 -0
  181. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.min.js +1 -0
  182. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.js +1844 -0
  183. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.min.js +1 -0
  184. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.js +101 -0
  185. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.min.js +1 -0
  186. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.js +32 -0
  187. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.min.js +1 -0
  188. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.js +98 -0
  189. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.min.js +1 -0
  190. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.js +609 -0
  191. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.min.js +1 -0
  192. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.js +1031 -0
  193. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.min.js +1 -0
  194. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.js +120 -0
  195. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.min.js +1 -0
  196. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.js +4400 -0
  197. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.min.js +2 -0
  198. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.js +276 -0
  199. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.min.js +1 -0
  200. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.js +297 -0
  201. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.min.js +1 -0
  202. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.js +268 -0
  203. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.min.js +1 -0
  204. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/css/visualblocks.css +135 -0
  205. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.js +86 -0
  206. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.min.js +1 -0
  207. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.js +123 -0
  208. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.min.js +1 -0
  209. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.js +69 -0
  210. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.min.js +1 -0
  211. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/Variables.less +196 -0
  212. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.inline.min.css +1 -0
  213. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.min.css +1 -0
  214. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/readme.md +1 -0
  215. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
  216. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
  217. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
  218. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
  219. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
  220. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
  221. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
  222. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
  223. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
  224. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
  225. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/anchor.gif +0 -0
  226. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/loader.gif +0 -0
  227. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/object.gif +0 -0
  228. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/trans.gif +0 -0
  229. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
  230. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.json +79 -0
  231. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.min.css +1 -0
  232. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.inline.min.css +1 -0
  233. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.min.css +1 -0
  234. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.eot +0 -0
  235. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.svg +63 -0
  236. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  237. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.woff +0 -0
  238. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.eot +0 -0
  239. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.svg +129 -0
  240. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.ttf +0 -0
  241. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.woff +0 -0
  242. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/anchor.gif +0 -0
  243. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/loader.gif +0 -0
  244. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/object.gif +0 -0
  245. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/trans.gif +0 -0
  246. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.ie7.min.css +1 -0
  247. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.min.css +1 -0
  248. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.js +1828 -0
  249. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.min.js +1 -0
  250. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.js +934 -0
  251. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.min.js +1 -0
  252. data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/tinymce.min.js +14 -0
  253. data/vendor/assets/mosaico-0.16.0/mosaico/editor.html +63 -0
  254. data/vendor/assets/mosaico-0.16.0/mosaico/favicon.ico +0 -0
  255. data/vendor/assets/mosaico-0.16.0/mosaico/index.html +368 -0
  256. data/vendor/assets/mosaico-0.16.0/mosaico/package.json +92 -0
  257. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/byvoxmail.png +0 -0
  258. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-badge.gif +0 -0
  259. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-v.gif +0 -0
  260. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico32.png +0 -0
  261. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaicologo.png +0 -0
  262. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot-orig.png +0 -0
  263. data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot.png +0 -0
  264. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/README.md +26 -0
  265. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-de.json +88 -0
  266. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-en.json +88 -0
  267. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-es.json +88 -0
  268. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-fr.json +88 -0
  269. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-it.json +88 -0
  270. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-nl.json +88 -0
  271. data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-sv.json +88 -0
  272. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/Variables.less +196 -0
  273. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.inline.min.css +1 -0
  274. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.min.css +1 -0
  275. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/readme.md +1 -0
  276. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
  277. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
  278. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
  279. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
  280. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
  281. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
  282. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
  283. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
  284. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
  285. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
  286. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/anchor.gif +0 -0
  287. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/loader.gif +0 -0
  288. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/object.gif +0 -0
  289. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/trans.gif +0 -0
  290. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
  291. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.json +79 -0
  292. data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.min.css +1 -0
  293. data/vendor/assets/mosaico-0.16.0/mosaico/server-config.js +12 -0
  294. data/vendor/assets/mosaico-0.16.0/mosaico/spec/converter-spec.js +115 -0
  295. data/vendor/assets/mosaico-0.16.0/mosaico/spec/data/template-versafix-1.model.json +137 -0
  296. data/vendor/assets/mosaico-0.16.0/mosaico/spec/declarations-spec.js +282 -0
  297. data/vendor/assets/mosaico-0.16.0/mosaico/spec/mensch-spec.js +114 -0
  298. data/vendor/assets/mosaico-0.16.0/mosaico/spec/model-spec.js +88 -0
  299. data/vendor/assets/mosaico-0.16.0/mosaico/spec/stylesheet-spec.js +177 -0
  300. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone.less +7 -0
  301. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone_material.less +350 -0
  302. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/safarihack.css +17 -0
  303. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements.less +497 -0
  304. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_jquery.less +344 -0
  305. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_mixins.less +406 -0
  306. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_moxie.less +130 -0
  307. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico.less +529 -0
  308. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_content.less +391 -0
  309. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_tools.less +1043 -0
  310. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_reset.less +45 -0
  311. data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_variables.less +156 -0
  312. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/app.js +167 -0
  313. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/bind-iframe.js +64 -0
  314. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/blocks.js +118 -0
  315. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/choose-template.js +7 -0
  316. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/colorpicker.js +58 -0
  317. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js +16 -0
  318. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/droppable.js +87 -0
  319. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/eventable.js +33 -0
  320. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extender-pagination.js +60 -0
  321. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extsortables.js +103 -0
  322. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/fileupload.js +373 -0
  323. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/if-subs.js +110 -0
  324. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-spinner.js +31 -0
  325. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-tabs.js +17 -0
  326. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/script-template.js +30 -0
  327. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollfix.js +48 -0
  328. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollintoview.js +83 -0
  329. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/string-template.js +76 -0
  330. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/tooltips.js +36 -0
  331. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/validated-value.js +40 -0
  332. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/virtuals.js +102 -0
  333. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/wysiwygs.js +304 -0
  334. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/checkmodel.js +114 -0
  335. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/declarations.js +279 -0
  336. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/domutils.js +93 -0
  337. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/editor.js +411 -0
  338. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/main.js +42 -0
  339. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/model.js +536 -0
  340. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/parser.js +485 -0
  341. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/stylesheet.js +205 -0
  342. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/utils.js +156 -0
  343. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/wrapper.js +308 -0
  344. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/color.js +53 -0
  345. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/inliner.js +35 -0
  346. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/localstorage.js +100 -0
  347. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ko-bindings.js +22 -0
  348. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/template-loader.js +446 -0
  349. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/timed-call.js +31 -0
  350. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undomain.js +49 -0
  351. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undoserializer.js +120 -0
  352. data/vendor/assets/mosaico-0.16.0/mosaico/src/js/viewmodel.js +595 -0
  353. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/array.tmpl.html +1 -0
  354. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-show.tmpl.html +1 -0
  355. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-wysiwyg.tmpl.html +18 -0
  356. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-show.tmpl.html +1 -0
  357. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-wysiwyg.tmpl.html +2 -0
  358. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/customstyle.tmpl.html +3 -0
  359. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/empty.tmpl.html +0 -0
  360. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/error.tmpl.html +1 -0
  361. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/gallery-images.tmpl.html +16 -0
  362. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/img-wysiwyg.tmpl.html +43 -0
  363. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/main.tmpl.html +102 -0
  364. data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/toolbox.tmpl.html +111 -0
  365. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/combineKOTemplates.js +24 -0
  366. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/lib/phantom-thumbnailer-editor.js +168 -0
  367. data/vendor/assets/mosaico-0.16.0/mosaico/tasks/makeThumbs.js +79 -0
  368. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/README.md +1 -0
  369. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/_full.png +0 -0
  370. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/footerBlock.png +0 -0
  371. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/headerBlock.png +0 -0
  372. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/heroBlock.png +0 -0
  373. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/socialBlock.png +0 -0
  374. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/threetwoBlock.png +0 -0
  375. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/twoColumnBlock.png +0 -0
  376. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/template-tedc15.html +567 -0
  377. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/HeaderAndText.png +0 -0
  378. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/_full.png +0 -0
  379. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/fixedlist.png +0 -0
  380. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.md +335 -0
  381. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.pdf +0 -0
  382. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_384.jpg +0 -0
  383. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_385.jpg +0 -0
  384. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_386.jpg +0 -0
  385. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_387.jpg +0 -0
  386. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_407.jpg +0 -0
  387. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_408.jpg +0 -0
  388. data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/template-tutorial.html +68 -0
  389. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/_full.png +0 -0
  390. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/buttonBlock.png +0 -0
  391. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleArticleBlock.png +0 -0
  392. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleImageBlock.png +0 -0
  393. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/hrBlock.png +0 -0
  394. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/imageBlock.png +0 -0
  395. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/logoBlock.png +0 -0
  396. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/sideArticleBlock.png +0 -0
  397. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/singleArticleBlock.png +0 -0
  398. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/socialBlock.png +0 -0
  399. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/spacerBlock.png +0 -0
  400. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/textBlock.png +0 -0
  401. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/titleBlock.png +0 -0
  402. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleArticleBlock.png +0 -0
  403. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleImageBlock.png +0 -0
  404. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_bw_ok.png +0 -0
  405. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_ok.png +0 -0
  406. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_bw_ok.png +0 -0
  407. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_ok.png +0 -0
  408. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_bw_ok.png +0 -0
  409. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_ok.png +0 -0
  410. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_bw_ok.png +0 -0
  411. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_ok.png +0 -0
  412. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_bw_ok.png +0 -0
  413. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_ok.png +0 -0
  414. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_bw_ok.png +0 -0
  415. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_ok.png +0 -0
  416. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_bw_ok.png +0 -0
  417. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_ok.png +0 -0
  418. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_bw_ok.png +0 -0
  419. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_ok.png +0 -0
  420. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_bw_ok.png +0 -0
  421. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_ok.png +0 -0
  422. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/sponsor.gif +0 -0
  423. data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/template-versafix-1.html +1531 -0
  424. data/vendor/assets/mosaico-0.16.0/mosaico/uploads/README.md +1 -0
  425. metadata +536 -0
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("charmap",function(e){function t(){return[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["256","A - macron"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["274","E - macron"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["298","I - macron"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["332","O - macron"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["362","U - macron"],["221","Y - acute"],["376","Y - diaeresis"],["562","Y - macron"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["257","a - macron"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["275","e - macron"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["299","i - macron"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["333","o macron"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["363","u - macron"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["563","y - macron"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]]}function n(e){return tinymce.util.Tools.grep(e,function(e){return l(e)&&2==e.length})}function r(e){return l(e)?[].concat(n(e)):"function"==typeof e?e():[]}function i(t){var n=e.settings;return n.charmap&&(t=r(n.charmap)),n.charmap_append?[].concat(t).concat(r(n.charmap_append)):t}function o(){return i(t())}function a(t){e.fire("insertCustomChar",{chr:t}).chr,e.execCommand("mceInsertContent",!1,t)}function s(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var n,r,i,s;n='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var l=o(),c=Math.min(l.length,25),u=Math.ceil(l.length/c);for(i=0;i<u;i++){for(n+="<tr>",r=0;r<c;r++){var d=i*c+r;if(d<l.length){var f=l[d];n+='<td title="'+f[1]+'"><div tabindex="-1" title="'+f[1]+'" role="button">'+(f?String.fromCharCode(parseInt(f[0],10)):"&nbsp;")+"</div></td>"}else n+="<td />"}n+="</tr>"}n+="</tbody></table>";var h={type:"container",html:n,onclick:function(e){var n=e.target;/^(TD|DIV)$/.test(n.nodeName)&&t(n).firstChild&&(a(tinymce.trim(n.innerText||n.textContent)),e.ctrlKey||s.close())},onmouseover:function(e){var n=t(e.target);n&&n.firstChild?(s.find("#preview").text(n.firstChild.firstChild.data),s.find("#previewTitle").text(n.title)):(s.find("#preview").text(" "),s.find("#previewTitle").text(" "))}};s=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[h,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){s.close()}}]})}var l=tinymce.util.Tools.isArray;return e.addCommand("mceShowCharmap",s),e.addButton("charmap",{icon:"charmap",tooltip:"Special character",cmd:"mceShowCharmap"}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",cmd:"mceShowCharmap",context:"insert"}),{getCharMap:o,insertChar:a}});
@@ -0,0 +1,60 @@
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('code', function(editor) {
14
+ function showDialog() {
15
+ var win = editor.windowManager.open({
16
+ title: "Source code",
17
+ body: {
18
+ type: 'textbox',
19
+ name: 'code',
20
+ multiline: true,
21
+ minWidth: editor.getParam("code_dialog_width", 600),
22
+ minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)),
23
+ spellcheck: false,
24
+ style: 'direction: ltr; text-align: left'
25
+ },
26
+ onSubmit: function(e) {
27
+ // We get a lovely "Wrong document" error in IE 11 if we
28
+ // don't move the focus to the editor before creating an undo
29
+ // transation since it tries to make a bookmark for the current selection
30
+ editor.focus();
31
+
32
+ editor.undoManager.transact(function() {
33
+ editor.setContent(e.data.code);
34
+ });
35
+
36
+ editor.selection.setCursorLocation();
37
+ editor.nodeChanged();
38
+ }
39
+ });
40
+
41
+ // Gecko has a major performance issue with textarea
42
+ // contents so we need to set it when all reflows are done
43
+ win.find('#code').value(editor.getContent({source_view: true}));
44
+ }
45
+
46
+ editor.addCommand("mceCodeEditor", showDialog);
47
+
48
+ editor.addButton('code', {
49
+ icon: 'code',
50
+ tooltip: 'Source code',
51
+ onclick: showDialog
52
+ });
53
+
54
+ editor.addMenuItem('code', {
55
+ icon: 'code',
56
+ text: 'Source code',
57
+ context: 'tools',
58
+ onclick: showDialog
59
+ });
60
+ });
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("code",function(e){function t(){var t=e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){e.focus(),e.undoManager.transact(function(){e.setContent(t.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}});t.find("#code").value(e.getContent({source_view:!0}))}e.addCommand("mceCodeEditor",t),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})});
@@ -0,0 +1,138 @@
1
+ /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
2
+ /**
3
+ * prism.js default theme for JavaScript, CSS and HTML
4
+ * Based on dabblet (http://dabblet.com)
5
+ * @author Lea Verou
6
+ */
7
+
8
+ code[class*="language-"],
9
+ pre[class*="language-"] {
10
+ color: black;
11
+ text-shadow: 0 1px white;
12
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
+ direction: ltr;
14
+ text-align: left;
15
+ white-space: pre;
16
+ word-spacing: normal;
17
+ word-break: normal;
18
+ word-wrap: normal;
19
+ line-height: 1.5;
20
+
21
+ -moz-tab-size: 4;
22
+ -o-tab-size: 4;
23
+ tab-size: 4;
24
+
25
+ -webkit-hyphens: none;
26
+ -moz-hyphens: none;
27
+ -ms-hyphens: none;
28
+ hyphens: none;
29
+ }
30
+
31
+ pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32
+ code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33
+ text-shadow: none;
34
+ background: #b3d4fc;
35
+ }
36
+
37
+ pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38
+ code[class*="language-"]::selection, code[class*="language-"] ::selection {
39
+ text-shadow: none;
40
+ background: #b3d4fc;
41
+ }
42
+
43
+ @media print {
44
+ code[class*="language-"],
45
+ pre[class*="language-"] {
46
+ text-shadow: none;
47
+ }
48
+ }
49
+
50
+ /* Code blocks */
51
+ pre[class*="language-"] {
52
+ padding: 1em;
53
+ margin: .5em 0;
54
+ overflow: auto;
55
+ }
56
+
57
+ :not(pre) > code[class*="language-"],
58
+ pre[class*="language-"] {
59
+ background: #f5f2f0;
60
+ }
61
+
62
+ /* Inline code */
63
+ :not(pre) > code[class*="language-"] {
64
+ padding: .1em;
65
+ border-radius: .3em;
66
+ }
67
+
68
+ .token.comment,
69
+ .token.prolog,
70
+ .token.doctype,
71
+ .token.cdata {
72
+ color: slategray;
73
+ }
74
+
75
+ .token.punctuation {
76
+ color: #999;
77
+ }
78
+
79
+ .namespace {
80
+ opacity: .7;
81
+ }
82
+
83
+ .token.property,
84
+ .token.tag,
85
+ .token.boolean,
86
+ .token.number,
87
+ .token.constant,
88
+ .token.symbol,
89
+ .token.deleted {
90
+ color: #905;
91
+ }
92
+
93
+ .token.selector,
94
+ .token.attr-name,
95
+ .token.string,
96
+ .token.char,
97
+ .token.builtin,
98
+ .token.inserted {
99
+ color: #690;
100
+ }
101
+
102
+ .token.operator,
103
+ .token.entity,
104
+ .token.url,
105
+ .language-css .token.string,
106
+ .style .token.string {
107
+ color: #a67f59;
108
+ background: hsla(0, 0%, 100%, .5);
109
+ }
110
+
111
+ .token.atrule,
112
+ .token.attr-value,
113
+ .token.keyword {
114
+ color: #07a;
115
+ }
116
+
117
+ .token.function {
118
+ color: #DD4A68;
119
+ }
120
+
121
+ .token.regex,
122
+ .token.important,
123
+ .token.variable {
124
+ color: #e90;
125
+ }
126
+
127
+ .token.important,
128
+ .token.bold {
129
+ font-weight: bold;
130
+ }
131
+ .token.italic {
132
+ font-style: italic;
133
+ }
134
+
135
+ .token.entity {
136
+ cursor: help;
137
+ }
138
+
@@ -0,0 +1,1319 @@
1
+ /**
2
+ * Compiled inline version. (Library mode)
3
+ */
4
+
5
+ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
6
+ /*globals $code */
7
+
8
+ (function(exports, undefined) {
9
+ "use strict";
10
+
11
+ var modules = {};
12
+
13
+ function require(ids, callback) {
14
+ var module, defs = [];
15
+
16
+ for (var i = 0; i < ids.length; ++i) {
17
+ module = modules[ids[i]] || resolve(ids[i]);
18
+ if (!module) {
19
+ throw 'module definition dependecy not found: ' + ids[i];
20
+ }
21
+
22
+ defs.push(module);
23
+ }
24
+
25
+ callback.apply(null, defs);
26
+ }
27
+
28
+ function define(id, dependencies, definition) {
29
+ if (typeof id !== 'string') {
30
+ throw 'invalid module definition, module id must be defined and be a string';
31
+ }
32
+
33
+ if (dependencies === undefined) {
34
+ throw 'invalid module definition, dependencies must be specified';
35
+ }
36
+
37
+ if (definition === undefined) {
38
+ throw 'invalid module definition, definition function must be specified';
39
+ }
40
+
41
+ require(dependencies, function() {
42
+ modules[id] = definition.apply(null, arguments);
43
+ });
44
+ }
45
+
46
+ function defined(id) {
47
+ return !!modules[id];
48
+ }
49
+
50
+ function resolve(id) {
51
+ var target = exports;
52
+ var fragments = id.split(/[.\/]/);
53
+
54
+ for (var fi = 0; fi < fragments.length; ++fi) {
55
+ if (!target[fragments[fi]]) {
56
+ return;
57
+ }
58
+
59
+ target = target[fragments[fi]];
60
+ }
61
+
62
+ return target;
63
+ }
64
+
65
+ function expose(ids) {
66
+ var i, target, id, fragments, privateModules;
67
+
68
+ for (i = 0; i < ids.length; i++) {
69
+ target = exports;
70
+ id = ids[i];
71
+ fragments = id.split(/[.\/]/);
72
+
73
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
74
+ if (target[fragments[fi]] === undefined) {
75
+ target[fragments[fi]] = {};
76
+ }
77
+
78
+ target = target[fragments[fi]];
79
+ }
80
+
81
+ target[fragments[fragments.length - 1]] = modules[id];
82
+ }
83
+
84
+ // Expose private modules for unit tests
85
+ if (exports.AMDLC_TESTS) {
86
+ privateModules = exports.privateModules || {};
87
+
88
+ for (id in modules) {
89
+ privateModules[id] = modules[id];
90
+ }
91
+
92
+ for (i = 0; i < ids.length; i++) {
93
+ delete privateModules[ids[i]];
94
+ }
95
+
96
+ exports.privateModules = privateModules;
97
+ }
98
+ }
99
+
100
+ // Included from: js/tinymce/plugins/codesample/classes/Prism.js
101
+
102
+ /**
103
+ * Prism.js
104
+ *
105
+ * Released under LGPL License.
106
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
107
+ *
108
+ * License: http://www.tinymce.com/license
109
+ * Contributing: http://www.tinymce.com/contributing
110
+ *
111
+ * Import of prism. Disabled DOMContentLoaded event listener.
112
+ */
113
+
114
+ define("tinymce/codesampleplugin/Prism", [], function() {
115
+ var window = {};
116
+ // ------------------ Start wrap
117
+
118
+ /* http://prismjs.com/download.html?themes=prism-dark&languages=markup+css+clike+javascript+c+csharp+cpp+java+php+python+ruby */
119
+ var _self = (typeof window !== 'undefined')
120
+ ? window // if in browser
121
+ : (
122
+ (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
123
+ ? self // if in worker
124
+ : {} // if in node js
125
+ );
126
+
127
+ /**
128
+ * Prism: Lightweight, robust, elegant syntax highlighting
129
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
130
+ * @author Lea Verou http://lea.verou.me
131
+ */
132
+
133
+ var Prism = (function(){
134
+
135
+ // Private helper vars
136
+ var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
137
+
138
+ var _ = _self.Prism = {
139
+ util: {
140
+ encode: function (tokens) {
141
+ if (tokens instanceof Token) {
142
+ return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
143
+ } else if (_.util.type(tokens) === 'Array') {
144
+ return tokens.map(_.util.encode);
145
+ } else {
146
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
147
+ }
148
+ },
149
+
150
+ type: function (o) {
151
+ return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
152
+ },
153
+
154
+ // Deep clone a language definition (e.g. to extend it)
155
+ clone: function (o) {
156
+ var type = _.util.type(o);
157
+
158
+ switch (type) {
159
+ case 'Object':
160
+ var clone = {};
161
+
162
+ for (var key in o) {
163
+ if (o.hasOwnProperty(key)) {
164
+ clone[key] = _.util.clone(o[key]);
165
+ }
166
+ }
167
+
168
+ return clone;
169
+
170
+ case 'Array':
171
+ // Check for existence for IE8
172
+ return o.map && o.map(function(v) { return _.util.clone(v); });
173
+ }
174
+
175
+ return o;
176
+ }
177
+ },
178
+
179
+ languages: {
180
+ extend: function (id, redef) {
181
+ var lang = _.util.clone(_.languages[id]);
182
+
183
+ for (var key in redef) {
184
+ lang[key] = redef[key];
185
+ }
186
+
187
+ return lang;
188
+ },
189
+
190
+ /**
191
+ * Insert a token before another token in a language literal
192
+ * As this needs to recreate the object (we cannot actually insert before keys in object literals),
193
+ * we cannot just provide an object, we need anobject and a key.
194
+ * @param inside The key (or language id) of the parent
195
+ * @param before The key to insert before. If not provided, the function appends instead.
196
+ * @param insert Object with the key/value pairs to insert
197
+ * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted.
198
+ */
199
+ insertBefore: function (inside, before, insert, root) {
200
+ root = root || _.languages;
201
+ var grammar = root[inside];
202
+
203
+ if (arguments.length == 2) {
204
+ insert = arguments[1];
205
+
206
+ for (var newToken in insert) {
207
+ if (insert.hasOwnProperty(newToken)) {
208
+ grammar[newToken] = insert[newToken];
209
+ }
210
+ }
211
+
212
+ return grammar;
213
+ }
214
+
215
+ var ret = {};
216
+
217
+ for (var token in grammar) {
218
+
219
+ if (grammar.hasOwnProperty(token)) {
220
+
221
+ if (token == before) {
222
+
223
+ for (var newToken in insert) {
224
+
225
+ if (insert.hasOwnProperty(newToken)) {
226
+ ret[newToken] = insert[newToken];
227
+ }
228
+ }
229
+ }
230
+
231
+ ret[token] = grammar[token];
232
+ }
233
+ }
234
+
235
+ // Update references in other language definitions
236
+ _.languages.DFS(_.languages, function(key, value) {
237
+ if (value === root[inside] && key != inside) {
238
+ this[key] = ret;
239
+ }
240
+ });
241
+
242
+ return root[inside] = ret;
243
+ },
244
+
245
+ // Traverse a language definition with Depth First Search
246
+ DFS: function(o, callback, type) {
247
+ for (var i in o) {
248
+ if (o.hasOwnProperty(i)) {
249
+ callback.call(o, i, o[i], type || i);
250
+
251
+ if (_.util.type(o[i]) === 'Object') {
252
+ _.languages.DFS(o[i], callback);
253
+ }
254
+ else if (_.util.type(o[i]) === 'Array') {
255
+ _.languages.DFS(o[i], callback, i);
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ plugins: {},
262
+
263
+ highlightAll: function(async, callback) {
264
+ var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
265
+
266
+ for (var i=0, element; element = elements[i++];) {
267
+ _.highlightElement(element, async === true, callback);
268
+ }
269
+ },
270
+
271
+ highlightElement: function(element, async, callback) {
272
+ // Find language
273
+ var language, grammar, parent = element;
274
+
275
+ while (parent && !lang.test(parent.className)) {
276
+ parent = parent.parentNode;
277
+ }
278
+
279
+ if (parent) {
280
+ language = (parent.className.match(lang) || [,''])[1];
281
+ grammar = _.languages[language];
282
+ }
283
+
284
+ // Set language on the element, if not present
285
+ element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
286
+
287
+ // Set language on the parent, for styling
288
+ parent = element.parentNode;
289
+
290
+ if (/pre/i.test(parent.nodeName)) {
291
+ parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
292
+ }
293
+
294
+ var code = element.textContent;
295
+
296
+ var env = {
297
+ element: element,
298
+ language: language,
299
+ grammar: grammar,
300
+ code: code
301
+ };
302
+
303
+ if (!code || !grammar) {
304
+ _.hooks.run('complete', env);
305
+ return;
306
+ }
307
+
308
+ _.hooks.run('before-highlight', env);
309
+
310
+ if (async && _self.Worker) {
311
+ var worker = new Worker(_.filename);
312
+
313
+ worker.onmessage = function(evt) {
314
+ env.highlightedCode = evt.data;
315
+
316
+ _.hooks.run('before-insert', env);
317
+
318
+ env.element.innerHTML = env.highlightedCode;
319
+
320
+ callback && callback.call(env.element);
321
+ _.hooks.run('after-highlight', env);
322
+ _.hooks.run('complete', env);
323
+ };
324
+
325
+ worker.postMessage(JSON.stringify({
326
+ language: env.language,
327
+ code: env.code,
328
+ immediateClose: true
329
+ }));
330
+ }
331
+ else {
332
+ env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
333
+
334
+ _.hooks.run('before-insert', env);
335
+
336
+ env.element.innerHTML = env.highlightedCode;
337
+
338
+ callback && callback.call(element);
339
+
340
+ _.hooks.run('after-highlight', env);
341
+ _.hooks.run('complete', env);
342
+ }
343
+ },
344
+
345
+ highlight: function (text, grammar, language) {
346
+ var tokens = _.tokenize(text, grammar);
347
+ return Token.stringify(_.util.encode(tokens), language);
348
+ },
349
+
350
+ tokenize: function(text, grammar, language) {
351
+ var Token = _.Token;
352
+
353
+ var strarr = [text];
354
+
355
+ var rest = grammar.rest;
356
+
357
+ if (rest) {
358
+ for (var token in rest) {
359
+ grammar[token] = rest[token];
360
+ }
361
+
362
+ delete grammar.rest;
363
+ }
364
+
365
+ tokenloop: for (var token in grammar) {
366
+ if(!grammar.hasOwnProperty(token) || !grammar[token]) {
367
+ continue;
368
+ }
369
+
370
+ var patterns = grammar[token];
371
+ patterns = (_.util.type(patterns) === "Array") ? patterns : [patterns];
372
+
373
+ for (var j = 0; j < patterns.length; ++j) {
374
+ var pattern = patterns[j],
375
+ inside = pattern.inside,
376
+ lookbehind = !!pattern.lookbehind,
377
+ lookbehindLength = 0,
378
+ alias = pattern.alias;
379
+
380
+ pattern = pattern.pattern || pattern;
381
+
382
+ for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop
383
+
384
+ var str = strarr[i];
385
+
386
+ if (strarr.length > text.length) {
387
+ // Something went terribly wrong, ABORT, ABORT!
388
+ break tokenloop;
389
+ }
390
+
391
+ if (str instanceof Token) {
392
+ continue;
393
+ }
394
+
395
+ pattern.lastIndex = 0;
396
+
397
+ var match = pattern.exec(str);
398
+
399
+ if (match) {
400
+ if(lookbehind) {
401
+ lookbehindLength = match[1].length;
402
+ }
403
+
404
+ var from = match.index - 1 + lookbehindLength,
405
+ match = match[0].slice(lookbehindLength),
406
+ len = match.length,
407
+ to = from + len,
408
+ before = str.slice(0, from + 1),
409
+ after = str.slice(to + 1);
410
+
411
+ var args = [i, 1];
412
+
413
+ if (before) {
414
+ args.push(before);
415
+ }
416
+
417
+ var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias);
418
+
419
+ args.push(wrapped);
420
+
421
+ if (after) {
422
+ args.push(after);
423
+ }
424
+
425
+ Array.prototype.splice.apply(strarr, args);
426
+ }
427
+ }
428
+ }
429
+ }
430
+
431
+ return strarr;
432
+ },
433
+
434
+ hooks: {
435
+ all: {},
436
+
437
+ add: function (name, callback) {
438
+ var hooks = _.hooks.all;
439
+
440
+ hooks[name] = hooks[name] || [];
441
+
442
+ hooks[name].push(callback);
443
+ },
444
+
445
+ run: function (name, env) {
446
+ var callbacks = _.hooks.all[name];
447
+
448
+ if (!callbacks || !callbacks.length) {
449
+ return;
450
+ }
451
+
452
+ for (var i=0, callback; callback = callbacks[i++];) {
453
+ callback(env);
454
+ }
455
+ }
456
+ }
457
+ };
458
+
459
+ var Token = _.Token = function(type, content, alias) {
460
+ this.type = type;
461
+ this.content = content;
462
+ this.alias = alias;
463
+ };
464
+
465
+ Token.stringify = function(o, language, parent) {
466
+ if (typeof o == 'string') {
467
+ return o;
468
+ }
469
+
470
+ if (_.util.type(o) === 'Array') {
471
+ return o.map(function(element) {
472
+ return Token.stringify(element, language, o);
473
+ }).join('');
474
+ }
475
+
476
+ var env = {
477
+ type: o.type,
478
+ content: Token.stringify(o.content, language, parent),
479
+ tag: 'span',
480
+ classes: ['token', o.type],
481
+ attributes: {},
482
+ language: language,
483
+ parent: parent
484
+ };
485
+
486
+ if (env.type == 'comment') {
487
+ env.attributes['spellcheck'] = 'true';
488
+ }
489
+
490
+ if (o.alias) {
491
+ var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
492
+ Array.prototype.push.apply(env.classes, aliases);
493
+ }
494
+
495
+ _.hooks.run('wrap', env);
496
+
497
+ var attributes = '';
498
+
499
+ for (var name in env.attributes) {
500
+ attributes += (attributes ? ' ' : '') + name + '="' + (env.attributes[name] || '') + '"';
501
+ }
502
+
503
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
504
+
505
+ };
506
+
507
+ if (!_self.document) {
508
+ if (!_self.addEventListener) {
509
+ // in Node.js
510
+ return _self.Prism;
511
+ }
512
+ // In worker
513
+ _self.addEventListener('message', function(evt) {
514
+ var message = JSON.parse(evt.data),
515
+ lang = message.language,
516
+ code = message.code,
517
+ immediateClose = message.immediateClose;
518
+
519
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
520
+ if (immediateClose) {
521
+ _self.close();
522
+ }
523
+ }, false);
524
+
525
+ return _self.Prism;
526
+ }
527
+ /*
528
+ // Get current script and highlight
529
+ var script = document.getElementsByTagName('script');
530
+
531
+ script = script[script.length - 1];
532
+
533
+ if (script) {
534
+ _.filename = script.src;
535
+
536
+ if (document.addEventListener && !script.hasAttribute('data-manual')) {
537
+ document.addEventListener('DOMContentLoaded', _.highlightAll);
538
+ }
539
+ }
540
+
541
+ return _self.Prism;
542
+ */
543
+ })();
544
+
545
+ if (typeof module !== 'undefined' && module.exports) {
546
+ module.exports = Prism;
547
+ }
548
+
549
+ // hack for components to work correctly in node.js
550
+ if (typeof global !== 'undefined') {
551
+ global.Prism = Prism;
552
+ }
553
+ ;
554
+ Prism.languages.markup = {
555
+ 'comment': /<!--[\w\W]*?-->/,
556
+ 'prolog': /<\?[\w\W]+?\?>/,
557
+ 'doctype': /<!DOCTYPE[\w\W]+?>/,
558
+ 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
559
+ 'tag': {
560
+ pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
561
+ inside: {
562
+ 'tag': {
563
+ pattern: /^<\/?[^\s>\/]+/i,
564
+ inside: {
565
+ 'punctuation': /^<\/?/,
566
+ 'namespace': /^[^\s>\/:]+:/
567
+ }
568
+ },
569
+ 'attr-value': {
570
+ pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
571
+ inside: {
572
+ 'punctuation': /[=>"']/
573
+ }
574
+ },
575
+ 'punctuation': /\/?>/,
576
+ 'attr-name': {
577
+ pattern: /[^\s>\/]+/,
578
+ inside: {
579
+ 'namespace': /^[^\s>\/:]+:/
580
+ }
581
+ }
582
+
583
+ }
584
+ },
585
+ 'entity': /&#?[\da-z]{1,8};/i
586
+ };
587
+
588
+ // Plugin to make entity title show the real entity, idea by Roman Komarov
589
+ Prism.hooks.add('wrap', function(env) {
590
+
591
+ if (env.type === 'entity') {
592
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
593
+ }
594
+ });
595
+
596
+ Prism.languages.xml = Prism.languages.markup;
597
+ Prism.languages.html = Prism.languages.markup;
598
+ Prism.languages.mathml = Prism.languages.markup;
599
+ Prism.languages.svg = Prism.languages.markup;
600
+
601
+ Prism.languages.css = {
602
+ 'comment': /\/\*[\w\W]*?\*\//,
603
+ 'atrule': {
604
+ pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
605
+ inside: {
606
+ 'rule': /@[\w-]+/
607
+ // See rest below
608
+ }
609
+ },
610
+ 'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
611
+ 'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
612
+ 'string': /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
613
+ 'property': /(\b|\B)[\w-]+(?=\s*:)/i,
614
+ 'important': /\B!important\b/i,
615
+ 'function': /[-a-z0-9]+(?=\()/i,
616
+ 'punctuation': /[(){};:]/
617
+ };
618
+
619
+ Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css);
620
+
621
+ if (Prism.languages.markup) {
622
+ Prism.languages.insertBefore('markup', 'tag', {
623
+ 'style': {
624
+ pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
625
+ inside: {
626
+ 'tag': {
627
+ pattern: /<style[\w\W]*?>|<\/style>/i,
628
+ inside: Prism.languages.markup.tag.inside
629
+ },
630
+ rest: Prism.languages.css
631
+ },
632
+ alias: 'language-css'
633
+ }
634
+ });
635
+
636
+ Prism.languages.insertBefore('inside', 'attr-value', {
637
+ 'style-attr': {
638
+ pattern: /\s*style=("|').*?\1/i,
639
+ inside: {
640
+ 'attr-name': {
641
+ pattern: /^\s*style/i,
642
+ inside: Prism.languages.markup.tag.inside
643
+ },
644
+ 'punctuation': /^\s*=\s*['"]|['"]\s*$/,
645
+ 'attr-value': {
646
+ pattern: /.+/i,
647
+ inside: Prism.languages.css
648
+ }
649
+ },
650
+ alias: 'language-css'
651
+ }
652
+ }, Prism.languages.markup.tag);
653
+ };
654
+ Prism.languages.clike = {
655
+ 'comment': [
656
+ {
657
+ pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
658
+ lookbehind: true
659
+ },
660
+ {
661
+ pattern: /(^|[^\\:])\/\/.*/,
662
+ lookbehind: true
663
+ }
664
+ ],
665
+ 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
666
+ 'class-name': {
667
+ pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
668
+ lookbehind: true,
669
+ inside: {
670
+ punctuation: /(\.|\\)/
671
+ }
672
+ },
673
+ 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
674
+ 'boolean': /\b(true|false)\b/,
675
+ 'function': /[a-z0-9_]+(?=\()/i,
676
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
677
+ 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
678
+ 'punctuation': /[{}[\];(),.:]/
679
+ };
680
+
681
+ Prism.languages.javascript = Prism.languages.extend('clike', {
682
+ 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,
683
+ 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
684
+ // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
685
+ 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
686
+ });
687
+
688
+ Prism.languages.insertBefore('javascript', 'keyword', {
689
+ 'regex': {
690
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
691
+ lookbehind: true
692
+ }
693
+ });
694
+
695
+ Prism.languages.insertBefore('javascript', 'class-name', {
696
+ 'template-string': {
697
+ pattern: /`(?:\\`|\\?[^`])*`/,
698
+ inside: {
699
+ 'interpolation': {
700
+ pattern: /\$\{[^}]+\}/,
701
+ inside: {
702
+ 'interpolation-punctuation': {
703
+ pattern: /^\$\{|\}$/,
704
+ alias: 'punctuation'
705
+ },
706
+ rest: Prism.languages.javascript
707
+ }
708
+ },
709
+ 'string': /[\s\S]+/
710
+ }
711
+ }
712
+ });
713
+
714
+ if (Prism.languages.markup) {
715
+ Prism.languages.insertBefore('markup', 'tag', {
716
+ 'script': {
717
+ pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
718
+ inside: {
719
+ 'tag': {
720
+ pattern: /<script[\w\W]*?>|<\/script>/i,
721
+ inside: Prism.languages.markup.tag.inside
722
+ },
723
+ rest: Prism.languages.javascript
724
+ },
725
+ alias: 'language-javascript'
726
+ }
727
+ });
728
+ }
729
+
730
+ Prism.languages.js = Prism.languages.javascript;
731
+ Prism.languages.c = Prism.languages.extend('clike', {
732
+ 'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
733
+ 'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
734
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
735
+ });
736
+
737
+ Prism.languages.insertBefore('c', 'string', {
738
+ 'macro': {
739
+ // allow for multiline macro definitions
740
+ // spaces after the # character compile fine with gcc
741
+ pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
742
+ lookbehind: true,
743
+ alias: 'property',
744
+ inside: {
745
+ // highlight the path of the include statement as a string
746
+ 'string': {
747
+ pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
748
+ lookbehind: true
749
+ }
750
+ }
751
+ }
752
+ });
753
+
754
+ delete Prism.languages.c['class-name'];
755
+ delete Prism.languages.c['boolean'];
756
+
757
+ Prism.languages.csharp = Prism.languages.extend('clike', {
758
+ 'keyword': /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
759
+ 'string': [
760
+ /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
761
+ /("|')(\\?.)*?\1/
762
+ ],
763
+ 'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
764
+ });
765
+
766
+ Prism.languages.insertBefore('csharp', 'keyword', {
767
+ 'preprocessor': {
768
+ pattern: /(^\s*)#.*/m,
769
+ lookbehind: true
770
+ }
771
+ });
772
+
773
+ Prism.languages.cpp = Prism.languages.extend('c', {
774
+ 'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
775
+ 'boolean': /\b(true|false)\b/,
776
+ 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
777
+ });
778
+
779
+ Prism.languages.insertBefore('cpp', 'keyword', {
780
+ 'class-name': {
781
+ pattern: /(class\s+)[a-z0-9_]+/i,
782
+ lookbehind: true
783
+ }
784
+ });
785
+ Prism.languages.java = Prism.languages.extend('clike', {
786
+ 'keyword': /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
787
+ 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
788
+ 'operator': {
789
+ pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
790
+ lookbehind: true
791
+ }
792
+ });
793
+ /**
794
+ * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
795
+ * Modified by Miles Johnson: http://milesj.me
796
+ *
797
+ * Supports the following:
798
+ * - Extends clike syntax
799
+ * - Support for PHP 5.3+ (namespaces, traits, generators, etc)
800
+ * - Smarter constant and function matching
801
+ *
802
+ * Adds the following new token classes:
803
+ * constant, delimiter, variable, function, package
804
+ */
805
+
806
+ Prism.languages.php = Prism.languages.extend('clike', {
807
+ 'keyword': /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
808
+ 'constant': /\b[A-Z0-9_]{2,}\b/,
809
+ 'comment': {
810
+ pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
811
+ lookbehind: true
812
+ }
813
+ });
814
+
815
+ // Shell-like comments are matched after strings, because they are less
816
+ // common than strings containing hashes...
817
+ Prism.languages.insertBefore('php', 'class-name', {
818
+ 'shell-comment': {
819
+ pattern: /(^|[^\\])#.*/,
820
+ lookbehind: true,
821
+ alias: 'comment'
822
+ }
823
+ });
824
+
825
+ Prism.languages.insertBefore('php', 'keyword', {
826
+ 'delimiter': /\?>|<\?(?:php)?/i,
827
+ 'variable': /\$\w+\b/i,
828
+ 'package': {
829
+ pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
830
+ lookbehind: true,
831
+ inside: {
832
+ punctuation: /\\/
833
+ }
834
+ }
835
+ });
836
+
837
+ // Must be defined after the function pattern
838
+ Prism.languages.insertBefore('php', 'operator', {
839
+ 'property': {
840
+ pattern: /(->)[\w]+/,
841
+ lookbehind: true
842
+ }
843
+ });
844
+
845
+ // Add HTML support of the markup language exists
846
+ if (Prism.languages.markup) {
847
+
848
+ // Tokenize all inline PHP blocks that are wrapped in <?php ?>
849
+ // This allows for easy PHP + markup highlighting
850
+ Prism.hooks.add('before-highlight', function(env) {
851
+ if (env.language !== 'php') {
852
+ return;
853
+ }
854
+
855
+ env.tokenStack = [];
856
+
857
+ env.backupCode = env.code;
858
+ env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function(match) {
859
+ env.tokenStack.push(match);
860
+
861
+ return '{{{PHP' + env.tokenStack.length + '}}}';
862
+ });
863
+ });
864
+
865
+ // Restore env.code for other plugins (e.g. line-numbers)
866
+ Prism.hooks.add('before-insert', function(env) {
867
+ if (env.language === 'php') {
868
+ env.code = env.backupCode;
869
+ delete env.backupCode;
870
+ }
871
+ });
872
+
873
+ // Re-insert the tokens after highlighting
874
+ Prism.hooks.add('after-highlight', function(env) {
875
+ if (env.language !== 'php') {
876
+ return;
877
+ }
878
+
879
+ for (var i = 0, t; t = env.tokenStack[i]; i++) {
880
+ // The replace prevents $$, $&, $`, $', $n, $nn from being interpreted as special patterns
881
+ env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
882
+ }
883
+
884
+ env.element.innerHTML = env.highlightedCode;
885
+ });
886
+
887
+ // Wrap tokens in classes that are missing them
888
+ Prism.hooks.add('wrap', function(env) {
889
+ if (env.language === 'php' && env.type === 'markup') {
890
+ env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, "<span class=\"token php\">$1</span>");
891
+ }
892
+ });
893
+
894
+ // Add the rules before all others
895
+ Prism.languages.insertBefore('php', 'comment', {
896
+ 'markup': {
897
+ pattern: /<[^?]\/?(.*?)>/,
898
+ inside: Prism.languages.markup
899
+ },
900
+ 'php': /\{\{\{PHP[0-9]+\}\}\}/
901
+ });
902
+ }
903
+ ;
904
+ Prism.languages.python= {
905
+ 'comment': {
906
+ pattern: /(^|[^\\])#.*/,
907
+ lookbehind: true
908
+ },
909
+ 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
910
+ 'function' : {
911
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
912
+ lookbehind: true
913
+ },
914
+ 'class-name': {
915
+ pattern: /(\bclass\s+)[a-z0-9_]+/i,
916
+ lookbehind: true
917
+ },
918
+ 'keyword' : /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
919
+ 'boolean' : /\b(?:True|False)\b/,
920
+ 'number' : /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
921
+ 'operator' : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
922
+ 'punctuation' : /[{}[\];(),.:]/
923
+ };
924
+
925
+ /**
926
+ * Original by Samuel Flores
927
+ *
928
+ * Adds the following new token classes:
929
+ * constant, builtin, variable, symbol, regex
930
+ */
931
+ (function(Prism) {
932
+ Prism.languages.ruby = Prism.languages.extend('clike', {
933
+ 'comment': /#(?!\{[^\r\n]*?\}).*/,
934
+ 'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
935
+ });
936
+
937
+ var interpolation = {
938
+ pattern: /#\{[^}]+\}/,
939
+ inside: {
940
+ 'delimiter': {
941
+ pattern: /^#\{|\}$/,
942
+ alias: 'tag'
943
+ },
944
+ rest: Prism.util.clone(Prism.languages.ruby)
945
+ }
946
+ };
947
+
948
+ Prism.languages.insertBefore('ruby', 'keyword', {
949
+ 'regex': [
950
+ {
951
+ pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
952
+ inside: {
953
+ 'interpolation': interpolation
954
+ }
955
+ },
956
+ {
957
+ pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
958
+ inside: {
959
+ 'interpolation': interpolation
960
+ }
961
+ },
962
+ {
963
+ // Here we need to specifically allow interpolation
964
+ pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
965
+ inside: {
966
+ 'interpolation': interpolation
967
+ }
968
+ },
969
+ {
970
+ pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
971
+ inside: {
972
+ 'interpolation': interpolation
973
+ }
974
+ },
975
+ {
976
+ pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
977
+ inside: {
978
+ 'interpolation': interpolation
979
+ }
980
+ },
981
+ {
982
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
983
+ lookbehind: true
984
+ }
985
+ ],
986
+ 'variable': /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
987
+ 'symbol': /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
988
+ });
989
+
990
+ Prism.languages.insertBefore('ruby', 'number', {
991
+ 'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
992
+ 'constant': /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
993
+ });
994
+
995
+ Prism.languages.ruby.string = [
996
+ {
997
+ pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
998
+ inside: {
999
+ 'interpolation': interpolation
1000
+ }
1001
+ },
1002
+ {
1003
+ pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
1004
+ inside: {
1005
+ 'interpolation': interpolation
1006
+ }
1007
+ },
1008
+ {
1009
+ // Here we need to specifically allow interpolation
1010
+ pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
1011
+ inside: {
1012
+ 'interpolation': interpolation
1013
+ }
1014
+ },
1015
+ {
1016
+ pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
1017
+ inside: {
1018
+ 'interpolation': interpolation
1019
+ }
1020
+ },
1021
+ {
1022
+ pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
1023
+ inside: {
1024
+ 'interpolation': interpolation
1025
+ }
1026
+ },
1027
+ {
1028
+ pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
1029
+ inside: {
1030
+ 'interpolation': interpolation
1031
+ }
1032
+ }
1033
+ ];
1034
+ }(Prism));
1035
+
1036
+ // ------------------ End wrap
1037
+ return Prism;
1038
+ });
1039
+
1040
+ // Included from: js/tinymce/plugins/codesample/classes/Utils.js
1041
+
1042
+ /**
1043
+ * Utils.js
1044
+ *
1045
+ * Released under LGPL License.
1046
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1047
+ *
1048
+ * License: http://www.tinymce.com/license
1049
+ * Contributing: http://www.tinymce.com/contributing
1050
+ */
1051
+
1052
+ /**
1053
+ * Various utility functions.
1054
+ *
1055
+ * @class tinymce.codesample.Utils
1056
+ * @private
1057
+ */
1058
+ define("tinymce/codesampleplugin/Utils", [
1059
+ ], function() {
1060
+ function isCodeSample(elm) {
1061
+ return elm && elm.nodeName == 'PRE' && elm.className.indexOf('language-') !== -1;
1062
+ }
1063
+
1064
+ function trimArg(predicateFn) {
1065
+ return function(arg1, arg2) {
1066
+ return predicateFn(arg2);
1067
+ };
1068
+ }
1069
+
1070
+ return {
1071
+ isCodeSample: isCodeSample,
1072
+ trimArg: trimArg
1073
+ };
1074
+ });
1075
+
1076
+ // Included from: js/tinymce/plugins/codesample/classes/Dialog.js
1077
+
1078
+ /**
1079
+ * Dialog.js
1080
+ *
1081
+ * Released under LGPL License.
1082
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1083
+ *
1084
+ * License: http://www.tinymce.com/license
1085
+ * Contributing: http://www.tinymce.com/contributing
1086
+ */
1087
+
1088
+ /**
1089
+ * Contains all dialog logic.
1090
+ *
1091
+ * @class tinymce.codesample.Dialog
1092
+ * @private
1093
+ */
1094
+ define("tinymce/codesampleplugin/Dialog", [
1095
+ "tinymce/dom/DOMUtils",
1096
+ "tinymce/codesampleplugin/Utils",
1097
+ "tinymce/codesampleplugin/Prism"
1098
+ ], function(DOMUtils, Utils, Prism) {
1099
+ var DOM = DOMUtils.DOM;
1100
+
1101
+ function getLanguages(editor) {
1102
+ var defaultLanguages = [
1103
+ {text: 'HTML/XML', value: 'markup'},
1104
+ {text: 'JavaScript', value: 'javascript'},
1105
+ {text: 'CSS', value: 'css'},
1106
+ {text: 'PHP', value: 'php'},
1107
+ {text: 'Ruby', value: 'ruby'},
1108
+ {text: 'Python', value: 'python'},
1109
+ {text: 'Java', value: 'java'},
1110
+ {text: 'C', value: 'c'},
1111
+ {text: 'C#', value: 'csharp'},
1112
+ {text: 'C++', value: 'cpp'}
1113
+ ];
1114
+
1115
+ var customLanguages = editor.settings.codesample_languages;
1116
+ return customLanguages ? customLanguages : defaultLanguages;
1117
+ }
1118
+
1119
+ function insertCodeSample(editor, language, code) {
1120
+ editor.undoManager.transact(function() {
1121
+ var node = getSelectedCodeSample(editor);
1122
+
1123
+ code = DOM.encode(code);
1124
+
1125
+ if (node) {
1126
+ editor.dom.setAttrib(node, 'class', 'language-' + language);
1127
+ node.innerHTML = code;
1128
+ Prism.highlightElement(node);
1129
+ editor.selection.select(node);
1130
+ } else {
1131
+ editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
1132
+ editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
1133
+ }
1134
+ });
1135
+ }
1136
+
1137
+ function getSelectedCodeSample(editor) {
1138
+ var node = editor.selection.getNode();
1139
+
1140
+ if (Utils.isCodeSample(node)) {
1141
+ return node;
1142
+ }
1143
+
1144
+ return null;
1145
+ }
1146
+
1147
+ function getCurrentCode(editor) {
1148
+ var node = getSelectedCodeSample(editor);
1149
+
1150
+ if (node) {
1151
+ return node.textContent;
1152
+ }
1153
+
1154
+ return '';
1155
+ }
1156
+
1157
+ function getCurrentLanguage(editor) {
1158
+ var matches, node = getSelectedCodeSample(editor);
1159
+
1160
+ if (node) {
1161
+ matches = node.className.match(/language-(\w+)/);
1162
+ return matches ? matches[1] : '';
1163
+ }
1164
+
1165
+ return '';
1166
+ }
1167
+
1168
+ return {
1169
+ open: function(editor) {
1170
+ editor.windowManager.open({
1171
+ title: "Insert/Edit code sample",
1172
+ minWidth: Math.min(DOM.getViewPort().w, editor.getParam('codesample_dialog_width', 800)),
1173
+ minHeight: Math.min(DOM.getViewPort().h, editor.getParam('codesample_dialog_height', 650)),
1174
+ layout: 'flex',
1175
+ direction: 'column',
1176
+ align: 'stretch',
1177
+ body: [
1178
+ {
1179
+ type: 'listbox',
1180
+ name: 'language',
1181
+ label: 'Language',
1182
+ maxWidth: 200,
1183
+ value: getCurrentLanguage(editor),
1184
+ values: getLanguages(editor)
1185
+ },
1186
+
1187
+ {
1188
+ type: 'textbox',
1189
+ name: 'code',
1190
+ multiline: true,
1191
+ spellcheck: false,
1192
+ ariaLabel: 'Code view',
1193
+ flex: 1,
1194
+ style: 'direction: ltr; text-align: left',
1195
+ classes: 'monospace',
1196
+ value: getCurrentCode(editor),
1197
+ autofocus: true
1198
+ }
1199
+ ],
1200
+ onSubmit: function(e) {
1201
+ insertCodeSample(editor, e.data.language, e.data.code);
1202
+ }
1203
+ });
1204
+ }
1205
+ };
1206
+ });
1207
+
1208
+ // Included from: js/tinymce/plugins/codesample/classes/Plugin.js
1209
+
1210
+ /**
1211
+ * Plugin.js
1212
+ *
1213
+ * Released under LGPL License.
1214
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1215
+ *
1216
+ * License: http://www.tinymce.com/license
1217
+ * Contributing: http://www.tinymce.com/contributing
1218
+ */
1219
+
1220
+ /**
1221
+ * Main plugin logic.
1222
+ *
1223
+ * @class tinymce.codesample.Plugin
1224
+ * @private
1225
+ */
1226
+ define("tinymce/codesampleplugin/Plugin", [
1227
+ "tinymce/Env",
1228
+ "tinymce/PluginManager",
1229
+ "tinymce/codesampleplugin/Prism",
1230
+ "tinymce/codesampleplugin/Dialog",
1231
+ "tinymce/codesampleplugin/Utils"
1232
+ ], function(Env, PluginManager, Prism, Dialog, Utils) {
1233
+ var addedInlineCss, trimArg = Utils.trimArg;
1234
+
1235
+ PluginManager.add('codesample', function(editor, pluginUrl) {
1236
+ var $ = editor.$, addedCss;
1237
+
1238
+ if (!Env.ceFalse) {
1239
+ return;
1240
+ }
1241
+
1242
+ // Todo: use a proper css loader here
1243
+ function loadCss() {
1244
+ var linkElm;
1245
+
1246
+ if (editor.inline && addedInlineCss) {
1247
+ return;
1248
+ }
1249
+
1250
+ if (!editor.inline && addedCss) {
1251
+ return;
1252
+ }
1253
+
1254
+ if (editor.inline) {
1255
+ addedInlineCss = true;
1256
+ } else {
1257
+ addedCss = true;
1258
+ }
1259
+
1260
+ linkElm = editor.dom.create('link', {
1261
+ rel: 'stylesheet',
1262
+ href: pluginUrl + '/css/prism.css'
1263
+ });
1264
+
1265
+ editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
1266
+ }
1267
+
1268
+ editor.on('PreProcess', function(e) {
1269
+ $('pre[contenteditable=false]', e.node).
1270
+ filter(trimArg(Utils.isCodeSample)).
1271
+ each(function(idx, elm) {
1272
+ var $elm = $(elm), code = elm.textContent;
1273
+
1274
+ $elm.attr('class', $.trim($elm.attr('class')));
1275
+ $elm.removeAttr('contentEditable');
1276
+
1277
+ $elm.empty().append($('<code></code>').each(function() {
1278
+ // Needs to be textContent since innerText produces BR:s
1279
+ this.textContent = code;
1280
+ }));
1281
+ });
1282
+ });
1283
+
1284
+ editor.on('SetContent', function() {
1285
+ var unprocessedCodeSamples = $('pre').filter(trimArg(Utils.isCodeSample)).filter(function(idx, elm) {
1286
+ return elm.contentEditable !== "false";
1287
+ });
1288
+
1289
+ if (unprocessedCodeSamples.length) {
1290
+ editor.undoManager.transact(function() {
1291
+ unprocessedCodeSamples.each(function(idx, elm) {
1292
+ $(elm).find('br').each(function(idx, elm) {
1293
+ elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
1294
+ });
1295
+
1296
+ elm.contentEditable = false;
1297
+ elm.innerHTML = editor.dom.encode(elm.textContent);
1298
+ Prism.highlightElement(elm);
1299
+ elm.className = $.trim(elm.className);
1300
+ });
1301
+ });
1302
+ }
1303
+ });
1304
+
1305
+ editor.addCommand('codesample', function() {
1306
+ Dialog.open(editor);
1307
+ });
1308
+
1309
+ editor.addButton('codesample', {
1310
+ cmd: 'codesample',
1311
+ title: 'Insert/Edit code sample'
1312
+ });
1313
+
1314
+ editor.on('init', loadCss);
1315
+ });
1316
+ });
1317
+
1318
+ expose(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"]);
1319
+ })(this);