pageflow 15.6.1 → 15.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +253 -11
- data/README.md +1 -2
- data/admins/pageflow/entry.rb +28 -57
- data/admins/pageflow/membership.rb +5 -1
- data/admins/pageflow/user.rb +1 -3
- data/app/assets/images/pageflow/admin/icons/buttons/editor.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/buttons/preview.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/buttons/show_public.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/delete.svg +9 -0
- data/app/assets/images/pageflow/admin/icons/done.svg +6 -0
- data/app/assets/images/pageflow/admin/icons/edit.svg +7 -0
- data/app/assets/images/pageflow/admin/icons/editor.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/folder.svg +8 -0
- data/app/assets/images/pageflow/admin/icons/folder_active.svg +8 -0
- data/app/assets/images/pageflow/admin/icons/info.svg +3 -0
- data/app/assets/images/pageflow/admin/icons/new.svg +5 -0
- data/app/assets/images/pageflow/admin/icons/preview.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/published.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/published_with_password.svg +2 -0
- data/app/assets/images/pageflow/admin/icons/show_public.svg +2 -0
- data/app/assets/images/pageflow/editor/blank_entry/logo.png +0 -0
- data/app/assets/images/pageflow/themes/default/embed_opt_in.svg +3 -0
- data/app/assets/images/pageflow/themes/default/embed_opt_out_info.svg +16 -0
- data/app/assets/javascripts/pageflow/admin/entries.js +9 -57
- data/app/assets/javascripts/pageflow/dist/editor.js +11890 -0
- data/app/assets/javascripts/pageflow/dist/frontend.js +5800 -0
- data/app/assets/javascripts/pageflow/dist/react-client.js +22 -0
- data/app/assets/javascripts/pageflow/dist/react-server.js +19 -0
- data/app/assets/javascripts/pageflow/dist/ui.js +127 -10
- data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +18 -16
- data/app/assets/stylesheets/pageflow/admin/badge_list.scss +25 -35
- data/app/assets/stylesheets/pageflow/admin/columns.scss +13 -11
- data/app/assets/stylesheets/pageflow/admin/embed_code.scss +1 -4
- data/app/assets/stylesheets/pageflow/admin/entries/folders.scss +44 -19
- data/app/assets/stylesheets/pageflow/admin/entries.scss +15 -31
- data/app/assets/stylesheets/pageflow/admin/features.scss +3 -1
- data/app/assets/stylesheets/pageflow/admin/forms.scss +14 -12
- data/app/assets/stylesheets/pageflow/admin/hint.scss +8 -14
- data/app/assets/stylesheets/pageflow/admin/icon_button.scss +25 -14
- data/app/assets/stylesheets/pageflow/admin/icon_link.scss +31 -15
- data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +14 -7
- data/app/assets/stylesheets/pageflow/admin/status_tags.scss +5 -4
- data/app/assets/stylesheets/pageflow/admin/tabs_view.scss +36 -34
- data/app/assets/stylesheets/pageflow/admin/tooltip_bubble.scss +15 -11
- data/app/assets/stylesheets/pageflow/admin.scss +12 -0
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +15 -61
- data/app/assets/stylesheets/pageflow/editor/base.scss +28 -13
- data/app/assets/stylesheets/pageflow/editor/blank_entry.scss +6 -6
- data/app/assets/stylesheets/pageflow/editor/change_theme.scss +28 -71
- data/app/assets/stylesheets/pageflow/editor/composables.scss +2 -2
- data/app/assets/stylesheets/pageflow/editor/confirm_encoding.scss +18 -36
- data/app/assets/stylesheets/pageflow/editor/confirm_upload.scss +12 -39
- data/app/assets/stylesheets/pageflow/editor/dialogs.scss +39 -12
- data/app/assets/stylesheets/pageflow/editor/disabled_atmo_indicator.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +7 -10
- data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +3 -8
- data/app/assets/stylesheets/pageflow/editor/failures.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/file_import.scss +22 -38
- data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +3 -7
- data/app/assets/stylesheets/pageflow/editor/file_settings_dialog.scss +4 -24
- data/app/assets/stylesheets/pageflow/editor/file_stages.scss +10 -11
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -8
- data/app/assets/stylesheets/pageflow/editor/files.scss +7 -6
- data/app/assets/stylesheets/pageflow/editor/files_explorer.scss +13 -30
- data/app/assets/stylesheets/pageflow/editor/files_gallery.scss +15 -11
- data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +6 -7
- data/app/assets/stylesheets/pageflow/editor/help.scss +19 -14
- data/app/assets/stylesheets/pageflow/editor/help_image.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +19 -0
- data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +7 -11
- data/app/assets/stylesheets/pageflow/editor/inputs/file_processing_state_display.scss +0 -2
- data/app/assets/stylesheets/pageflow/editor/inputs/reference.scss +7 -11
- data/app/assets/stylesheets/pageflow/editor/list.scss +13 -10
- data/app/assets/stylesheets/pageflow/editor/loading.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/locked.scss +9 -5
- data/app/assets/stylesheets/pageflow/editor/menu.scss +5 -5
- data/app/assets/stylesheets/pageflow/editor/notifications.scss +15 -14
- data/app/assets/stylesheets/pageflow/editor/other_entry_item.scss +7 -3
- data/app/assets/stylesheets/pageflow/editor/outline.scss +57 -19
- data/app/assets/stylesheets/pageflow/editor/page_links.scss +10 -8
- data/app/assets/stylesheets/pageflow/editor/page_selection.scss +2 -29
- data/app/assets/stylesheets/pageflow/editor/publish_entry.scss +5 -6
- data/app/assets/stylesheets/pageflow/editor/quotas.scss +2 -3
- data/app/assets/stylesheets/pageflow/editor/select_button.scss +12 -6
- data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -5
- data/app/assets/stylesheets/pageflow/editor/storyline_picker.scss +6 -2
- data/app/assets/stylesheets/pageflow/editor/text_tracks.scss +6 -22
- data/app/assets/stylesheets/pageflow/editor/widgets.scss +2 -2
- data/app/assets/stylesheets/pageflow/editor/wysihtml5.scss +35 -29
- data/app/assets/stylesheets/pageflow/mixins/background_icons.scss +3 -3
- data/app/assets/stylesheets/pageflow/mixins/buttons.scss +50 -68
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +2 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent/bar.scss +156 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent/vendor_list.scss +62 -0
- data/app/assets/stylesheets/pageflow/themes/default/consent.scss +2 -0
- data/app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss +7 -0
- data/app/assets/stylesheets/pageflow/themes/default/page/shadow.scss +44 -0
- data/app/assets/stylesheets/pageflow/themes/default/third_party_embed_consent.scss +103 -0
- data/app/assets/stylesheets/pageflow/ui/forms.scss +79 -84
- data/app/assets/stylesheets/pageflow/ui/functions.scss +56 -0
- data/app/assets/stylesheets/pageflow/ui/input/check_box_group_input.scss +2 -3
- data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +6 -6
- data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +63 -50
- data/app/assets/stylesheets/pageflow/ui/normalize/forms.scss +153 -0
- data/app/assets/stylesheets/pageflow/ui/normalize.scss +278 -0
- data/app/assets/stylesheets/pageflow/ui/properties.scss +44 -0
- data/app/assets/stylesheets/pageflow/ui/table_cells/delete_row_table_cell.scss +1 -1
- data/app/assets/stylesheets/pageflow/ui/table_view.scss +14 -18
- data/app/assets/stylesheets/pageflow/ui/tabs_view.scss +8 -11
- data/app/assets/stylesheets/pageflow/ui/tooltip.scss +6 -8
- data/app/assets/stylesheets/pageflow/ui/validation_error_messages.scss +6 -0
- data/app/assets/stylesheets/pageflow/ui.scss +4 -0
- data/app/controllers/pageflow/edit_locks_controller.rb +3 -1
- data/app/helpers/pageflow/admin/entries_helper.rb +2 -12
- data/app/helpers/pageflow/embed_code_helper.rb +1 -1
- data/app/helpers/pageflow/entries_helper.rb +41 -2
- data/app/helpers/pageflow/file_background_images_helper.rb +1 -1
- data/app/helpers/pageflow/page_types_helper.rb +1 -1
- data/app/helpers/pageflow/themes_helper.rb +1 -1
- data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -1
- data/app/jobs/pageflow/poll_zencoder_job.rb +1 -9
- data/app/models/pageflow/audio_file.rb +17 -0
- data/app/models/pageflow/audio_file_url_templates.rb +4 -1
- data/app/models/pageflow/customized_theme.rb +37 -0
- data/app/models/pageflow/draft_entry.rb +6 -59
- data/app/models/pageflow/entry.rb +8 -0
- data/app/models/pageflow/entry_at_revision.rb +68 -0
- data/app/models/pageflow/entry_role_query.rb +44 -24
- data/app/models/pageflow/image_file_css_background_image_urls.rb +8 -2
- data/app/models/pageflow/published_entry.rb +9 -56
- data/app/models/pageflow/theme_customization.rb +46 -0
- data/app/models/pageflow/theme_customization_file.rb +58 -0
- data/app/models/pageflow/video_file.rb +11 -1
- data/app/models/pageflow/video_file_url_templates.rb +1 -0
- data/app/policies/pageflow/entry_policy.rb +4 -0
- data/app/state_machines/pageflow/media_encoding_state_machine.rb +23 -4
- data/app/views/admin/entries/_form.html.erb +50 -0
- data/app/views/admin/entries/entry_type_name_input.html.erb +5 -0
- data/app/views/admin/features/_form.html.erb +1 -1
- data/app/views/admin/memberships/_form.html.erb +2 -3
- data/app/views/admin/users/_form.html.erb +1 -1
- data/app/views/admin/users/invitation.html.erb +2 -2
- data/app/views/components/pageflow/admin/entry_user_badge_list.rb +10 -9
- data/app/views/components/pageflow/admin/members_tab.rb +5 -1
- data/app/views/components/pageflow/admin/revisions_tab.rb +13 -3
- data/app/views/components/pageflow/admin/timestamp.rb +20 -0
- data/app/views/components/pageflow/admin/user_account_badge_list.rb +5 -6
- data/app/views/pageflow/admin/entries/_cannot_add_user.html.erb +9 -5
- data/app/views/pageflow/admin/entries/_entry_type_name_input.html.erb +7 -0
- data/app/views/pageflow/audio_files/_audio_file.json.jbuilder +13 -0
- data/app/views/pageflow/editor/encoding_confirmations/_intro.html.erb +0 -0
- data/app/views/pageflow/editor/encoding_confirmations/check.json.jbuilder +14 -2
- data/config/initializers/paperclip.rb +16 -1
- data/config/locales/de.yml +24 -28
- data/config/locales/en.yml +19 -10
- data/db/migrate/20210528073122_create_pageflow_theme_customizations.rb +11 -0
- data/db/migrate/20210531090654_create_pageflow_theme_customization_files.rb +15 -0
- data/db/migrate/20210531102228_add_selected_file_ids_to_theme_customizations.rb +5 -0
- data/db/migrate/20211020085902_add_canonical_entry_url_prefix_to_themings.rb +5 -0
- data/db/migrate/20220503150010_add_peak_data_to_audio_files.rb +5 -0
- data/db/migrate/20220705084830_add_trailing_slash_in_canonical_urls_to_themings.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +256 -124
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +566 -167
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +5 -5
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +4 -4
- data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +38 -0
- data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_in.html.erb +12 -0
- data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_out_info.html.erb +10 -0
- data/entry_types/paged/config/initializers/features.rb +2 -0
- data/entry_types/paged/config/locales/new/video_contain.de.yml +7 -0
- data/entry_types/paged/config/locales/new/video_contain.en.yml +7 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +3 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +1 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +58 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +37 -3
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +92 -6
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/webpack_public_path_helper.rb +20 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +7 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +5 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +5 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +5 -4
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +16 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +13 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_widget.json.jbuilder +2 -0
- data/entry_types/scrolled/config/locales/de.yml +1 -8
- data/entry_types/scrolled/config/locales/en.yml +1 -9
- data/entry_types/scrolled/config/locales/new/before_after_slider.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/before_after_slider.en.yml +8 -0
- data/entry_types/scrolled/config/locales/new/center_ragged.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/center_ragged.en.yml +9 -0
- data/entry_types/scrolled/config/locales/new/consent.de.yml +25 -0
- data/entry_types/scrolled/config/locales/new/consent.en.yml +24 -0
- data/entry_types/scrolled/config/locales/new/content_element_categories.de.yml +39 -0
- data/entry_types/scrolled/config/locales/new/content_element_categories.en.yml +39 -0
- data/entry_types/scrolled/config/locales/new/default_transition.de.yml +14 -0
- data/entry_types/scrolled/config/locales/new/default_transition.en.yml +14 -0
- data/entry_types/scrolled/config/locales/new/header_line_breaks.de.yml +28 -0
- data/entry_types/scrolled/config/locales/new/header_line_breaks.en.yml +27 -0
- data/entry_types/scrolled/config/locales/new/header_size.de.yml +17 -0
- data/entry_types/scrolled/config/locales/new/header_size.en.yml +17 -0
- data/entry_types/scrolled/config/locales/new/iframe_embed.de.yml +39 -0
- data/entry_types/scrolled/config/locales/new/iframe_embed.en.yml +39 -0
- data/entry_types/scrolled/config/locales/new/inline_loops.de.yml +26 -0
- data/entry_types/scrolled/config/locales/new/inline_loops.en.yml +26 -0
- data/entry_types/scrolled/config/locales/new/portrait_inline_image.de.yml +9 -0
- data/entry_types/scrolled/config/locales/new/portrait_inline_image.en.yml +9 -0
- data/entry_types/scrolled/config/locales/new/section_width.de.yml +10 -0
- data/entry_types/scrolled/config/locales/new/section_width.en.yml +10 -0
- data/entry_types/scrolled/config/locales/new/typography_variants.de.yml +7 -0
- data/entry_types/scrolled/config/locales/new/typography_variants.en.yml +7 -0
- data/entry_types/scrolled/config/locales/new/video_embed_poster.de.yml +8 -0
- data/entry_types/scrolled/config/locales/new/video_embed_poster.en.yml +8 -0
- data/entry_types/scrolled/config/locales/new/waveform_styles.de.yml +11 -0
- data/entry_types/scrolled/config/locales/new/waveform_styles.en.yml +12 -0
- data/entry_types/scrolled/config/locales/new/widgets.de.yml +6 -0
- data/entry_types/scrolled/config/locales/new/widgets.en.yml +6 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +29 -5
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +8 -6
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +37 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +57 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +49 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +8 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +42 -0
- data/entry_types/scrolled/lib/pageflow_scrolled.rb +17 -1
- data/entry_types/scrolled/package/contentElements-editor.js +323 -89
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +719 -529
- data/entry_types/scrolled/package/editor.js +459 -261
- data/entry_types/scrolled/package/frontend/{EditableText-7093fd0e.js → EditableInlineText.module-b9923660.js} +284 -362
- data/entry_types/scrolled/package/frontend/{i18n-4dc6c377.js → PhonePlatformContext-9fb97827.js} +199 -106
- data/entry_types/scrolled/package/frontend/{Viewer-e49e7807.js → Viewer-e2290ea0.js} +196 -79
- data/entry_types/scrolled/package/frontend/{Wavesurfer-0adf5667.js → Wavesurfer-7d9cf1b7.js} +16 -58
- data/entry_types/scrolled/package/frontend/{components-6a6793ca.js → components-6ab26015.js} +664 -671
- data/entry_types/scrolled/package/frontend/{getPrototypeOf-63c7c8e8.js → createSuper-d0f30da3.js} +34 -5
- data/entry_types/scrolled/package/frontend/index.css +1 -9
- data/entry_types/scrolled/package/frontend/index.js +1919 -2386
- data/entry_types/scrolled/package/frontend/{useBrowserFeature-91a4c29d.js → usePhonePlatform-2857c22b.js} +9 -8
- data/entry_types/scrolled/package/frontend-server.js +3 -6
- data/entry_types/scrolled/package/package.json +16 -8
- data/entry_types/scrolled/package/testHelpers.js +456 -0
- data/entry_types/scrolled/package/values/breakpoints.module.css +9 -0
- data/entry_types/scrolled/package/values/colors.module.css +5 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +9 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.js +612 -0
- data/entry_types/scrolled/spec/fixtures/image.svg +1 -0
- data/lib/pageflow/ability_mixin.rb +4 -0
- data/lib/pageflow/built_in_widget_type.rb +4 -0
- data/lib/pageflow/built_in_widget_types_plugin.rb +7 -0
- data/lib/pageflow/configuration.rb +34 -1
- data/lib/pageflow/entry_type.rb +11 -2
- data/lib/pageflow/entry_type_configuration.rb +2 -0
- data/lib/pageflow/file_type.rb +24 -0
- data/lib/pageflow/paperclip_processors/audio_waveform.rb +42 -0
- data/lib/pageflow/paperclip_processors/noop.rb +10 -0
- data/lib/pageflow/theme_customizations.rb +61 -0
- data/lib/pageflow/user_mixin.rb +6 -0
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow.rb +9 -0
- data/package/config/jest/index.js +2 -1
- data/package/config/postcss/scaleFunctions.js +71 -0
- data/package/editor.js +95 -85
- data/package/frontend.js +521 -161
- data/package/package.json +5 -3
- data/package/testHelpers.js +26 -5
- data/package/ui.js +124 -11
- data/spec/factories/draft_entries.rb +19 -1
- data/spec/factories/entries.rb +4 -0
- data/spec/factories/published_entries.rb +6 -0
- data/spec/fixtures/audio.ogg +0 -0
- metadata +123 -15
- data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +0 -2
- data/app/views/admin/entries/entry_types.json.jbuilder +0 -4
- data/package/config/jest/transformers/upwardBabel.js +0 -5
@@ -2844,53 +2844,216 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
2844
2844
|
|
2845
2845
|
var backboneEventsStandalone$1 = backboneEventsStandalone;
|
2846
2846
|
|
2847
|
-
|
2848
|
-
if (
|
2849
|
-
|
2847
|
+
function _defineProperty(obj, key, value) {
|
2848
|
+
if (key in obj) {
|
2849
|
+
Object.defineProperty(obj, key, {
|
2850
|
+
value: value,
|
2851
|
+
enumerable: true,
|
2852
|
+
configurable: true,
|
2853
|
+
writable: true
|
2854
|
+
});
|
2855
|
+
} else {
|
2856
|
+
obj[key] = value;
|
2850
2857
|
}
|
2851
|
-
};
|
2852
2858
|
|
2853
|
-
|
2854
|
-
|
2855
|
-
};
|
2859
|
+
return obj;
|
2860
|
+
}
|
2856
2861
|
|
2857
|
-
|
2858
|
-
|
2862
|
+
function ownKeys$1(object, enumerableOnly) {
|
2863
|
+
var keys = Object.keys(object);
|
2859
2864
|
|
2860
|
-
|
2861
|
-
|
2862
|
-
if (
|
2863
|
-
return
|
2864
|
-
}
|
2865
|
+
if (Object.getOwnPropertySymbols) {
|
2866
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
2867
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
2868
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
2869
|
+
});
|
2870
|
+
keys.push.apply(keys, symbols);
|
2871
|
+
}
|
2865
2872
|
|
2873
|
+
return keys;
|
2874
|
+
}
|
2866
2875
|
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
if (
|
2872
|
-
|
2876
|
+
function _objectSpread2(target) {
|
2877
|
+
for (var i = 1; i < arguments.length; i++) {
|
2878
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
2879
|
+
|
2880
|
+
if (i % 2) {
|
2881
|
+
ownKeys$1(Object(source), true).forEach(function (key) {
|
2882
|
+
_defineProperty(target, key, source[key]);
|
2883
|
+
});
|
2884
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
2885
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
2886
|
+
} else {
|
2887
|
+
ownKeys$1(Object(source)).forEach(function (key) {
|
2888
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
2889
|
+
});
|
2873
2890
|
}
|
2891
|
+
}
|
2874
2892
|
|
2875
|
-
|
2893
|
+
return target;
|
2894
|
+
}
|
2876
2895
|
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2896
|
+
function _classCallCheck(instance, Constructor) {
|
2897
|
+
if (!(instance instanceof Constructor)) {
|
2898
|
+
throw new TypeError("Cannot call a class as a function");
|
2899
|
+
}
|
2900
|
+
}
|
2882
2901
|
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
2902
|
+
function _defineProperties(target, props) {
|
2903
|
+
for (var i = 0; i < props.length; i++) {
|
2904
|
+
var descriptor = props[i];
|
2905
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
2906
|
+
descriptor.configurable = true;
|
2907
|
+
if ("value" in descriptor) descriptor.writable = true;
|
2908
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
2909
|
+
}
|
2910
|
+
}
|
2886
2911
|
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2912
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
2913
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
2914
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
2915
|
+
return Constructor;
|
2916
|
+
}
|
2917
|
+
|
2918
|
+
function _arrayWithHoles(arr) {
|
2919
|
+
if (Array.isArray(arr)) return arr;
|
2920
|
+
}
|
2921
|
+
|
2922
|
+
function _iterableToArrayLimit(arr, i) {
|
2923
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
2924
|
+
var _arr = [];
|
2925
|
+
var _n = true;
|
2926
|
+
var _d = false;
|
2927
|
+
var _e = undefined;
|
2928
|
+
|
2929
|
+
try {
|
2930
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
2931
|
+
_arr.push(_s.value);
|
2932
|
+
|
2933
|
+
if (i && _arr.length === i) break;
|
2934
|
+
}
|
2935
|
+
} catch (err) {
|
2936
|
+
_d = true;
|
2937
|
+
_e = err;
|
2938
|
+
} finally {
|
2939
|
+
try {
|
2940
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
2941
|
+
} finally {
|
2942
|
+
if (_d) throw _e;
|
2943
|
+
}
|
2944
|
+
}
|
2945
|
+
|
2946
|
+
return _arr;
|
2947
|
+
}
|
2948
|
+
|
2949
|
+
function _arrayLikeToArray(arr, len) {
|
2950
|
+
if (len == null || len > arr.length) len = arr.length;
|
2951
|
+
|
2952
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
2953
|
+
arr2[i] = arr[i];
|
2954
|
+
}
|
2955
|
+
|
2956
|
+
return arr2;
|
2957
|
+
}
|
2958
|
+
|
2959
|
+
function _unsupportedIterableToArray(o, minLen) {
|
2960
|
+
if (!o) return;
|
2961
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
2962
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
2963
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
2964
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
2965
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
2966
|
+
}
|
2967
|
+
|
2968
|
+
function _nonIterableRest() {
|
2969
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2970
|
+
}
|
2971
|
+
|
2972
|
+
function _slicedToArray(arr, i) {
|
2973
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
2974
|
+
}
|
2975
|
+
|
2976
|
+
var Persistence = /*#__PURE__*/function () {
|
2977
|
+
function Persistence(_ref) {
|
2978
|
+
var cookies = _ref.cookies;
|
2979
|
+
|
2980
|
+
_classCallCheck(this, Persistence);
|
2981
|
+
|
2982
|
+
this.cookies = cookies;
|
2983
|
+
}
|
2984
|
+
|
2985
|
+
_createClass(Persistence, [{
|
2986
|
+
key: "store",
|
2987
|
+
value: function store(vendors, signal) {
|
2988
|
+
var _this = this;
|
2989
|
+
|
2990
|
+
var vendorsByCookieName = vendors.reduce(function (sorted, vendor) {
|
2991
|
+
var cookieName = vendor.cookieName;
|
2992
|
+
sorted[cookieName] = sorted[cookieName] || [];
|
2993
|
+
sorted[cookieName].push(vendor);
|
2994
|
+
return sorted;
|
2995
|
+
}, {});
|
2996
|
+
Object.entries(vendorsByCookieName).forEach(function (_ref2) {
|
2997
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
2998
|
+
cookieName = _ref3[0],
|
2999
|
+
vendors = _ref3[1];
|
3000
|
+
|
3001
|
+
var cookieDomain = vendors[0].cookieDomain;
|
3002
|
+
|
3003
|
+
_this.setCookie(cookieName, JSON.stringify(vendors.reduce(function (result, vendor) {
|
3004
|
+
result[vendor.cookieKey || vendor.name] = signal === 'accepted' ? true : signal === 'denied' ? false : signal[vendor.name];
|
3005
|
+
return result;
|
3006
|
+
}, {})), cookieDomain);
|
3007
|
+
});
|
3008
|
+
}
|
3009
|
+
}, {
|
3010
|
+
key: "update",
|
3011
|
+
value: function update(vendor, signal) {
|
3012
|
+
var content = this.cookies.getItem(vendor.cookieName);
|
3013
|
+
var flags = content ? JSON.parse(content) : {};
|
3014
|
+
this.setCookie(vendor.cookieName, JSON.stringify(_objectSpread2(_objectSpread2({}, flags), {}, _defineProperty({}, vendor.cookieKey || vendor.name, signal))), vendor.cookieDomain);
|
3015
|
+
}
|
3016
|
+
}, {
|
3017
|
+
key: "read",
|
3018
|
+
value: function read(vendor) {
|
3019
|
+
var content = this.cookies.getItem(vendor.cookieName);
|
3020
|
+
var flags = content ? JSON.parse(content) : {};
|
3021
|
+
var flag = flags[vendor.cookieKey || vendor.name];
|
3022
|
+
return flag === true ? 'accepted' : flag === false ? 'denied' : 'undecided';
|
2891
3023
|
}
|
3024
|
+
}, {
|
3025
|
+
key: "setCookie",
|
3026
|
+
value: function setCookie(name, value, domain) {
|
3027
|
+
if (domain && !window.location.hostname.match(new RegExp("".concat(domain, "$")))) {
|
3028
|
+
domain = null;
|
3029
|
+
}
|
3030
|
+
|
3031
|
+
this.cookies.setItem(name, value, {
|
3032
|
+
path: '/',
|
3033
|
+
domain: domain,
|
3034
|
+
expires: Infinity,
|
3035
|
+
// Ensure cookie can be read iframe embed
|
3036
|
+
sameSite: 'None',
|
3037
|
+
secure: true
|
3038
|
+
});
|
3039
|
+
}
|
3040
|
+
}]);
|
2892
3041
|
|
2893
|
-
|
3042
|
+
return Persistence;
|
3043
|
+
}(); // https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
|
3044
|
+
|
3045
|
+
|
3046
|
+
var cookies = {
|
3047
|
+
getItem: function getItem(sKey) {
|
3048
|
+
if (!sKey) {
|
3049
|
+
return null;
|
3050
|
+
} // eslint-disable-next-line no-useless-escape
|
3051
|
+
|
3052
|
+
|
3053
|
+
return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
|
3054
|
+
},
|
3055
|
+
setItem: function setItem() {
|
3056
|
+
document.cookie = setItemCookieString.apply(void 0, arguments);
|
2894
3057
|
return true;
|
2895
3058
|
},
|
2896
3059
|
removeItem: function removeItem(sKey, sPath, sDomain) {
|
@@ -2920,6 +3083,311 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
2920
3083
|
return aKeys;
|
2921
3084
|
}
|
2922
3085
|
};
|
3086
|
+
|
3087
|
+
function setItemCookieString(key, value, expiresOrOptions, path, domain, secure) {
|
3088
|
+
if (expiresOrOptions && typeof expiresOrOptions === 'object' && expiresOrOptions.constructor !== Date) {
|
3089
|
+
return setItemCookieStringWithOptions(key, value, expiresOrOptions);
|
3090
|
+
} else {
|
3091
|
+
return setItemCookieStringWithOptions(key, value, {
|
3092
|
+
expires: expiresOrOptions,
|
3093
|
+
path: path,
|
3094
|
+
domain: domain,
|
3095
|
+
secure: secure
|
3096
|
+
});
|
3097
|
+
}
|
3098
|
+
}
|
3099
|
+
|
3100
|
+
function setItemCookieStringWithOptions(key, value, _ref) {
|
3101
|
+
var expires = _ref.expires,
|
3102
|
+
path = _ref.path,
|
3103
|
+
domain = _ref.domain,
|
3104
|
+
secure = _ref.secure,
|
3105
|
+
sameSite = _ref.sameSite;
|
3106
|
+
var expiresPart = "";
|
3107
|
+
|
3108
|
+
if (expires) {
|
3109
|
+
switch (expires.constructor) {
|
3110
|
+
case Number:
|
3111
|
+
expiresPart = expires === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + expires;
|
3112
|
+
break;
|
3113
|
+
|
3114
|
+
case String:
|
3115
|
+
expiresPart = "; expires=" + expires;
|
3116
|
+
break;
|
3117
|
+
|
3118
|
+
case Date:
|
3119
|
+
expiresPart = "; expires=" + expires.toUTCString();
|
3120
|
+
break;
|
3121
|
+
}
|
3122
|
+
}
|
3123
|
+
|
3124
|
+
return encodeURIComponent(key) + "=" + encodeURIComponent(value) + expiresPart + (domain ? "; domain=" + domain : "") + (path ? "; path=" + path : "") + (sameSite ? "; SameSite=" + sameSite : "") + (secure ? "; Secure" : "");
|
3125
|
+
}
|
3126
|
+
|
3127
|
+
var supportedParadigms = ['external opt-out', 'opt-in', 'lazy opt-in', 'skip'];
|
3128
|
+
|
3129
|
+
var Consent = /*#__PURE__*/function () {
|
3130
|
+
function Consent(_ref) {
|
3131
|
+
var _this = this;
|
3132
|
+
|
3133
|
+
var cookies = _ref.cookies,
|
3134
|
+
inEditor = _ref.inEditor;
|
3135
|
+
|
3136
|
+
_classCallCheck(this, Consent);
|
3137
|
+
|
3138
|
+
this.requestedPromise = new Promise(function (resolve) {
|
3139
|
+
_this.requestedPromiseResolve = resolve;
|
3140
|
+
});
|
3141
|
+
this.vendors = [];
|
3142
|
+
this.persistence = new Persistence({
|
3143
|
+
cookies: cookies
|
3144
|
+
});
|
3145
|
+
this.emitter = _objectSpread2({}, backboneEventsStandalone$1);
|
3146
|
+
this.inEditor = inEditor;
|
3147
|
+
}
|
3148
|
+
|
3149
|
+
_createClass(Consent, [{
|
3150
|
+
key: "registerVendor",
|
3151
|
+
value: function registerVendor(name, _ref2) {
|
3152
|
+
var displayName = _ref2.displayName,
|
3153
|
+
description = _ref2.description,
|
3154
|
+
paradigm = _ref2.paradigm,
|
3155
|
+
cookieName = _ref2.cookieName,
|
3156
|
+
cookieKey = _ref2.cookieKey,
|
3157
|
+
cookieDomain = _ref2.cookieDomain;
|
3158
|
+
|
3159
|
+
if (this.vendorRegistrationClosed) {
|
3160
|
+
throw new Error("Vendor ".concat(name, " has been registered after ") + 'registration has been closed.');
|
3161
|
+
}
|
3162
|
+
|
3163
|
+
if (!name.match(/^[a-z0-9-_]+$/i)) {
|
3164
|
+
throw new Error("Invalid vendor name '".concat(name, "'. ") + 'Only letters, numbers, hyphens and underscores are allowed.');
|
3165
|
+
}
|
3166
|
+
|
3167
|
+
if (supportedParadigms.indexOf(paradigm) < 0) {
|
3168
|
+
throw new Error("unknown paradigm ".concat(paradigm));
|
3169
|
+
}
|
3170
|
+
|
3171
|
+
this.vendors.push({
|
3172
|
+
displayName: displayName,
|
3173
|
+
description: description,
|
3174
|
+
name: name,
|
3175
|
+
paradigm: paradigm,
|
3176
|
+
cookieName: cookieName || 'pageflow_consent',
|
3177
|
+
cookieKey: cookieKey,
|
3178
|
+
cookieDomain: cookieDomain
|
3179
|
+
});
|
3180
|
+
}
|
3181
|
+
}, {
|
3182
|
+
key: "closeVendorRegistration",
|
3183
|
+
value: function closeVendorRegistration() {
|
3184
|
+
var _this2 = this;
|
3185
|
+
|
3186
|
+
this.vendorRegistrationClosed = true;
|
3187
|
+
|
3188
|
+
if (!this.getUndecidedOptInVendors().length) {
|
3189
|
+
this.triggerDecisionEvents();
|
3190
|
+
return;
|
3191
|
+
}
|
3192
|
+
|
3193
|
+
var vendors = this.getRequestedVendors();
|
3194
|
+
this.requestedPromiseResolve({
|
3195
|
+
vendors: this.withState(vendors),
|
3196
|
+
acceptAll: function acceptAll() {
|
3197
|
+
_this2.persistence.store(vendors, 'accepted');
|
3198
|
+
|
3199
|
+
_this2.triggerDecisionEvents();
|
3200
|
+
},
|
3201
|
+
denyAll: function denyAll() {
|
3202
|
+
_this2.persistence.store(vendors, 'denied');
|
3203
|
+
|
3204
|
+
_this2.triggerDecisionEvents();
|
3205
|
+
},
|
3206
|
+
save: function save(vendorConsent) {
|
3207
|
+
_this2.persistence.store(vendors, vendorConsent);
|
3208
|
+
|
3209
|
+
_this2.triggerDecisionEvents();
|
3210
|
+
}
|
3211
|
+
});
|
3212
|
+
}
|
3213
|
+
}, {
|
3214
|
+
key: "relevantVendors",
|
3215
|
+
value: function relevantVendors() {
|
3216
|
+
var _this3 = this;
|
3217
|
+
|
3218
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
3219
|
+
additionalVendorNames = _ref3.include;
|
3220
|
+
|
3221
|
+
return this.withState(this.vendors.filter(function (vendor) {
|
3222
|
+
return (additionalVendorNames === null || additionalVendorNames === void 0 ? void 0 : additionalVendorNames.includes(vendor.name)) || vendor.paradigm === 'opt-in' || vendor.paradigm === 'external opt-out' || vendor.paradigm === 'lazy opt-in' && _this3.persistence.read(vendor) !== 'undecided';
|
3223
|
+
}));
|
3224
|
+
}
|
3225
|
+
}, {
|
3226
|
+
key: "require",
|
3227
|
+
value: function require(vendorName) {
|
3228
|
+
var _this4 = this;
|
3229
|
+
|
3230
|
+
if (this.inEditor) {
|
3231
|
+
return Promise.resolve('fulfilled');
|
3232
|
+
}
|
3233
|
+
|
3234
|
+
var vendor = this.findVendor(vendorName, 'require consent for');
|
3235
|
+
|
3236
|
+
switch (vendor.paradigm) {
|
3237
|
+
case 'opt-in':
|
3238
|
+
case 'lazy opt-in':
|
3239
|
+
if (this.getUndecidedOptInVendors().length) {
|
3240
|
+
return new Promise(function (resolve) {
|
3241
|
+
_this4.emitter.once("".concat(vendor.name, ":accepted"), function () {
|
3242
|
+
return resolve('fulfilled');
|
3243
|
+
});
|
3244
|
+
|
3245
|
+
_this4.emitter.once("".concat(vendor.name, ":denied"), function () {
|
3246
|
+
return resolve('failed');
|
3247
|
+
});
|
3248
|
+
});
|
3249
|
+
}
|
3250
|
+
|
3251
|
+
if (this.persistence.read(vendor) === 'accepted') {
|
3252
|
+
return Promise.resolve('fulfilled');
|
3253
|
+
} else {
|
3254
|
+
return Promise.resolve('failed');
|
3255
|
+
}
|
3256
|
+
|
3257
|
+
case 'external opt-out':
|
3258
|
+
if (this.persistence.read(vendor) === 'denied') {
|
3259
|
+
return Promise.resolve('failed');
|
3260
|
+
}
|
3261
|
+
|
3262
|
+
return Promise.resolve('fulfilled');
|
3263
|
+
|
3264
|
+
case 'skip':
|
3265
|
+
return Promise.resolve('fulfilled');
|
3266
|
+
|
3267
|
+
default:
|
3268
|
+
// should not be used
|
3269
|
+
return null;
|
3270
|
+
}
|
3271
|
+
}
|
3272
|
+
}, {
|
3273
|
+
key: "requireAccepted",
|
3274
|
+
value: function requireAccepted(vendorName) {
|
3275
|
+
var _this5 = this;
|
3276
|
+
|
3277
|
+
if (this.inEditor) {
|
3278
|
+
return Promise.resolve('fulfilled');
|
3279
|
+
}
|
3280
|
+
|
3281
|
+
var vendor = this.findVendor(vendorName, 'require consent for');
|
3282
|
+
|
3283
|
+
if (vendor.paradigm === 'opt-in' || vendor.paradigm === 'lazy opt-in') {
|
3284
|
+
if (this.getUndecidedOptInVendors().length || this.persistence.read(vendor) !== 'accepted') {
|
3285
|
+
return new Promise(function (resolve) {
|
3286
|
+
_this5.emitter.once("".concat(vendor.name, ":accepted"), function () {
|
3287
|
+
return resolve('fulfilled');
|
3288
|
+
});
|
3289
|
+
});
|
3290
|
+
}
|
3291
|
+
|
3292
|
+
return Promise.resolve('fulfilled');
|
3293
|
+
} else {
|
3294
|
+
return this.require(vendorName);
|
3295
|
+
}
|
3296
|
+
}
|
3297
|
+
}, {
|
3298
|
+
key: "requested",
|
3299
|
+
value: function requested() {
|
3300
|
+
return this.requestedPromise;
|
3301
|
+
}
|
3302
|
+
}, {
|
3303
|
+
key: "accept",
|
3304
|
+
value: function accept(vendorName) {
|
3305
|
+
var vendor = this.findVendor(vendorName, 'accept');
|
3306
|
+
this.persistence.update(vendor, true);
|
3307
|
+
this.emitter.trigger("".concat(vendor.name, ":accepted"));
|
3308
|
+
}
|
3309
|
+
}, {
|
3310
|
+
key: "deny",
|
3311
|
+
value: function deny(vendorName) {
|
3312
|
+
var vendor = this.findVendor(vendorName, 'deny');
|
3313
|
+
this.persistence.update(vendor, false);
|
3314
|
+
}
|
3315
|
+
}, {
|
3316
|
+
key: "getRequestedVendors",
|
3317
|
+
value: function getRequestedVendors() {
|
3318
|
+
return this.vendors.filter(function (vendor) {
|
3319
|
+
return vendor.paradigm !== 'skip';
|
3320
|
+
});
|
3321
|
+
}
|
3322
|
+
}, {
|
3323
|
+
key: "getUndecidedOptInVendors",
|
3324
|
+
value: function getUndecidedOptInVendors() {
|
3325
|
+
var _this6 = this;
|
3326
|
+
|
3327
|
+
return this.vendors.filter(function (vendor) {
|
3328
|
+
return vendor.paradigm === 'opt-in' && _this6.persistence.read(vendor) === 'undecided';
|
3329
|
+
});
|
3330
|
+
}
|
3331
|
+
}, {
|
3332
|
+
key: "triggerDecisionEvents",
|
3333
|
+
value: function triggerDecisionEvents() {
|
3334
|
+
var _this7 = this;
|
3335
|
+
|
3336
|
+
this.vendors.filter(function (vendor) {
|
3337
|
+
return vendor.paradigm !== 'skip';
|
3338
|
+
}).forEach(function (vendor) {
|
3339
|
+
_this7.emitter.trigger("".concat(vendor.name, ":").concat(_this7.persistence.read(vendor)));
|
3340
|
+
});
|
3341
|
+
}
|
3342
|
+
}, {
|
3343
|
+
key: "findVendor",
|
3344
|
+
value: function findVendor(vendorName, actionForErrorMessage) {
|
3345
|
+
var vendor = this.vendors.find(function (vendor) {
|
3346
|
+
return vendor.name === vendorName;
|
3347
|
+
});
|
3348
|
+
|
3349
|
+
if (!vendor) {
|
3350
|
+
throw new Error("Cannot ".concat(actionForErrorMessage, " unknown vendor \"").concat(vendorName, "\". ") + 'Consider using consent.registerVendor.');
|
3351
|
+
}
|
3352
|
+
|
3353
|
+
return vendor;
|
3354
|
+
}
|
3355
|
+
}, {
|
3356
|
+
key: "withState",
|
3357
|
+
value: function withState(vendors) {
|
3358
|
+
var _this8 = this;
|
3359
|
+
|
3360
|
+
return vendors.map(function (vendor) {
|
3361
|
+
return _objectSpread2(_objectSpread2({}, vendor), {}, {
|
3362
|
+
state: _this8.persistence.read(vendor)
|
3363
|
+
});
|
3364
|
+
});
|
3365
|
+
}
|
3366
|
+
}]);
|
3367
|
+
|
3368
|
+
return Consent;
|
3369
|
+
}();
|
3370
|
+
|
3371
|
+
Consent.create = function () {
|
3372
|
+
var inEditor = typeof PAGEFLOW_EDITOR !== 'undefined' && PAGEFLOW_EDITOR;
|
3373
|
+
return new Consent({
|
3374
|
+
cookies: cookies,
|
3375
|
+
inEditor: inEditor
|
3376
|
+
});
|
3377
|
+
};
|
3378
|
+
|
3379
|
+
var log = function log(text, options) {
|
3380
|
+
if (window.console && (debugMode() || options && options.force)) {
|
3381
|
+
window.console.log(text);
|
3382
|
+
}
|
3383
|
+
};
|
3384
|
+
|
3385
|
+
var debugMode = function debugMode() {
|
3386
|
+
return window.location.href.indexOf('debug=true') >= 0;
|
3387
|
+
};
|
3388
|
+
|
3389
|
+
var state = typeof window !== 'undefined' && window.pageflow || {};
|
3390
|
+
var assetUrls = state.assetUrls || {};
|
2923
3391
|
var events = Object.assign({}, backboneEventsStandalone$1);
|
2924
3392
|
/**
|
2925
3393
|
* Detect browser via user agent. Use only if feature detection is not
|
@@ -2975,6 +3443,14 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
2975
3443
|
matchesiPadSafari13AndAbove();
|
2976
3444
|
},
|
2977
3445
|
|
3446
|
+
/**
|
3447
|
+
* Returns true on Android.
|
3448
|
+
* @return {boolean}
|
3449
|
+
*/
|
3450
|
+
matchesAndroid: function matchesAndroid() {
|
3451
|
+
return matches(/Android/i);
|
3452
|
+
},
|
3453
|
+
|
2978
3454
|
/**
|
2979
3455
|
* Returns true on iOS or Android.
|
2980
3456
|
* @return {boolean}
|
@@ -3191,9 +3667,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3191
3667
|
});
|
3192
3668
|
};
|
3193
3669
|
|
3194
|
-
asyncHas.all = function ()
|
3195
|
-
/* arguments */
|
3196
|
-
{
|
3670
|
+
asyncHas.all = function () {
|
3197
3671
|
return Promise.all(arguments).then(function (results) {
|
3198
3672
|
return results.every(function (result) {
|
3199
3673
|
return result;
|
@@ -3301,9 +3775,6 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3301
3775
|
browser.feature('mse and native hls support', function (has) {
|
3302
3776
|
return agent.matchesSafari() && !agent.matchesMobilePlatform();
|
3303
3777
|
});
|
3304
|
-
browser.feature('hls support', function (has) {
|
3305
|
-
return agent.matchesSafari() || agent.matchesMobilePlatform();
|
3306
|
-
});
|
3307
3778
|
browser.feature('native video player', function (has) {
|
3308
3779
|
return has('iphone platform');
|
3309
3780
|
});
|
@@ -3315,28 +3786,6 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3315
3786
|
});
|
3316
3787
|
browser.agent = agent;
|
3317
3788
|
browser.Agent = Agent;
|
3318
|
-
|
3319
|
-
function _classCallCheck(instance, Constructor) {
|
3320
|
-
if (!(instance instanceof Constructor)) {
|
3321
|
-
throw new TypeError("Cannot call a class as a function");
|
3322
|
-
}
|
3323
|
-
}
|
3324
|
-
|
3325
|
-
function _defineProperties(target, props) {
|
3326
|
-
for (var i = 0; i < props.length; i++) {
|
3327
|
-
var descriptor = props[i];
|
3328
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
3329
|
-
descriptor.configurable = true;
|
3330
|
-
if ("value" in descriptor) descriptor.writable = true;
|
3331
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
3332
|
-
}
|
3333
|
-
}
|
3334
|
-
|
3335
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
3336
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
3337
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
3338
|
-
return Constructor;
|
3339
|
-
}
|
3340
3789
|
/**
|
3341
3790
|
* Let plugins register functions which extend the editor or
|
3342
3791
|
* slideshow with certain functionality when a named feature is
|
@@ -3346,10 +3795,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3346
3795
|
* @since 0.9
|
3347
3796
|
*/
|
3348
3797
|
|
3349
|
-
|
3350
|
-
var Features =
|
3351
|
-
/*#__PURE__*/
|
3352
|
-
function () {
|
3798
|
+
var Features = /*#__PURE__*/function () {
|
3353
3799
|
/** @lends pageflow.features */
|
3354
3800
|
|
3355
3801
|
/** @api private */
|
@@ -3367,9 +3813,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3367
3813
|
|
3368
3814
|
_createClass(Features, [{
|
3369
3815
|
key: "has",
|
3370
|
-
value: function has()
|
3371
|
-
/* arguments */
|
3372
|
-
{
|
3816
|
+
value: function has() {
|
3373
3817
|
return browser.has.apply(browser, arguments);
|
3374
3818
|
}
|
3375
3819
|
/**
|
@@ -3421,61 +3865,10 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3421
3865
|
|
3422
3866
|
var features = new Features();
|
3423
3867
|
|
3424
|
-
function _defineProperty(obj, key, value) {
|
3425
|
-
if (key in obj) {
|
3426
|
-
Object.defineProperty(obj, key, {
|
3427
|
-
value: value,
|
3428
|
-
enumerable: true,
|
3429
|
-
configurable: true,
|
3430
|
-
writable: true
|
3431
|
-
});
|
3432
|
-
} else {
|
3433
|
-
obj[key] = value;
|
3434
|
-
}
|
3435
|
-
|
3436
|
-
return obj;
|
3437
|
-
}
|
3438
|
-
|
3439
|
-
function ownKeys$1(object, enumerableOnly) {
|
3440
|
-
var keys = Object.keys(object);
|
3441
|
-
|
3442
|
-
if (Object.getOwnPropertySymbols) {
|
3443
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
3444
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
3445
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
3446
|
-
});
|
3447
|
-
keys.push.apply(keys, symbols);
|
3448
|
-
}
|
3449
|
-
|
3450
|
-
return keys;
|
3451
|
-
}
|
3452
|
-
|
3453
|
-
function _objectSpread2(target) {
|
3454
|
-
for (var i = 1; i < arguments.length; i++) {
|
3455
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
3456
|
-
|
3457
|
-
if (i % 2) {
|
3458
|
-
ownKeys$1(Object(source), true).forEach(function (key) {
|
3459
|
-
_defineProperty(target, key, source[key]);
|
3460
|
-
});
|
3461
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
3462
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
3463
|
-
} else {
|
3464
|
-
ownKeys$1(Object(source)).forEach(function (key) {
|
3465
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
3466
|
-
});
|
3467
|
-
}
|
3468
|
-
}
|
3469
|
-
|
3470
|
-
return target;
|
3471
|
-
}
|
3472
|
-
|
3473
3868
|
var handleFailedPlay = function handleFailedPlay(player, options) {
|
3474
3869
|
var originalPlay = player.play;
|
3475
3870
|
|
3476
|
-
player.play = function ()
|
3477
|
-
/* arguments */
|
3478
|
-
{
|
3871
|
+
player.play = function () {
|
3479
3872
|
var result = originalPlay.apply(player, arguments);
|
3480
3873
|
|
3481
3874
|
if (result && typeof result["catch"] !== 'undefined') {
|
@@ -3507,16 +3900,12 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3507
3900
|
var intendingToPlay = false;
|
3508
3901
|
var intendingToPause = false;
|
3509
3902
|
|
3510
|
-
player.play = function ()
|
3511
|
-
/* arguments */
|
3512
|
-
{
|
3903
|
+
player.play = function () {
|
3513
3904
|
player.intendToPlay();
|
3514
3905
|
return originalPlay.apply(player, arguments);
|
3515
3906
|
};
|
3516
3907
|
|
3517
|
-
player.pause = function ()
|
3518
|
-
/* arguments */
|
3519
|
-
{
|
3908
|
+
player.pause = function () {
|
3520
3909
|
player.intendToPause();
|
3521
3910
|
return originalPause.apply(player, arguments);
|
3522
3911
|
};
|
@@ -3565,9 +3954,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3565
3954
|
_hooks = newHooks;
|
3566
3955
|
};
|
3567
3956
|
|
3568
|
-
player.play = function ()
|
3569
|
-
/* args */
|
3570
|
-
{
|
3957
|
+
player.play = function () {
|
3571
3958
|
var args = arguments;
|
3572
3959
|
player.trigger('beforeplay');
|
3573
3960
|
player.intendToPlay();
|
@@ -3874,9 +4261,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3874
4261
|
|
3875
4262
|
player.one('dispose', cancelFadeVolume);
|
3876
4263
|
|
3877
|
-
function volume()
|
3878
|
-
/* arguments */
|
3879
|
-
{
|
4264
|
+
function volume() {
|
3880
4265
|
return originalVolume.apply(player, arguments);
|
3881
4266
|
}
|
3882
4267
|
|
@@ -3917,9 +4302,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3917
4302
|
var loadWaiting = function loadWaiting(player) {
|
3918
4303
|
var originalFadeVolume = player.fadeVolume;
|
3919
4304
|
|
3920
|
-
player.fadeVolume = function ()
|
3921
|
-
/* args */
|
3922
|
-
{
|
4305
|
+
player.fadeVolume = function () {
|
3923
4306
|
var args = arguments;
|
3924
4307
|
return Promise.all([this.loadedPromise]).then(function () {
|
3925
4308
|
return originalFadeVolume.apply(player, args);
|
@@ -3927,9 +4310,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
3927
4310
|
};
|
3928
4311
|
};
|
3929
4312
|
|
3930
|
-
var Settings =
|
3931
|
-
/*#__PURE__*/
|
3932
|
-
function () {
|
4313
|
+
var Settings = /*#__PURE__*/function () {
|
3933
4314
|
function Settings() {
|
3934
4315
|
_classCallCheck(this, Settings);
|
3935
4316
|
|
@@ -4321,16 +4702,6 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
4321
4702
|
AudioPlayer.rewindMethod = rewindMethod;
|
4322
4703
|
AudioPlayer.pauseInBackground = pauseInBackground;
|
4323
4704
|
|
4324
|
-
function _arrayLikeToArray(arr, len) {
|
4325
|
-
if (len == null || len > arr.length) len = arr.length;
|
4326
|
-
|
4327
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
4328
|
-
arr2[i] = arr[i];
|
4329
|
-
}
|
4330
|
-
|
4331
|
-
return arr2;
|
4332
|
-
}
|
4333
|
-
|
4334
4705
|
function _arrayWithoutHoles(arr) {
|
4335
4706
|
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
4336
4707
|
}
|
@@ -4339,15 +4710,6 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
4339
4710
|
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
4340
4711
|
}
|
4341
4712
|
|
4342
|
-
function _unsupportedIterableToArray(o, minLen) {
|
4343
|
-
if (!o) return;
|
4344
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
4345
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
4346
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
4347
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
4348
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
4349
|
-
}
|
4350
|
-
|
4351
4713
|
function _nonIterableSpread() {
|
4352
4714
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
4353
4715
|
}
|
@@ -4795,9 +5157,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
4795
5157
|
* Media pool class handles the pool of Videojs media players
|
4796
5158
|
*/
|
4797
5159
|
|
4798
|
-
var MediaPool =
|
4799
|
-
/*#__PURE__*/
|
4800
|
-
function () {
|
5160
|
+
var MediaPool = /*#__PURE__*/function () {
|
4801
5161
|
function MediaPool() {
|
4802
5162
|
var _this$mediaFactory_;
|
4803
5163
|
|
@@ -5362,6 +5722,8 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
5362
5722
|
};
|
5363
5723
|
}
|
5364
5724
|
|
5725
|
+
var consent = Consent.create();
|
5726
|
+
|
5365
5727
|
/**
|
5366
5728
|
* Mute feature settings for background media (ATMO and background videos)
|
5367
5729
|
*
|
@@ -5944,6 +6306,19 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
5944
6306
|
};
|
5945
6307
|
return {
|
5946
6308
|
repository: [],
|
6309
|
+
initializers: {},
|
6310
|
+
registerInitializer: function registerInitializer(name, fn) {
|
6311
|
+
this.initializers[name] = fn;
|
6312
|
+
},
|
6313
|
+
invokeInitializers: function invokeInitializers(pages) {
|
6314
|
+
var _this = this;
|
6315
|
+
|
6316
|
+
_.each(pages, function (page) {
|
6317
|
+
if (_this.initializers[page.template]) {
|
6318
|
+
_this.initializers[page.template](page.configuration);
|
6319
|
+
}
|
6320
|
+
});
|
6321
|
+
},
|
5947
6322
|
register: function register(name, pageType) {
|
5948
6323
|
var constructor = function constructor() {};
|
5949
6324
|
|
@@ -8830,6 +9205,29 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
8830
9205
|
});
|
8831
9206
|
})($);
|
8832
9207
|
|
9208
|
+
$.widget('pageflow.thirdPartyEmbedConsent', {
|
9209
|
+
_create: function _create() {
|
9210
|
+
var element = this.element;
|
9211
|
+
var vendorName = this.element.find('[data-consent-vendor]').data('consentVendor');
|
9212
|
+
|
9213
|
+
if (!vendorName) {
|
9214
|
+
return;
|
9215
|
+
}
|
9216
|
+
|
9217
|
+
consent.requireAccepted(vendorName).then(function (result) {
|
9218
|
+
if (result === 'fulfilled') {
|
9219
|
+
element.addClass('consent_given');
|
9220
|
+
}
|
9221
|
+
});
|
9222
|
+
|
9223
|
+
this._on(this.element, {
|
9224
|
+
'click .third_party_embed_opt_in-button': function clickThird_party_embed_opt_inButton() {
|
9225
|
+
consent.accept(vendorName);
|
9226
|
+
}
|
9227
|
+
});
|
9228
|
+
}
|
9229
|
+
});
|
9230
|
+
|
8833
9231
|
(function ($) {
|
8834
9232
|
$.widget('pageflow.topButton', {
|
8835
9233
|
_create: function _create() {
|
@@ -9007,11 +9405,13 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9007
9405
|
});
|
9008
9406
|
$('.overview').overview();
|
9009
9407
|
$('.multimedia_alert').multimediaAlert();
|
9408
|
+
pageType.invokeInitializers(state$1.pages);
|
9010
9409
|
widgetTypes.enhance(body);
|
9011
9410
|
delayedStart.perform();
|
9012
9411
|
phoneLandscapeFullscreen();
|
9013
9412
|
}
|
9014
9413
|
});
|
9414
|
+
consent.closeVendorRegistration();
|
9015
9415
|
});
|
9016
9416
|
links.setup();
|
9017
9417
|
FocusOutline.setup(body);
|
@@ -9117,9 +9517,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9117
9517
|
return videoPlayer && videoPlayer.paused();
|
9118
9518
|
};
|
9119
9519
|
|
9120
|
-
this.volume = function ()
|
9121
|
-
/* arguments */
|
9122
|
-
{
|
9520
|
+
this.volume = function () {
|
9123
9521
|
if (!videoPlayer) {
|
9124
9522
|
return 0;
|
9125
9523
|
}
|
@@ -9136,9 +9534,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9136
9534
|
};
|
9137
9535
|
|
9138
9536
|
_.each(['play', 'playAndFadeIn', 'pause', 'fadeOutAndPause', 'prebuffer', 'src', 'on', 'load', 'currentTime', 'muted'], function (method) {
|
9139
|
-
that[method] = function ()
|
9140
|
-
/* args */
|
9141
|
-
{
|
9537
|
+
that[method] = function () {
|
9142
9538
|
var args = arguments;
|
9143
9539
|
|
9144
9540
|
if (!videoPlayer) {
|
@@ -9193,6 +9589,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9193
9589
|
exports.Audio = Audio;
|
9194
9590
|
exports.AudioPlayer = AudioPlayer;
|
9195
9591
|
exports.ChapterFilter = ChapterFilter;
|
9592
|
+
exports.Consent = Consent;
|
9196
9593
|
exports.DelayedStart = DelayedStart;
|
9197
9594
|
exports.DomOrderScrollNavigator = DomOrderScrollNavigator;
|
9198
9595
|
exports.EntryData = EntryData;
|
@@ -9220,6 +9617,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9220
9617
|
exports.blankSources = blankSources;
|
9221
9618
|
exports.browser = browser;
|
9222
9619
|
exports.commonPageCssClasses = commonPageCssClasses;
|
9620
|
+
exports.consent = consent;
|
9223
9621
|
exports.cookieNotice = cookieNotice;
|
9224
9622
|
exports.cookies = cookies;
|
9225
9623
|
exports.debugMode = debugMode;
|
@@ -9246,6 +9644,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
|
|
9246
9644
|
exports.preload = preload;
|
9247
9645
|
exports.ready = ready;
|
9248
9646
|
exports.readyDeferred = readyDeferred;
|
9647
|
+
exports.setItemCookieString = setItemCookieString;
|
9249
9648
|
exports.settings = settings;
|
9250
9649
|
exports.theme = theme;
|
9251
9650
|
exports.videoHelpers = videoHelpers;
|