<commit_before>(ns asciinema.player.source
  (:refer-clojure :exclude [js->clj])
  (:require [cljs.core.async :refer [chan >! <! put! close! timeout poll!]]
            [goog.net.XhrIo :as xhr]
            [schema.core :as s]
            [asciinema.player.format.asciicast-v0 :as v0]
            [asciinema.player.format.asciicast-v1 :as v1]
            [asciinema.player.frames :as f]
            [asciinema.vt :as vt]
            [asciinema.player.messages :as m]
            [asciinema.player.util :as util]
            [asciinema.player.patch :refer [js->clj]])
  (:require-macros [cljs.core.async.macros :refer [go go-loop]]))

(defprotocol Source
  (init [this] "Initializes the source")
  (close [this] "Closes the source, stopping all processes and connections")
  (start [this] "Starts the playback")
  (stop [this] "Stops the playback")
  (toggle [this] "Toggles the playback on/off")
  (seek [this time] "Jumps to the given time")
  (change-speed [this speed] "Changes playback speed (1.0 is normal speed)"))

(defmulti make-source
  "Returns a Source instance for given type and args."
  (fn [url {:keys [type]}]<commit_msg>Remove unused require<commit_after>(ns asciinema.player.source
  (:refer-clojure :exclude [js->clj])
  (:require [cljs.core.async :refer [chan >! <! put! close! timeout poll!]]
            [goog.net.XhrIo :as xhr]
            [asciinema.player.format.asciicast-v0 :as v0]
            [asciinema.player.format.asciicast-v1 :as v1]
            [asciinema.player.frames :as f]
            [asciinema.vt :as vt]
            [asciinema.player.messages :as m]
            [asciinema.player.util :as util]
            [asciinema.player.patch :refer [js->clj]])
  (:require-macros [cljs.core.async.macros :refer [go go-loop]]))

(defprotocol Source
  (init [this] "Initializes the source")
  (close [this] "Closes the source, stopping all processes and connections")
  (start [this] "Starts the playback")
  (stop [this] "Stops the playback")
  (toggle [this] "Toggles the playback on/off")
  (seek [this time] "Jumps to the given time")
  (change-speed [this speed] "Changes playback speed (1.0 is normal speed)"))

(defmulti make-source
  "Returns a Source instance for given type and args."
  (fn [url {:keys [type]}]
{'fraction_non_alphanumeric': 0.14056939501779359, 'fraction_numerical': 0.005338078291814947, 'mean_word_length': 3.0669077757685352, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7128189', 'n_tokens_mistral': 774, 'n_tokens_neox': 780, 'n_words': 220}