locomotivecms 3.0.1 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -2
- data/app/api/locomotive/api.rb +4 -0
- data/app/api/locomotive/api/entities/site_entity.rb +8 -0
- data/app/api/locomotive/api/forms/site_form.rb +1 -1
- data/app/api/locomotive/api/helpers/params_helper.rb +14 -3
- data/app/api/locomotive/api/middlewares/logger_middleware.rb +1 -3
- data/app/api/locomotive/api/resources/current_site_resource.rb +3 -1
- data/app/api/locomotive/api/resources/page_resource.rb +2 -2
- data/app/api/locomotive/api/resources/site_resource.rb +4 -0
- data/app/assets/images/locomotive/blank.png +0 -0
- data/app/assets/images/locomotive/icons/flags/bf.png +0 -0
- data/app/assets/images/locomotive/icons/flags/bg.png +0 -0
- data/app/assets/images/locomotive/icons/flags/cs.png +0 -0
- data/app/assets/images/locomotive/icons/flags/de.png +0 -0
- data/app/assets/images/locomotive/icons/flags/en.png +0 -0
- data/app/assets/images/locomotive/icons/flags/es.png +0 -0
- data/app/assets/images/locomotive/icons/flags/et.png +0 -0
- data/app/assets/images/locomotive/icons/flags/fr.png +0 -0
- data/app/assets/images/locomotive/icons/flags/it.png +0 -0
- data/app/assets/images/locomotive/icons/flags/ja.png +0 -0
- data/app/assets/images/locomotive/icons/flags/lt.png +0 -0
- data/app/assets/images/locomotive/icons/flags/mg.png +0 -0
- data/app/assets/images/locomotive/icons/flags/nb.png +0 -0
- data/app/assets/images/locomotive/icons/flags/nl.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pl.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pt-BR.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pt.png +0 -0
- data/app/assets/images/locomotive/icons/flags/ru.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sk.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sr.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sv.png +0 -0
- data/app/assets/images/locomotive/icons/flags/zh-CN.png +0 -0
- data/app/assets/javascripts/locomotive.js +3 -1
- data/app/assets/javascripts/locomotive/utils/core_ext.js +10 -0
- data/app/assets/javascripts/locomotive/utils/wysihtml5.js.coffee +0 -16
- data/app/assets/javascripts/locomotive/views/application_view.js.coffee +20 -3
- data/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee +7 -0
- data/app/assets/javascripts/locomotive/views/current_site_metafields/index_view.js.coffee +7 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/edit_view.js.coffee +2 -2
- data/app/assets/javascripts/locomotive/views/editable_elements/iframe_view.js.coffee +10 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +11 -6
- data/app/assets/javascripts/locomotive/views/editable_elements/text_highlighter_view.js.coffee +6 -1
- data/app/assets/javascripts/locomotive/views/inputs/file_view.js.coffee +1 -8
- data/app/assets/javascripts/locomotive/views/inputs/image_view.js.coffee +84 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee +2 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +5 -3
- data/app/assets/javascripts/locomotive/views/inputs/rte/image_view.js.coffee +14 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +9 -3
- data/app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee +7 -2
- data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +19 -6
- data/app/assets/javascripts/locomotive/views/inputs/simple_image_view.js.coffee +17 -40
- data/app/assets/javascripts/locomotive/views/shared/drawer_view.js.coffee +8 -6
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +30 -8
- data/app/assets/javascripts/locomotive/views/shared/sidebar_view.js.coffee +31 -2
- data/app/assets/stylesheets/locomotive/account.scss +14 -10
- data/app/assets/stylesheets/locomotive/application.scss +101 -24
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +48 -4
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -2
- data/app/assets/stylesheets/locomotive/new/_actionbar.scss +83 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_brand.scss +0 -0
- data/app/assets/stylesheets/locomotive/new/_content.scss +65 -0
- data/app/assets/stylesheets/locomotive/new/_drawer.scss +53 -0
- data/app/assets/stylesheets/locomotive/new/_files.scss +124 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_forms.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_keyframes.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_navigation.scss +85 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_navs.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_notify.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_public.scss +0 -0
- data/app/assets/stylesheets/locomotive/new/_sidebar.scss +177 -0
- data/app/assets/stylesheets/locomotive/new/_transitions.scss +96 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_type.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_variables.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_activity_feed.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/_buttons.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_content_assets.scss +49 -48
- data/app/assets/stylesheets/locomotive/{components → old}/_dashboard.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_developers.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_list.scss +15 -21
- data/app/assets/stylesheets/locomotive/old/_live_editing.scss +37 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_main.scss +4 -14
- data/app/assets/stylesheets/locomotive/{base → old}/_nav.scss +0 -0
- data/app/assets/stylesheets/locomotive/old/_scrollable.scss +11 -0
- data/app/assets/stylesheets/locomotive/{components/misc/_nav.scss → old/_search_bars.scss} +8 -14
- data/app/assets/stylesheets/locomotive/{components → old}/_translations.scss +0 -0
- data/app/assets/stylesheets/locomotive/{globals → old}/_variables.scss +47 -12
- data/app/assets/stylesheets/locomotive/{base → old}/form/_array_input.scss +20 -27
- data/app/assets/stylesheets/locomotive/{base → old}/form/_base.scss +1 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_code.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_color_input.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_document_picker.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_file_input.scss +14 -20
- data/app/assets/stylesheets/locomotive/{base → old}/form/_link.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_markdown.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_popover.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_rte.scss +8 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_select2.scss +35 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_tags.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_toggle.scss +4 -10
- data/app/controllers/locomotive/content_entries_controller.rb +1 -1
- data/app/controllers/locomotive/current_site_metafields_controller.rb +34 -0
- data/app/controllers/locomotive/custom_fields/select_options_controller.rb +4 -0
- data/app/controllers/locomotive/pages_controller.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +13 -0
- data/app/helpers/locomotive/current_site_metafields_helper.rb +126 -0
- data/app/helpers/locomotive/my_account_helper.rb +1 -1
- data/app/helpers/locomotive/shared/pages_helper.rb +4 -0
- data/app/helpers/locomotive/sites_helper.rb +9 -11
- data/app/inputs/locomotive/file_input.rb +3 -3
- data/app/inputs/locomotive/image_input.rb +97 -0
- data/app/inputs/locomotive/rte_input.rb +2 -1
- data/app/inputs/locomotive/simple_image_input.rb +5 -68
- data/app/models/locomotive/concerns/site/metafields.rb +96 -0
- data/app/models/locomotive/editable_text.rb +2 -1
- data/app/models/locomotive/site.rb +1 -0
- data/app/policies/locomotive/page_policy.rb +6 -0
- data/app/services/locomotive/content_entry_service.rb +3 -0
- data/app/services/locomotive/site_metafields_service.rb +39 -0
- data/app/views/locomotive/current_site/edit.html.slim +3 -0
- data/app/views/locomotive/current_site_metafields/form/_panes.html.slim +19 -0
- data/app/views/locomotive/current_site_metafields/form/_tabs.html.slim +6 -0
- data/app/views/locomotive/current_site_metafields/index.html.slim +26 -0
- data/app/views/locomotive/editable_elements/_form.html.slim +1 -1
- data/app/views/locomotive/layouts/application.html.slim +22 -19
- data/app/views/locomotive/layouts/live_editing.html.slim +19 -30
- data/app/views/locomotive/pages/form/_main.html.slim +3 -0
- data/app/views/locomotive/shared/_account_navigation.slim +9 -2
- data/app/views/locomotive/shared/_head.html.slim +4 -0
- data/app/views/locomotive/shared/_locale_picker_link.html.slim +1 -1
- data/app/views/locomotive/shared/_navigation.html.slim +30 -0
- data/app/views/locomotive/shared/_sidebar.html.slim +42 -26
- data/app/views/locomotive/shared/rte/_toolbar.html.slim +76 -68
- data/app/views/locomotive/shared/sidebar/_content_types.html.slim +11 -11
- data/app/views/locomotive/shared/sidebar/_link.html.slim +0 -3
- data/app/views/locomotive/shared/sidebar/_page.html.slim +8 -13
- data/app/views/locomotive/shared/sidebar/_pages.html.slim +4 -7
- data/app/views/locomotive/sites/index.html.slim +0 -1
- data/config/locales/carrierwave.cs.yml +4 -0
- data/config/locales/carrierwave.de.yml +4 -0
- data/config/locales/cs.yml +318 -0
- data/config/locales/de.yml +318 -0
- data/config/locales/default.cs.yml +13 -0
- data/config/locales/default.de.yml +13 -0
- data/config/locales/default.fr.yml +13 -1
- data/config/locales/devise.cs.yml +61 -0
- data/config/locales/devise.de.yml +61 -0
- data/config/locales/devise.fr.yml +61 -1
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +9 -0
- data/config/locales/flash.cs.yml +79 -0
- data/config/locales/flash.de.yml +79 -0
- data/config/locales/flash.en.yml +4 -0
- data/config/locales/flash.fr.yml +82 -1
- data/config/locales/fr.yml +323 -0
- data/config/locales/inputs.cs.yml +19 -0
- data/config/locales/inputs.de.yml +19 -0
- data/config/locales/inputs.fr.yml +19 -1
- data/config/locales/mongoid.cs.yml +47 -0
- data/config/locales/mongoid.de.yml +38 -0
- data/config/locales/mongoid.fr.yml +35 -0
- data/config/locales/simple_form.cs.yml +152 -0
- data/config/locales/simple_form.de.yml +36 -0
- data/config/locales/simple_form.el.yml +0 -1
- data/config/locales/simple_form.fr.yml +153 -1
- data/config/routes.rb +4 -0
- data/lib/generators/locomotive/install/templates/locomotive.rb +2 -2
- data/lib/locomotive/configuration.rb +1 -1
- data/lib/locomotive/dependencies.rb +1 -0
- data/lib/locomotive/engine.rb +0 -1
- data/lib/locomotive/middlewares/site.rb +1 -1
- data/lib/locomotive/mongoid/patches.rb +8 -0
- data/lib/locomotive/steam/middlewares/page_editing.rb +1 -1
- data/lib/locomotive/version.rb +1 -1
- data/spec/dummy/config/initializers/locomotive.rb +1 -1
- data/spec/models/locomotive/concerns/site/metafields_spec.rb +121 -0
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- data/vendor/assets/components/locomotive/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.css +5 -0
- data/vendor/assets/components/locomotive/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.js +9 -0
- data/vendor/assets/components/locomotive/moment-timezone/moment-timezone.js +7 -0
- data/vendor/assets/components/locomotive/moment/moment.js +3606 -0
- data/vendor/assets/components/locomotive/select2/select2.js +0 -3
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/CONTRIBUTING.md +38 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/Gruntfile.js +191 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/LICENSE +21 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/README.md +37 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/bower.json +35 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker-standalone.css +103 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css +373 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css +5 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js +9 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/component.json +9 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/composer.json +28 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ChangeLog.md +222 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ContributorsGuide.md +126 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Events.md +96 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Extras.md +95 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/FAQ.md +22 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Functions.md +670 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Installing.md +161 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Options.md +473 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Changelog.md +6 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Contributors guide.md +6 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/index.md +592 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/mkdocs.yml +17 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/package.json +43 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +2552 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less +352 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less +17 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec +34 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.nuspec +34 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe +0 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/install.ps1 +2 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +343 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/tasks/bump_version.js +88 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/LICENSE +20 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/README.md +36 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/bower.json +18 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.js +1189 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.js +1189 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone.min.js +6 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/changelog.md +101 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/composer.json +43 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/meta/latest.json +5012 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/packed/latest.json +590 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/unpacked/latest.json +124081 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone-utils.js +316 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone.js +599 -0
- data/vendor/assets/components/locomotive_sources/moment/CHANGELOG.md +496 -0
- data/vendor/assets/components/locomotive_sources/moment/LICENSE +22 -0
- data/vendor/assets/components/locomotive_sources/moment/README.md +58 -0
- data/vendor/assets/components/locomotive_sources/moment/bower.json +22 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/af.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-ma.js +59 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-sa.js +103 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-tn.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar.js +136 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/az.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/be.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bg.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bn.js +113 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bo.js +110 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/br.js +107 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bs.js +141 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ca.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cs.js +171 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cv.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cy.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/da.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/de-at.js +77 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/de.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/dv.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/el.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-au.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-ca.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-gb.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-ie.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-nz.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/eo.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/es.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/et.js +80 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/eu.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fa.js +105 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fi.js +107 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fo.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr-ca.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr-ch.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fy.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/gd.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/gl.js +75 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/he.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hi.js +123 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hr.js +143 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hu.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hy-am.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/id.js +83 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/is.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/it.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ja.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/jv.js +83 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ka.js +89 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/kk.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/km.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ko.js +68 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lb.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lo.js +69 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lt.js +115 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lv.js +96 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/me.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/mk.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ml.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/mr.js +158 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ms-my.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ms.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/my.js +93 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nb.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ne.js +121 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nl.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nn.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pl.js +105 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pt-br.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pt.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ro.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ru.js +166 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/se.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/si.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sk.js +150 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sl.js +160 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sq.js +69 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sr-cyrl.js +108 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sr.js +108 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sv.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sw.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ta.js +129 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/te.js +88 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/th.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tl-ph.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tlh.js +119 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tr.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzl.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzm-latn.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzm.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/uk.js +146 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/uz.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/vi.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/zh-cn.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/zh-tw.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/min/locales.js +7548 -0
- data/vendor/assets/components/locomotive_sources/moment/min/locales.min.js +72 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.js +11144 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.min.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/min/tests.js +46196 -0
- data/vendor/assets/components/locomotive_sources/moment/moment.js +3606 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/check-overflow.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/date-from-array.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-anything.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-array.js +136 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-object.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-array.js +50 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-format.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string.js +120 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/local.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/parsing-flags.js +22 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/utc.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/valid.js +37 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/abs.js +18 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/add-subtract.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/as.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/bubble.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/constructor.js +41 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/create.js +117 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/duration.js +12 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/get.js +25 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/humanize.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/iso-string.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/prototype.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/format/format.js +92 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/calendar.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/constructor.js +2 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/en.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/formats.js +23 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/invalid.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/lists.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locale.js +35 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locales.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/ordinal.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/pre-post-format.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/prototype.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/relative.js +29 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/set.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/add-subtract.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/calendar.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/clone.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/compare.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/constructor.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/creation-data.js +9 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/diff.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/format.js +28 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/from.js +17 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/get-set.js +43 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/min-max.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/moment.js +28 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/now.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/prototype.js +149 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/start-end-of.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to-type.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to.js +17 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/valid.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/regex.js +54 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/token.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/aliases.js +29 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/constants.js +9 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-month.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-week.js +162 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-year.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/hour.js +129 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/millisecond.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/minute.js +24 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/month.js +209 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/offset.js +219 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/quarter.js +27 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/second.js +24 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timestamp.js +20 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timezone.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/units.js +20 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-calendar-utils.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-year.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/year.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-ceil.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-floor.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/compare-arrays.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/defaults.js +10 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/deprecate.js +33 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/extend.js +19 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/has-own-prop.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/hooks.js +13 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-array.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-date.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-function.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-undefined.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/map.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/to-int.js +12 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/zero-fill.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/af.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-ma.js +50 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-sa.js +94 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-tn.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/az.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/be.js +125 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bg.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bn.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bo.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/br.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bs.js +132 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ca.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cs.js +162 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cv.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cy.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/da.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/de-at.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/de.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/dv.js +89 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/el.js +86 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-au.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ca.js +54 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-gb.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ie.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-nz.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/eo.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/es.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/et.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/eu.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fa.js +96 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fi.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fo.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ca.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ch.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fy.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/gd.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/gl.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/he.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hi.js +114 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hr.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hu.js +100 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hy-am.js +86 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/id.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/is.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/it.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ja.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/jv.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ka.js +80 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/kk.js +77 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/km.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ko.js +59 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lb.js +125 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lo.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lt.js +106 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lv.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/me.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/mk.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ml.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/mr.js +149 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ms-my.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ms.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/my.js +84 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nb.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ne.js +112 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nl.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nn.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pl.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pt-br.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pt.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ro.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ru.js +156 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/se.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/si.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sk.js +141 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sl.js +150 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sq.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sr-cyrl.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sr.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sv.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sw.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ta.js +120 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/te.js +78 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/th.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tl-ph.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tlh.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tr.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzl.js +78 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm-latn.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/uk.js +137 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/uz.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/vi.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-cn.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-tw.js +91 -0
- data/vendor/assets/components/locomotive_sources/moment/src/moment.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/amd-named.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/amd.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/default.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/globals.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/locale-header.js +6 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/test-header.js +6 -0
- data/vendor/assets/javascripts/locomotive/vendor.js +1 -2
- data/vendor/assets/stylesheets/locomotive/wysihtml5_editor.css +1 -1
- metadata +458 -100
- data/app/assets/stylesheets/locomotive/account/_files.scss +0 -125
- data/app/assets/stylesheets/locomotive/base/_all.scss +0 -6
- data/app/assets/stylesheets/locomotive/base/_fonts.scss +0 -27
- data/app/assets/stylesheets/locomotive/base/_form.scss +0 -18
- data/app/assets/stylesheets/locomotive/base/_iframe.scss +0 -4
- data/app/assets/stylesheets/locomotive/base/_typography.scss +0 -6
- data/app/assets/stylesheets/locomotive/base/form/_api_key.scss +0 -24
- data/app/assets/stylesheets/locomotive/base/form/_date.scss +0 -11
- data/app/assets/stylesheets/locomotive/components/_drawer.scss +0 -24
- data/app/assets/stylesheets/locomotive/components/_header.scss +0 -3
- data/app/assets/stylesheets/locomotive/components/_live_editing.scss +0 -95
- data/app/assets/stylesheets/locomotive/components/_misc.scss +0 -3
- data/app/assets/stylesheets/locomotive/components/_sidebar.scss +0 -5
- data/app/assets/stylesheets/locomotive/components/_sites.scss +0 -130
- data/app/assets/stylesheets/locomotive/components/_transitions.scss +0 -149
- data/app/assets/stylesheets/locomotive/components/header/_account.scss +0 -63
- data/app/assets/stylesheets/locomotive/components/header/_base.scss +0 -91
- data/app/assets/stylesheets/locomotive/components/header/_responsive.scss +0 -34
- data/app/assets/stylesheets/locomotive/components/misc/_modal.scss +0 -13
- data/app/assets/stylesheets/locomotive/components/misc/_notify.scss +0 -25
- data/app/assets/stylesheets/locomotive/components/sidebar/_base.scss +0 -58
- data/app/assets/stylesheets/locomotive/components/sidebar/_content_types.scss +0 -30
- data/app/assets/stylesheets/locomotive/components/sidebar/_link.scss +0 -36
- data/app/assets/stylesheets/locomotive/components/sidebar/_my_account.scss +0 -21
- data/app/assets/stylesheets/locomotive/components/sidebar/_pages_tree.scss +0 -108
- data/app/assets/stylesheets/locomotive/globals/_mixins.scss +0 -34
- data/app/assets/stylesheets/locomotive/layouts/_live_editing.scss +0 -33
- data/app/assets/stylesheets/locomotive/layouts/_main.scss +0 -62
- data/app/assets/stylesheets/locomotive/layouts/_not_logged_in.scss +0 -33
- data/app/assets/stylesheets/locomotive/layouts/_responsive.scss +0 -12
- data/app/views/locomotive/shared/_header.html.slim +0 -30
- data/app/views/locomotive/shared/_sidebar_without_site.html.slim +0 -5
- data/app/views/locomotive/shared/header/_account.html.slim +0 -4
- data/app/views/locomotive/shared/header/_account_menu.html.slim +0 -5
- data/app/views/locomotive/shared/header/_brand.html.slim +0 -3
- data/app/views/locomotive/shared/header/_site.html.slim +0 -8
- data/app/views/locomotive/shared/sidebar/_my_account.html.slim +0 -8
- data/vendor/assets/javascripts/locomotive/bootstrap-datetimepicker.js +0 -1395
- data/vendor/assets/javascripts/locomotive/moment.js +0 -2808
- data/vendor/assets/stylesheets/locomotive/bootstrap-datetimepicker.css +0 -235
@@ -0,0 +1,316 @@
|
|
1
|
+
//! moment-timezone-utils.js
|
2
|
+
//! version : 0.5.1
|
3
|
+
//! author : Tim Wood
|
4
|
+
//! license : MIT
|
5
|
+
//! github.com/moment/moment-timezone
|
6
|
+
|
7
|
+
(function (root, factory) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
/*global define*/
|
11
|
+
if (typeof define === 'function' && define.amd) {
|
12
|
+
define(['moment'], factory); // AMD
|
13
|
+
} else if (typeof module === 'object' && module.exports) {
|
14
|
+
module.exports = factory(require('./')); // Node
|
15
|
+
} else {
|
16
|
+
factory(root.moment); // Browser
|
17
|
+
}
|
18
|
+
}(this, function (moment) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
if (!moment.tz) {
|
22
|
+
throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");
|
23
|
+
}
|
24
|
+
|
25
|
+
/************************************
|
26
|
+
Pack Base 60
|
27
|
+
************************************/
|
28
|
+
|
29
|
+
var BASE60 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX',
|
30
|
+
EPSILON = 0.000001; // Used to fix floating point rounding errors
|
31
|
+
|
32
|
+
function packBase60Fraction(fraction, precision) {
|
33
|
+
var buffer = '.',
|
34
|
+
output = '',
|
35
|
+
current;
|
36
|
+
|
37
|
+
while (precision > 0) {
|
38
|
+
precision -= 1;
|
39
|
+
fraction *= 60;
|
40
|
+
current = Math.floor(fraction + EPSILON);
|
41
|
+
buffer += BASE60[current];
|
42
|
+
fraction -= current;
|
43
|
+
|
44
|
+
// Only add buffer to output once we have a non-zero value.
|
45
|
+
// This makes '.000' output '', and '.100' output '.1'
|
46
|
+
if (current) {
|
47
|
+
output += buffer;
|
48
|
+
buffer = '';
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
return output;
|
53
|
+
}
|
54
|
+
|
55
|
+
function packBase60(number, precision) {
|
56
|
+
var output = '',
|
57
|
+
absolute = Math.abs(number),
|
58
|
+
whole = Math.floor(absolute),
|
59
|
+
fraction = packBase60Fraction(absolute - whole, Math.min(~~precision, 10));
|
60
|
+
|
61
|
+
while (whole > 0) {
|
62
|
+
output = BASE60[whole % 60] + output;
|
63
|
+
whole = Math.floor(whole / 60);
|
64
|
+
}
|
65
|
+
|
66
|
+
if (number < 0) {
|
67
|
+
output = '-' + output;
|
68
|
+
}
|
69
|
+
|
70
|
+
if (output && fraction) {
|
71
|
+
return output + fraction;
|
72
|
+
}
|
73
|
+
|
74
|
+
if (!fraction && output === '-') {
|
75
|
+
return '0';
|
76
|
+
}
|
77
|
+
|
78
|
+
return output || fraction || '0';
|
79
|
+
}
|
80
|
+
|
81
|
+
/************************************
|
82
|
+
Pack
|
83
|
+
************************************/
|
84
|
+
|
85
|
+
function packUntils(untils) {
|
86
|
+
var out = [],
|
87
|
+
last = 0,
|
88
|
+
i;
|
89
|
+
|
90
|
+
for (i = 0; i < untils.length - 1; i++) {
|
91
|
+
out[i] = packBase60(Math.round((untils[i] - last) / 1000) / 60, 1);
|
92
|
+
last = untils[i];
|
93
|
+
}
|
94
|
+
|
95
|
+
return out.join(' ');
|
96
|
+
}
|
97
|
+
|
98
|
+
function packAbbrsAndOffsets(source) {
|
99
|
+
var index = 0,
|
100
|
+
abbrs = [],
|
101
|
+
offsets = [],
|
102
|
+
indices = [],
|
103
|
+
map = {},
|
104
|
+
i, key;
|
105
|
+
|
106
|
+
for (i = 0; i < source.abbrs.length; i++) {
|
107
|
+
key = source.abbrs[i] + '|' + source.offsets[i];
|
108
|
+
if (map[key] === undefined) {
|
109
|
+
map[key] = index;
|
110
|
+
abbrs[index] = source.abbrs[i];
|
111
|
+
offsets[index] = packBase60(Math.round(source.offsets[i] * 60) / 60, 1);
|
112
|
+
index++;
|
113
|
+
}
|
114
|
+
indices[i] = packBase60(map[key], 0);
|
115
|
+
}
|
116
|
+
|
117
|
+
return abbrs.join(' ') + '|' + offsets.join(' ') + '|' + indices.join('');
|
118
|
+
}
|
119
|
+
|
120
|
+
function packPopulation (number) {
|
121
|
+
if (!number) {
|
122
|
+
return '';
|
123
|
+
}
|
124
|
+
if (number < 1000) {
|
125
|
+
return '|' + number;
|
126
|
+
}
|
127
|
+
var exponent = String(number | 0).length - 2;
|
128
|
+
var precision = Math.round(number / Math.pow(10, exponent));
|
129
|
+
return '|' + precision + 'e' + exponent;
|
130
|
+
}
|
131
|
+
|
132
|
+
function validatePackData (source) {
|
133
|
+
if (!source.name) { throw new Error("Missing name"); }
|
134
|
+
if (!source.abbrs) { throw new Error("Missing abbrs"); }
|
135
|
+
if (!source.untils) { throw new Error("Missing untils"); }
|
136
|
+
if (!source.offsets) { throw new Error("Missing offsets"); }
|
137
|
+
if (
|
138
|
+
source.offsets.length !== source.untils.length ||
|
139
|
+
source.offsets.length !== source.abbrs.length
|
140
|
+
) {
|
141
|
+
throw new Error("Mismatched array lengths");
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
function pack (source) {
|
146
|
+
validatePackData(source);
|
147
|
+
return [
|
148
|
+
source.name,
|
149
|
+
packAbbrsAndOffsets(source),
|
150
|
+
packUntils(source.untils) + packPopulation(source.population)
|
151
|
+
].join('|');
|
152
|
+
}
|
153
|
+
|
154
|
+
/************************************
|
155
|
+
Create Links
|
156
|
+
************************************/
|
157
|
+
|
158
|
+
function arraysAreEqual(a, b) {
|
159
|
+
var i;
|
160
|
+
|
161
|
+
if (a.length !== b.length) { return false; }
|
162
|
+
|
163
|
+
for (i = 0; i < a.length; i++) {
|
164
|
+
if (a[i] !== b[i]) {
|
165
|
+
return false;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
return true;
|
169
|
+
}
|
170
|
+
|
171
|
+
function zonesAreEqual(a, b) {
|
172
|
+
return arraysAreEqual(a.offsets, b.offsets) && arraysAreEqual(a.abbrs, b.abbrs) && arraysAreEqual(a.untils, b.untils);
|
173
|
+
}
|
174
|
+
|
175
|
+
function findAndCreateLinks (input, output, links) {
|
176
|
+
var i, j, a, b, group, foundGroup, groups = [];
|
177
|
+
|
178
|
+
for (i = 0; i < input.length; i++) {
|
179
|
+
foundGroup = false;
|
180
|
+
a = input[i];
|
181
|
+
|
182
|
+
for (j = 0; j < groups.length; j++) {
|
183
|
+
group = groups[j];
|
184
|
+
b = group[0];
|
185
|
+
if (zonesAreEqual(a, b)) {
|
186
|
+
if (a.population > b.population) {
|
187
|
+
group.unshift(a);
|
188
|
+
} else {
|
189
|
+
group.push(a);
|
190
|
+
}
|
191
|
+
foundGroup = true;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
if (!foundGroup) {
|
196
|
+
groups.push([a]);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
for (i = 0; i < groups.length; i++) {
|
201
|
+
group = groups[i];
|
202
|
+
output.push(group[0]);
|
203
|
+
for (j = 1; j < group.length; j++) {
|
204
|
+
links.push(group[0].name + '|' + group[j].name);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
function createLinks (source) {
|
210
|
+
var zones = [],
|
211
|
+
links = [];
|
212
|
+
|
213
|
+
if (source.links) {
|
214
|
+
links = source.links.slice();
|
215
|
+
}
|
216
|
+
|
217
|
+
findAndCreateLinks(source.zones, zones, links);
|
218
|
+
|
219
|
+
return {
|
220
|
+
version : source.version,
|
221
|
+
zones : zones,
|
222
|
+
links : links.sort()
|
223
|
+
};
|
224
|
+
}
|
225
|
+
|
226
|
+
/************************************
|
227
|
+
Filter Years
|
228
|
+
************************************/
|
229
|
+
|
230
|
+
function findStartAndEndIndex (untils, start, end) {
|
231
|
+
var startI = 0,
|
232
|
+
endI = untils.length + 1,
|
233
|
+
untilYear,
|
234
|
+
i;
|
235
|
+
|
236
|
+
if (!end) {
|
237
|
+
end = start;
|
238
|
+
}
|
239
|
+
|
240
|
+
if (start > end) {
|
241
|
+
i = start;
|
242
|
+
start = end;
|
243
|
+
end = i;
|
244
|
+
}
|
245
|
+
|
246
|
+
for (i = 0; i < untils.length; i++) {
|
247
|
+
if (untils[i] == null) {
|
248
|
+
continue;
|
249
|
+
}
|
250
|
+
untilYear = new Date(untils[i]).getUTCFullYear();
|
251
|
+
if (untilYear < start) {
|
252
|
+
startI = i + 1;
|
253
|
+
}
|
254
|
+
if (untilYear > end) {
|
255
|
+
endI = Math.min(endI, i + 1);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
return [startI, endI];
|
260
|
+
}
|
261
|
+
|
262
|
+
function filterYears (source, start, end) {
|
263
|
+
var slice = Array.prototype.slice,
|
264
|
+
indices = findStartAndEndIndex(source.untils, start, end),
|
265
|
+
untils = slice.apply(source.untils, indices);
|
266
|
+
|
267
|
+
untils[untils.length - 1] = null;
|
268
|
+
|
269
|
+
return {
|
270
|
+
name : source.name,
|
271
|
+
abbrs : slice.apply(source.abbrs, indices),
|
272
|
+
untils : untils,
|
273
|
+
offsets : slice.apply(source.offsets, indices),
|
274
|
+
population : source.population
|
275
|
+
};
|
276
|
+
}
|
277
|
+
|
278
|
+
/************************************
|
279
|
+
Filter, Link, and Pack
|
280
|
+
************************************/
|
281
|
+
|
282
|
+
function filterLinkPack (input, start, end) {
|
283
|
+
var i,
|
284
|
+
inputZones = input.zones,
|
285
|
+
outputZones = [],
|
286
|
+
output;
|
287
|
+
|
288
|
+
for (i = 0; i < inputZones.length; i++) {
|
289
|
+
outputZones[i] = filterYears(inputZones[i], start, end);
|
290
|
+
}
|
291
|
+
|
292
|
+
output = createLinks({
|
293
|
+
zones : outputZones,
|
294
|
+
links : input.links.slice(),
|
295
|
+
version : input.version
|
296
|
+
});
|
297
|
+
|
298
|
+
for (i = 0; i < output.zones.length; i++) {
|
299
|
+
output.zones[i] = pack(output.zones[i]);
|
300
|
+
}
|
301
|
+
|
302
|
+
return output;
|
303
|
+
}
|
304
|
+
|
305
|
+
/************************************
|
306
|
+
Exports
|
307
|
+
************************************/
|
308
|
+
|
309
|
+
moment.tz.pack = pack;
|
310
|
+
moment.tz.packBase60 = packBase60;
|
311
|
+
moment.tz.createLinks = createLinks;
|
312
|
+
moment.tz.filterYears = filterYears;
|
313
|
+
moment.tz.filterLinkPack = filterLinkPack;
|
314
|
+
|
315
|
+
return moment;
|
316
|
+
}));
|
@@ -0,0 +1,599 @@
|
|
1
|
+
//! moment-timezone.js
|
2
|
+
//! version : 0.5.1
|
3
|
+
//! author : Tim Wood
|
4
|
+
//! license : MIT
|
5
|
+
//! github.com/moment/moment-timezone
|
6
|
+
|
7
|
+
(function (root, factory) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
/*global define*/
|
11
|
+
if (typeof define === 'function' && define.amd) {
|
12
|
+
define(['moment'], factory); // AMD
|
13
|
+
} else if (typeof module === 'object' && module.exports) {
|
14
|
+
module.exports = factory(require('moment')); // Node
|
15
|
+
} else {
|
16
|
+
factory(root.moment); // Browser
|
17
|
+
}
|
18
|
+
}(this, function (moment) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
// Do not load moment-timezone a second time.
|
22
|
+
if (moment.tz !== undefined) {
|
23
|
+
logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);
|
24
|
+
return moment;
|
25
|
+
}
|
26
|
+
|
27
|
+
var VERSION = "0.5.1",
|
28
|
+
zones = {},
|
29
|
+
links = {},
|
30
|
+
names = {},
|
31
|
+
guesses = {},
|
32
|
+
cachedGuess,
|
33
|
+
|
34
|
+
momentVersion = moment.version.split('.'),
|
35
|
+
major = +momentVersion[0],
|
36
|
+
minor = +momentVersion[1];
|
37
|
+
|
38
|
+
// Moment.js version check
|
39
|
+
if (major < 2 || (major === 2 && minor < 6)) {
|
40
|
+
logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');
|
41
|
+
}
|
42
|
+
|
43
|
+
/************************************
|
44
|
+
Unpacking
|
45
|
+
************************************/
|
46
|
+
|
47
|
+
function charCodeToInt(charCode) {
|
48
|
+
if (charCode > 96) {
|
49
|
+
return charCode - 87;
|
50
|
+
} else if (charCode > 64) {
|
51
|
+
return charCode - 29;
|
52
|
+
}
|
53
|
+
return charCode - 48;
|
54
|
+
}
|
55
|
+
|
56
|
+
function unpackBase60(string) {
|
57
|
+
var i = 0,
|
58
|
+
parts = string.split('.'),
|
59
|
+
whole = parts[0],
|
60
|
+
fractional = parts[1] || '',
|
61
|
+
multiplier = 1,
|
62
|
+
num,
|
63
|
+
out = 0,
|
64
|
+
sign = 1;
|
65
|
+
|
66
|
+
// handle negative numbers
|
67
|
+
if (string.charCodeAt(0) === 45) {
|
68
|
+
i = 1;
|
69
|
+
sign = -1;
|
70
|
+
}
|
71
|
+
|
72
|
+
// handle digits before the decimal
|
73
|
+
for (i; i < whole.length; i++) {
|
74
|
+
num = charCodeToInt(whole.charCodeAt(i));
|
75
|
+
out = 60 * out + num;
|
76
|
+
}
|
77
|
+
|
78
|
+
// handle digits after the decimal
|
79
|
+
for (i = 0; i < fractional.length; i++) {
|
80
|
+
multiplier = multiplier / 60;
|
81
|
+
num = charCodeToInt(fractional.charCodeAt(i));
|
82
|
+
out += num * multiplier;
|
83
|
+
}
|
84
|
+
|
85
|
+
return out * sign;
|
86
|
+
}
|
87
|
+
|
88
|
+
function arrayToInt (array) {
|
89
|
+
for (var i = 0; i < array.length; i++) {
|
90
|
+
array[i] = unpackBase60(array[i]);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
function intToUntil (array, length) {
|
95
|
+
for (var i = 0; i < length; i++) {
|
96
|
+
array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds
|
97
|
+
}
|
98
|
+
|
99
|
+
array[length - 1] = Infinity;
|
100
|
+
}
|
101
|
+
|
102
|
+
function mapIndices (source, indices) {
|
103
|
+
var out = [], i;
|
104
|
+
|
105
|
+
for (i = 0; i < indices.length; i++) {
|
106
|
+
out[i] = source[indices[i]];
|
107
|
+
}
|
108
|
+
|
109
|
+
return out;
|
110
|
+
}
|
111
|
+
|
112
|
+
function unpack (string) {
|
113
|
+
var data = string.split('|'),
|
114
|
+
offsets = data[2].split(' '),
|
115
|
+
indices = data[3].split(''),
|
116
|
+
untils = data[4].split(' ');
|
117
|
+
|
118
|
+
arrayToInt(offsets);
|
119
|
+
arrayToInt(indices);
|
120
|
+
arrayToInt(untils);
|
121
|
+
|
122
|
+
intToUntil(untils, indices.length);
|
123
|
+
|
124
|
+
return {
|
125
|
+
name : data[0],
|
126
|
+
abbrs : mapIndices(data[1].split(' '), indices),
|
127
|
+
offsets : mapIndices(offsets, indices),
|
128
|
+
untils : untils,
|
129
|
+
population : data[5] | 0
|
130
|
+
};
|
131
|
+
}
|
132
|
+
|
133
|
+
/************************************
|
134
|
+
Zone object
|
135
|
+
************************************/
|
136
|
+
|
137
|
+
function Zone (packedString) {
|
138
|
+
if (packedString) {
|
139
|
+
this._set(unpack(packedString));
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
Zone.prototype = {
|
144
|
+
_set : function (unpacked) {
|
145
|
+
this.name = unpacked.name;
|
146
|
+
this.abbrs = unpacked.abbrs;
|
147
|
+
this.untils = unpacked.untils;
|
148
|
+
this.offsets = unpacked.offsets;
|
149
|
+
this.population = unpacked.population;
|
150
|
+
},
|
151
|
+
|
152
|
+
_index : function (timestamp) {
|
153
|
+
var target = +timestamp,
|
154
|
+
untils = this.untils,
|
155
|
+
i;
|
156
|
+
|
157
|
+
for (i = 0; i < untils.length; i++) {
|
158
|
+
if (target < untils[i]) {
|
159
|
+
return i;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
|
164
|
+
parse : function (timestamp) {
|
165
|
+
var target = +timestamp,
|
166
|
+
offsets = this.offsets,
|
167
|
+
untils = this.untils,
|
168
|
+
max = untils.length - 1,
|
169
|
+
offset, offsetNext, offsetPrev, i;
|
170
|
+
|
171
|
+
for (i = 0; i < max; i++) {
|
172
|
+
offset = offsets[i];
|
173
|
+
offsetNext = offsets[i + 1];
|
174
|
+
offsetPrev = offsets[i ? i - 1 : i];
|
175
|
+
|
176
|
+
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
177
|
+
offset = offsetNext;
|
178
|
+
} else if (offset > offsetPrev && tz.moveInvalidForward) {
|
179
|
+
offset = offsetPrev;
|
180
|
+
}
|
181
|
+
|
182
|
+
if (target < untils[i] - (offset * 60000)) {
|
183
|
+
return offsets[i];
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
return offsets[max];
|
188
|
+
},
|
189
|
+
|
190
|
+
abbr : function (mom) {
|
191
|
+
return this.abbrs[this._index(mom)];
|
192
|
+
},
|
193
|
+
|
194
|
+
offset : function (mom) {
|
195
|
+
return this.offsets[this._index(mom)];
|
196
|
+
}
|
197
|
+
};
|
198
|
+
|
199
|
+
/************************************
|
200
|
+
Current Timezone
|
201
|
+
************************************/
|
202
|
+
|
203
|
+
function OffsetAt(at) {
|
204
|
+
var timeString = at.toTimeString();
|
205
|
+
var abbr = timeString.match(/\([a-z ]+\)/i);
|
206
|
+
if (abbr && abbr[0]) {
|
207
|
+
// 17:56:31 GMT-0600 (CST)
|
208
|
+
// 17:56:31 GMT-0600 (Central Standard Time)
|
209
|
+
abbr = abbr[0].match(/[A-Z]/g);
|
210
|
+
abbr = abbr ? abbr.join('') : undefined;
|
211
|
+
} else {
|
212
|
+
// 17:56:31 CST
|
213
|
+
// 17:56:31 GMT+0800 (台北標準時間)
|
214
|
+
abbr = timeString.match(/[A-Z]{3,5}/g);
|
215
|
+
abbr = abbr ? abbr[0] : undefined;
|
216
|
+
}
|
217
|
+
|
218
|
+
if (abbr === 'GMT') {
|
219
|
+
abbr = undefined;
|
220
|
+
}
|
221
|
+
|
222
|
+
this.at = +at;
|
223
|
+
this.abbr = abbr;
|
224
|
+
this.offset = at.getTimezoneOffset();
|
225
|
+
}
|
226
|
+
|
227
|
+
function ZoneScore(zone) {
|
228
|
+
this.zone = zone;
|
229
|
+
this.offsetScore = 0;
|
230
|
+
this.abbrScore = 0;
|
231
|
+
}
|
232
|
+
|
233
|
+
ZoneScore.prototype.scoreOffsetAt = function (offsetAt) {
|
234
|
+
this.offsetScore += Math.abs(this.zone.offset(offsetAt.at) - offsetAt.offset);
|
235
|
+
if (this.zone.abbr(offsetAt.at).match(/[A-Z]/g).join('') !== offsetAt.abbr) {
|
236
|
+
this.abbrScore++;
|
237
|
+
}
|
238
|
+
};
|
239
|
+
|
240
|
+
function findChange(low, high) {
|
241
|
+
var mid, diff;
|
242
|
+
|
243
|
+
while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {
|
244
|
+
mid = new OffsetAt(new Date(low.at + diff));
|
245
|
+
if (mid.offset === low.offset) {
|
246
|
+
low = mid;
|
247
|
+
} else {
|
248
|
+
high = mid;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
return low;
|
253
|
+
}
|
254
|
+
|
255
|
+
function userOffsets() {
|
256
|
+
var startYear = new Date().getFullYear() - 2,
|
257
|
+
last = new OffsetAt(new Date(startYear, 0, 1)),
|
258
|
+
offsets = [last],
|
259
|
+
change, next, i;
|
260
|
+
|
261
|
+
for (i = 1; i < 48; i++) {
|
262
|
+
next = new OffsetAt(new Date(startYear, i, 1));
|
263
|
+
if (next.offset !== last.offset) {
|
264
|
+
change = findChange(last, next);
|
265
|
+
offsets.push(change);
|
266
|
+
offsets.push(new OffsetAt(new Date(change.at + 6e4)));
|
267
|
+
}
|
268
|
+
last = next;
|
269
|
+
}
|
270
|
+
|
271
|
+
for (i = 0; i < 4; i++) {
|
272
|
+
offsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));
|
273
|
+
offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));
|
274
|
+
}
|
275
|
+
|
276
|
+
return offsets;
|
277
|
+
}
|
278
|
+
|
279
|
+
function sortZoneScores (a, b) {
|
280
|
+
if (a.offsetScore !== b.offsetScore) {
|
281
|
+
return a.offsetScore - b.offsetScore;
|
282
|
+
}
|
283
|
+
if (a.abbrScore !== b.abbrScore) {
|
284
|
+
return a.abbrScore - b.abbrScore;
|
285
|
+
}
|
286
|
+
return b.zone.population - a.zone.population;
|
287
|
+
}
|
288
|
+
|
289
|
+
function addToGuesses (name, offsets) {
|
290
|
+
var i, offset;
|
291
|
+
arrayToInt(offsets);
|
292
|
+
for (i = 0; i < offsets.length; i++) {
|
293
|
+
offset = offsets[i];
|
294
|
+
guesses[offset] = guesses[offset] || {};
|
295
|
+
guesses[offset][name] = true;
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
function guessesForUserOffsets (offsets) {
|
300
|
+
var offsetsLength = offsets.length,
|
301
|
+
filteredGuesses = {},
|
302
|
+
out = [],
|
303
|
+
i, j, guessesOffset;
|
304
|
+
|
305
|
+
for (i = 0; i < offsetsLength; i++) {
|
306
|
+
guessesOffset = guesses[offsets[i].offset] || {};
|
307
|
+
for (j in guessesOffset) {
|
308
|
+
if (guessesOffset.hasOwnProperty(j)) {
|
309
|
+
filteredGuesses[j] = true;
|
310
|
+
}
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
for (i in filteredGuesses) {
|
315
|
+
if (filteredGuesses.hasOwnProperty(i)) {
|
316
|
+
out.push(names[i]);
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
return out;
|
321
|
+
}
|
322
|
+
|
323
|
+
function rebuildGuess () {
|
324
|
+
|
325
|
+
// use Intl API when available and returning valid time zone
|
326
|
+
try {
|
327
|
+
var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
328
|
+
var name = names[normalizeName(intlName)];
|
329
|
+
if (name) {
|
330
|
+
return name;
|
331
|
+
}
|
332
|
+
logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded.");
|
333
|
+
} catch (e) {
|
334
|
+
// Intl unavailable, fall back to manual guessing.
|
335
|
+
}
|
336
|
+
|
337
|
+
var offsets = userOffsets(),
|
338
|
+
offsetsLength = offsets.length,
|
339
|
+
guesses = guessesForUserOffsets(offsets),
|
340
|
+
zoneScores = [],
|
341
|
+
zoneScore, i, j;
|
342
|
+
|
343
|
+
for (i = 0; i < guesses.length; i++) {
|
344
|
+
zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);
|
345
|
+
for (j = 0; j < offsetsLength; j++) {
|
346
|
+
zoneScore.scoreOffsetAt(offsets[j]);
|
347
|
+
}
|
348
|
+
zoneScores.push(zoneScore);
|
349
|
+
}
|
350
|
+
|
351
|
+
zoneScores.sort(sortZoneScores);
|
352
|
+
|
353
|
+
return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;
|
354
|
+
}
|
355
|
+
|
356
|
+
function guess (ignoreCache) {
|
357
|
+
if (!cachedGuess || ignoreCache) {
|
358
|
+
cachedGuess = rebuildGuess();
|
359
|
+
}
|
360
|
+
return cachedGuess;
|
361
|
+
}
|
362
|
+
|
363
|
+
/************************************
|
364
|
+
Global Methods
|
365
|
+
************************************/
|
366
|
+
|
367
|
+
function normalizeName (name) {
|
368
|
+
return (name || '').toLowerCase().replace(/\//g, '_');
|
369
|
+
}
|
370
|
+
|
371
|
+
function addZone (packed) {
|
372
|
+
var i, name, split, normalized;
|
373
|
+
|
374
|
+
if (typeof packed === "string") {
|
375
|
+
packed = [packed];
|
376
|
+
}
|
377
|
+
|
378
|
+
for (i = 0; i < packed.length; i++) {
|
379
|
+
split = packed[i].split('|');
|
380
|
+
name = split[0];
|
381
|
+
normalized = normalizeName(name);
|
382
|
+
zones[normalized] = packed[i];
|
383
|
+
names[normalized] = name;
|
384
|
+
if (split[5]) {
|
385
|
+
addToGuesses(normalized, split[2].split(' '));
|
386
|
+
}
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
function getZone (name, caller) {
|
391
|
+
name = normalizeName(name);
|
392
|
+
|
393
|
+
var zone = zones[name];
|
394
|
+
var link;
|
395
|
+
|
396
|
+
if (zone instanceof Zone) {
|
397
|
+
return zone;
|
398
|
+
}
|
399
|
+
|
400
|
+
if (typeof zone === 'string') {
|
401
|
+
zone = new Zone(zone);
|
402
|
+
zones[name] = zone;
|
403
|
+
return zone;
|
404
|
+
}
|
405
|
+
|
406
|
+
// Pass getZone to prevent recursion more than 1 level deep
|
407
|
+
if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {
|
408
|
+
zone = zones[name] = new Zone();
|
409
|
+
zone._set(link);
|
410
|
+
zone.name = names[name];
|
411
|
+
return zone;
|
412
|
+
}
|
413
|
+
|
414
|
+
return null;
|
415
|
+
}
|
416
|
+
|
417
|
+
function getNames () {
|
418
|
+
var i, out = [];
|
419
|
+
|
420
|
+
for (i in names) {
|
421
|
+
if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {
|
422
|
+
out.push(names[i]);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
|
426
|
+
return out.sort();
|
427
|
+
}
|
428
|
+
|
429
|
+
function addLink (aliases) {
|
430
|
+
var i, alias, normal0, normal1;
|
431
|
+
|
432
|
+
if (typeof aliases === "string") {
|
433
|
+
aliases = [aliases];
|
434
|
+
}
|
435
|
+
|
436
|
+
for (i = 0; i < aliases.length; i++) {
|
437
|
+
alias = aliases[i].split('|');
|
438
|
+
|
439
|
+
normal0 = normalizeName(alias[0]);
|
440
|
+
normal1 = normalizeName(alias[1]);
|
441
|
+
|
442
|
+
links[normal0] = normal1;
|
443
|
+
names[normal0] = alias[0];
|
444
|
+
|
445
|
+
links[normal1] = normal0;
|
446
|
+
names[normal1] = alias[1];
|
447
|
+
}
|
448
|
+
}
|
449
|
+
|
450
|
+
function loadData (data) {
|
451
|
+
addZone(data.zones);
|
452
|
+
addLink(data.links);
|
453
|
+
tz.dataVersion = data.version;
|
454
|
+
}
|
455
|
+
|
456
|
+
function zoneExists (name) {
|
457
|
+
if (!zoneExists.didShowError) {
|
458
|
+
zoneExists.didShowError = true;
|
459
|
+
logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')");
|
460
|
+
}
|
461
|
+
return !!getZone(name);
|
462
|
+
}
|
463
|
+
|
464
|
+
function needsOffset (m) {
|
465
|
+
return !!(m._a && (m._tzm === undefined));
|
466
|
+
}
|
467
|
+
|
468
|
+
function logError (message) {
|
469
|
+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
470
|
+
console.error(message);
|
471
|
+
}
|
472
|
+
}
|
473
|
+
|
474
|
+
/************************************
|
475
|
+
moment.tz namespace
|
476
|
+
************************************/
|
477
|
+
|
478
|
+
function tz (input) {
|
479
|
+
var args = Array.prototype.slice.call(arguments, 0, -1),
|
480
|
+
name = arguments[arguments.length - 1],
|
481
|
+
zone = getZone(name),
|
482
|
+
out = moment.utc.apply(null, args);
|
483
|
+
|
484
|
+
if (zone && !moment.isMoment(input) && needsOffset(out)) {
|
485
|
+
out.add(zone.parse(out), 'minutes');
|
486
|
+
}
|
487
|
+
|
488
|
+
out.tz(name);
|
489
|
+
|
490
|
+
return out;
|
491
|
+
}
|
492
|
+
|
493
|
+
tz.version = VERSION;
|
494
|
+
tz.dataVersion = '';
|
495
|
+
tz._zones = zones;
|
496
|
+
tz._links = links;
|
497
|
+
tz._names = names;
|
498
|
+
tz.add = addZone;
|
499
|
+
tz.link = addLink;
|
500
|
+
tz.load = loadData;
|
501
|
+
tz.zone = getZone;
|
502
|
+
tz.zoneExists = zoneExists; // deprecated in 0.1.0
|
503
|
+
tz.guess = guess;
|
504
|
+
tz.names = getNames;
|
505
|
+
tz.Zone = Zone;
|
506
|
+
tz.unpack = unpack;
|
507
|
+
tz.unpackBase60 = unpackBase60;
|
508
|
+
tz.needsOffset = needsOffset;
|
509
|
+
tz.moveInvalidForward = true;
|
510
|
+
tz.moveAmbiguousForward = false;
|
511
|
+
|
512
|
+
/************************************
|
513
|
+
Interface with Moment.js
|
514
|
+
************************************/
|
515
|
+
|
516
|
+
var fn = moment.fn;
|
517
|
+
|
518
|
+
moment.tz = tz;
|
519
|
+
|
520
|
+
moment.defaultZone = null;
|
521
|
+
|
522
|
+
moment.updateOffset = function (mom, keepTime) {
|
523
|
+
var zone = moment.defaultZone,
|
524
|
+
offset;
|
525
|
+
|
526
|
+
if (mom._z === undefined) {
|
527
|
+
if (zone && needsOffset(mom) && !mom._isUTC) {
|
528
|
+
mom._d = moment.utc(mom._a)._d;
|
529
|
+
mom.utc().add(zone.parse(mom), 'minutes');
|
530
|
+
}
|
531
|
+
mom._z = zone;
|
532
|
+
}
|
533
|
+
if (mom._z) {
|
534
|
+
offset = mom._z.offset(mom);
|
535
|
+
if (Math.abs(offset) < 16) {
|
536
|
+
offset = offset / 60;
|
537
|
+
}
|
538
|
+
if (mom.utcOffset !== undefined) {
|
539
|
+
mom.utcOffset(-offset, keepTime);
|
540
|
+
} else {
|
541
|
+
mom.zone(offset, keepTime);
|
542
|
+
}
|
543
|
+
}
|
544
|
+
};
|
545
|
+
|
546
|
+
fn.tz = function (name) {
|
547
|
+
if (name) {
|
548
|
+
this._z = getZone(name);
|
549
|
+
if (this._z) {
|
550
|
+
moment.updateOffset(this);
|
551
|
+
} else {
|
552
|
+
logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/.");
|
553
|
+
}
|
554
|
+
return this;
|
555
|
+
}
|
556
|
+
if (this._z) { return this._z.name; }
|
557
|
+
};
|
558
|
+
|
559
|
+
function abbrWrap (old) {
|
560
|
+
return function () {
|
561
|
+
if (this._z) { return this._z.abbr(this); }
|
562
|
+
return old.call(this);
|
563
|
+
};
|
564
|
+
}
|
565
|
+
|
566
|
+
function resetZoneWrap (old) {
|
567
|
+
return function () {
|
568
|
+
this._z = null;
|
569
|
+
return old.apply(this, arguments);
|
570
|
+
};
|
571
|
+
}
|
572
|
+
|
573
|
+
fn.zoneName = abbrWrap(fn.zoneName);
|
574
|
+
fn.zoneAbbr = abbrWrap(fn.zoneAbbr);
|
575
|
+
fn.utc = resetZoneWrap(fn.utc);
|
576
|
+
|
577
|
+
moment.tz.setDefault = function(name) {
|
578
|
+
if (major < 2 || (major === 2 && minor < 9)) {
|
579
|
+
logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');
|
580
|
+
}
|
581
|
+
moment.defaultZone = name ? getZone(name) : null;
|
582
|
+
return moment;
|
583
|
+
};
|
584
|
+
|
585
|
+
// Cloning a moment should include the _z property.
|
586
|
+
var momentProperties = moment.momentProperties;
|
587
|
+
if (Object.prototype.toString.call(momentProperties) === '[object Array]') {
|
588
|
+
// moment 2.8.1+
|
589
|
+
momentProperties.push('_z');
|
590
|
+
momentProperties.push('_a');
|
591
|
+
} else if (momentProperties) {
|
592
|
+
// moment 2.7.0
|
593
|
+
momentProperties._z = null;
|
594
|
+
}
|
595
|
+
|
596
|
+
// INJECT DATA
|
597
|
+
|
598
|
+
return moment;
|
599
|
+
}));
|