<commit_before>goog.provide 'acorn.shells.CollectionShell'

goog.require 'acorn.shells.Shell'



Shell = acorn.shells.Shell


# CollectionShell -- one shell to contain them all.
#
# The idea behind CollectionShell is that it provides a generic group for
# other shells. It provides the basic, core functionality necessary
# to construct one unified shell out of other "subshells".
#
# Types of media groups made possible by CollectionShell are, for example:
# * Playlists
# * Galleries
# * Slideshows
# * Spliced Video
#
# CollectionShell does its magic by a simple abstraction, it interacts with
# acorn as one single shell, and then directs actions/events to the specific
# subshells that should get them.
#
# CollectionShell is represented by a list (array) of subshells.
# For example:
#
# {
#   "shellid": "acorn.CollectionShell",
#   "shells": [
#     {
#       "link": "http://www.youtube.com/watch?v=OQSNhk5ICTI",
#       "shell": "acorn.YouTubeShell",
#     },
#     {
#       "link": "http://www.youtube.com/watch?v=MX0D4oZwCsA",
#       "shell": "acorn.YouTubeShell"
#     }
#   ]
# }
#
# Note that the order of the shells in the array is significant, as
# CollectionShell uses this order to present the subshells.

CollectionShell = acorn.shells.CollectionShell =

  id: 'acorn.CollectionShell'
  title: 'CollectionShell'
  description: 'Collection shell'
  icon: 'icon-sitemap'



class CollectionShell.Model extends Shell.Model


  initialize: =>
    super

    unless @get 'shells'
      @set 'shells', []


  # lazily construct shells collection<commit_msg>CollectionView: defaultThumbnail is first shell's<commit_after>goog.provide 'acorn.shells.CollectionShell'

goog.require 'acorn.shells.Shell'



Shell = acorn.shells.Shell


# CollectionShell -- one shell to contain them all.
#
# The idea behind CollectionShell is that it provides a generic group for
# other shells. It provides the basic, core functionality necessary
# to construct one unified shell out of other "subshells".
#
# Types of media groups made possible by CollectionShell are, for example:
# * Playlists
# * Galleries
# * Slideshows
# * Spliced Video
#
# CollectionShell does its magic by a simple abstraction, it interacts with
# acorn as one single shell, and then directs actions/events to the specific
# subshells that should get them.
#
# CollectionShell is represented by a list (array) of subshells.
# For example:
#
# {
#   "shellid": "acorn.CollectionShell",
#   "shells": [
#     {
#       "link": "http://www.youtube.com/watch?v=OQSNhk5ICTI",
#       "shell": "acorn.YouTubeShell",
#     },
#     {
#       "link": "http://www.youtube.com/watch?v=MX0D4oZwCsA",
#       "shell": "acorn.YouTubeShell"
#     }
#   ]
# }
#
# Note that the order of the shells in the array is significant, as
# CollectionShell uses this order to present the subshells.

CollectionShell = acorn.shells.CollectionShell =

  id: 'acorn.CollectionShell'
  title: 'CollectionShell'
  description: 'Collection shell'
  icon: 'icon-sitemap'



class CollectionShell.Model extends Shell.Model


  initialize: =>
    super

    unless @get 'shells'
      @set 'shells', []


  defaultThumbnail: =>
    @shells().first()?.thumbnail() or super


  # lazily construct shells collection
{'fraction_non_alphanumeric': 0.10796677945247617, 'fraction_numerical': 0.001845585973546601, 'mean_word_length': 3.740524781341108, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1356158', 'n_tokens_mistral': 1044, 'n_tokens_neox': 990, 'n_words': 319}