Merge branch 'MDL-32358' of https://github.com/ppichet/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 16 Apr 2012 06:31:07 +0000 (14:31 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 16 Apr 2012 06:31:07 +0000 (14:31 +0800)
155 files changed:
admin/tool/qeupgradehelper/README.txt
admin/tool/qeupgradehelper/cli/convert.php [new file with mode: 0644]
admin/tool/qeupgradehelper/locallib.php
admin/webservice/forms.php
auth/ldap/auth.php
backup/util/checks/backup_check.class.php
backup/util/dbops/backup_controller_dbops.class.php
backup/util/dbops/restore_controller_dbops.class.php
backup/util/dbops/simpletest/testdbops.php
backup/util/dbops/tests/dbops_test.php
filter/mediaplugin/filter.php
grade/report/grader/lib.php
lang/en/question.php
lib/adminlib.php
lib/ddl/database_manager.php
lib/ddl/mssql_sql_generator.php
lib/ddl/mysql_sql_generator.php
lib/ddl/oracle_sql_generator.php
lib/ddl/postgres_sql_generator.php
lib/ddl/simpletest/testddl.php
lib/ddl/sql_generator.php
lib/ddl/tests/ddl_test.php
lib/dml/moodle_database.php
lib/dml/moodle_temptables.php
lib/dml/mssql_native_moodle_database.php
lib/dml/oci_native_moodle_database.php
lib/dml/pgsql_native_moodle_database.php
lib/dml/sqlsrv_native_moodle_database.php
lib/externallib.php
lib/flowplayer/README.txt
lib/flowplayer/README_audio.txt [new file with mode: 0644]
lib/flowplayer/flowplayer-3.2.6.js [deleted file]
lib/flowplayer/flowplayer-3.2.7.swf [deleted file]
lib/flowplayer/flowplayer-3.2.8.js [new file with mode: 0644]
lib/flowplayer/flowplayer-3.2.8.min.js [new file with mode: 0644]
lib/flowplayer/flowplayer-3.2.9.swf [new file with mode: 0644]
lib/flowplayer/flowplayer.audio-3.2.2.swf [deleted file]
lib/flowplayer/flowplayer.audio-3.2.8.swf [new file with mode: 0644]
lib/flowplayer/flowplayer.controls-3.2.5.swf [deleted file]
lib/flowplayer/flowplayer.controls-3.2.9.swf [new file with mode: 0644]
lib/flowplayer/readme_moodle.txt
lib/form/selectgroups.php
lib/formslib.php
lib/javascript-static.js
lib/outputrenderers.php
lib/pdflib.php
lib/pear/HTML/Common.php
lib/pear/HTML/QuickForm.php
lib/pear/HTML/QuickForm/file.php
lib/pear/HTML/QuickForm/select.php
lib/phpunit/generatorlib.php
lib/pluginlib.php
lib/resourcelib.php
lib/tcpdf/2dbarcodes.php
lib/tcpdf/CHANGELOG.TXT
lib/tcpdf/LICENSE.TXT
lib/tcpdf/README.TXT
lib/tcpdf/barcodes.php
lib/tcpdf/config/tcpdf_config.php
lib/tcpdf/datamatrix.php
lib/tcpdf/encodings_maps.php
lib/tcpdf/fonts/freemono.ctg.z
lib/tcpdf/fonts/freemono.php
lib/tcpdf/fonts/freemonob.ctg.z
lib/tcpdf/fonts/freemonob.php
lib/tcpdf/fonts/freemonobi.ctg.z
lib/tcpdf/fonts/freemonobi.php
lib/tcpdf/fonts/freemonoi.ctg.z
lib/tcpdf/fonts/freemonoi.php
lib/tcpdf/fonts/freesans.ctg.z
lib/tcpdf/fonts/freesans.php
lib/tcpdf/fonts/freesansb.ctg.z
lib/tcpdf/fonts/freesansb.php
lib/tcpdf/fonts/freesansbi.ctg.z
lib/tcpdf/fonts/freesansbi.php
lib/tcpdf/fonts/freesansi.ctg.z
lib/tcpdf/fonts/freesansi.php
lib/tcpdf/fonts/freeserif.ctg.z
lib/tcpdf/fonts/freeserif.php
lib/tcpdf/fonts/freeserifb.ctg.z
lib/tcpdf/fonts/freeserifb.php
lib/tcpdf/fonts/freeserifbi.ctg.z
lib/tcpdf/fonts/freeserifbi.php
lib/tcpdf/fonts/freeserifi.ctg.z
lib/tcpdf/fonts/freeserifi.php
lib/tcpdf/htmlcolors.php
lib/tcpdf/pdf417.php
lib/tcpdf/qrcode.php
lib/tcpdf/readme_moodle.txt
lib/tcpdf/sRGB.icc [new file with mode: 0644]
lib/tcpdf/spotcolors.php
lib/tcpdf/tcpdf.php
lib/tcpdf/tcpdf_filters.php
lib/tcpdf/tcpdf_parser.php
lib/tcpdf/unicode_data.php
lib/thirdpartylibs.xml
lib/upgradelib.php
mod/choice/lib.php
mod/feedback/item/label/label_form.php
mod/feedback/item/label/lib.php
mod/folder/lib.php
mod/imscp/lib.php
mod/lesson/lib.php
mod/page/lib.php
mod/quiz/attempt.php
mod/scorm/lib.php
mod/scorm/player.js
mod/survey/lib.php
mod/url/lib.php
mod/workshop/allocation.php
mod/workshop/allocation/lib.php
mod/workshop/allocation/manual/lib.php
mod/workshop/allocation/random/lib.php
mod/workshop/allocation/random/settings_form.php
mod/workshop/allocation/random/version.php
mod/workshop/allocation/scheduled/db/install.xml [new file with mode: 0644]
mod/workshop/allocation/scheduled/lang/en/workshopallocation_scheduled.php [new file with mode: 0644]
mod/workshop/allocation/scheduled/lib.php [new file with mode: 0644]
mod/workshop/allocation/scheduled/settings_form.php [new file with mode: 0644]
mod/workshop/allocation/scheduled/version.php [new file with mode: 0644]
mod/workshop/db/install.xml
mod/workshop/db/upgrade.php
mod/workshop/lang/en/workshop.php
mod/workshop/lib.php
mod/workshop/locallib.php
mod/workshop/mod_form.php
mod/workshop/renderer.php
mod/workshop/version.php
pix/i/scheduled.png [new file with mode: 0644]
rating/index.php
repository/lib.php
theme/afterburner/style/afterburner_styles.css
theme/base/style/course.css
theme/formal_white/config.php
theme/formal_white/lang/en/theme_formal_white.php
theme/formal_white/lib.php
theme/formal_white/settings.php
theme/formal_white/style/core.css
theme/formal_white/style/course.css
theme/formal_white/style/formal_white.css
theme/formal_white/style/menu.css
theme/formal_white/style/pagelayout.css
theme/formal_white/style/quiz.css
theme/formal_white/version.php
user/profile/definelib.php
user/profile/field/checkbox/define.class.php
user/profile/field/checkbox/field.class.php
user/profile/field/datetime/define.class.php
user/profile/field/menu/define.class.php
user/profile/field/menu/field.class.php
user/profile/field/text/define.class.php
user/profile/field/text/field.class.php
user/profile/field/textarea/define.class.php
user/profile/field/textarea/field.class.php
user/profile/lib.php

index ce0825b..b9ce983 100644 (file)
@@ -5,7 +5,7 @@ With a lot of question attempts, doing the whole conversion on upgrade is very
 slow. The plugin can help with that in various ways.
 
 
-1. It provies a report of how much data there is to upgrade.
+1. It provides a report of how much data there is to upgrade.
 
 2. It can extract test-cases from the database. This can help you report bugs
 in the upgrade process to the developers.
@@ -35,3 +35,9 @@ subsequently been modified) so you can re-upgrade them. This may allow you to
 recover from a buggy upgrade.
 
 9. Finally, you can still use the extract test-cases script to help report bugs.
+
+
+Manual upgrades can be processed via the web interface or the command line tool
+cliupgrade.php. To run cliupgrade.php, use a command similar to:
+sudo -u www-data /usr/bin/php admin/tool/qeupgradehelper/cli/convert.php -h
+The -h flag will show the options for running the tool.
\ No newline at end of file
diff --git a/admin/tool/qeupgradehelper/cli/convert.php b/admin/tool/qeupgradehelper/cli/convert.php
new file mode 100644 (file)
index 0000000..779442e
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Script to allow upgrading of quizzes with attempts that were previously
+ * skipped.
+ *
+ * @package    tool_qeupgradehelper
+ * @copyright  2012 Eric Merrill, Oakland Unversity
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+define('CLI_SCRIPT', true);
+
+require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/config.php');
+require_once(dirname(dirname(__FILE__)) . '/locallib.php');
+require_once(dirname(dirname(__FILE__)) . '/lib.php');
+require_once($CFG->libdir.'/clilib.php');      // CLI only functions.
+
+
+// Now get cli options.
+list($options, $unrecognized) = cli_get_params(array('quiz'=>false, 'timelimit'=>false, 'countlimit'=>false, 'help'=>false),
+                                               array('c'=>'countlimit', 't'=>'timelimit', 'h'=>'help'));
+
+if ($unrecognized) {
+    $unrecognized = implode("\n  ", $unrecognized);
+    cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
+}
+
+
+if ($options['help']) {
+    $help =
+"Question engine upgrade helper CLI tool.
+Will upgrade all remaining question attempts if no options are specified.
+
+Options:
+-c, --countlimit=<n>    Process n number of quizzes then exit
+-t, --timelimit=<n>     Process quizzes for n number of seconds, then exit. A quiz
+                        currently in progress will not be interrupted.
+--quiz=<quizid>         Process quiz quizid only
+-h, --help              Print out this help
+
+countlimit and timelimit can be used together. First one to trigger will stop execution.
+
+Example:
+\$sudo -u www-data /usr/bin/php admin/tool/qeupgradehelper/cliupgrade.php
+";
+
+    echo $help;
+    die;
+}
+
+
+
+
+if (!tool_qeupgradehelper_is_upgraded()) {
+    mtrace('qeupgradehelper: site not yet upgraded. Doing nothing.');
+    return;
+}
+
+require_once(dirname(dirname(__FILE__)) . '/afterupgradelib.php');
+
+
+$starttime = time();
+
+// Setup the stop time.
+if ($options['timelimit']) {
+    $stoptime = time() + $options['timelimit'];
+} else {
+    $stoptime = false;
+}
+
+// If we are doing a quiz id, limit to one.
+if ($options['quiz']) {
+    $options['countlimit'] = 1;
+}
+
+$count = 0;
+
+
+mtrace('qeupgradehelper: processing ...');
+
+/* This while statement does a few things
+ * Basically if an option is set to false, then that subsection will return
+ * true, and will short circuit the test condition for that option, and always
+ * being true. Both options are anded together, so either one can trigger to stop.
+ */
+while ((!$stoptime || (time() < $stoptime)) && (!$options['countlimit'] || ($count < $options['countlimit']))) {
+    if ($options['quiz']) {
+        $quizid = $options['quiz'];
+    } else {
+        $quiz = tool_qeupgradehelper_get_quiz_for_upgrade();
+        if (!$quiz) {
+            mtrace('qeupgradehelper: No more quizzes to process.');
+            break; // No more to do.
+        }
+
+        $quizid = $quiz->id;
+    }
+    $quizsummary = tool_qeupgradehelper_get_quiz($quizid);
+    if ($quizsummary) {
+        mtrace('  starting upgrade of attempts at quiz ' . $quizid);
+        $upgrader = new tool_qeupgradehelper_attempt_upgrader(
+                $quizsummary->id, $quizsummary->numtoconvert);
+        $upgrader->convert_all_quiz_attempts();
+        mtrace('  upgrade of quiz ' . $quizid . ' complete.');
+    } else {
+        mtrace('quiz ' . $quizid . ' not found or already upgraded.');
+    }
+
+    $count++;
+}
+
+
+mtrace('qeupgradehelper: Done. Processed '.$count.' quizes in '.(time()-$starttime).' seconds');
+return;
index 62cfca6..eda56a8 100644 (file)
@@ -669,5 +669,5 @@ function tool_qeupgradehelper_get_quiz_for_upgrade() {
             JOIN {course} c ON c.id = quiz.course
             WHERE quiza.preview = 0 AND quiza.needsupgradetonewqe = 1
             GROUP BY quiz.id, quiz.name, c.shortname, c.id
-            ORDER BY quiza.timemodified DESC", array(), IGNORE_MULTIPLE);
+            ORDER BY MAX(quiza.timemodified) DESC", array(), IGNORE_MULTIPLE);
 }
index 91aa058..db996f8 100644 (file)
@@ -63,6 +63,7 @@ class external_service_form extends moodleform {
 
         $mform->addElement('text', 'name', get_string('name'));
         $mform->addRule('name', get_string('required'), 'required', null, 'client');
+        $mform->setType('name', PARAM_TEXT);
         $mform->addElement('advcheckbox', 'enabled', get_string('enabled', 'webservice'));
         $mform->addElement('advcheckbox', 'restrictedusers',
                 get_string('restrictedusers', 'webservice'));
index d1572a3..881887c 100644 (file)
@@ -862,7 +862,7 @@ class auth_plugin_ldap extends auth_plugin_base {
             print_string('nouserstobeadded', 'auth_ldap');
         }
 
-        $dbman->drop_temp_table($table);
+        $dbman->drop_table($table);
         $this->ldap_close();
 
         return true;
index 881c73c..fb7839d 100644 (file)
@@ -168,9 +168,9 @@ abstract class backup_check {
         $hasusercap   = has_capability('moodle/backup:userinfo', $coursectx, $userid);
 
         // If setting is enabled but user lacks permission
-        if (!$hasusercap && $prevvalue) { // If user has not the capability and setting is enabled
+        if (!$hasusercap) { // If user has not the capability
             // Now analyse if we are allowed to apply changes or must stop with exception
-            if (!$apply) { // Cannot apply changes, throw exception
+            if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
                 $a = new stdclass();
                 $a->setting = 'users';
                 $a->value = $prevvalue;
@@ -178,7 +178,12 @@ abstract class backup_check {
                 throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
 
             } else { // Can apply changes
-                $userssetting->set_value(false);                              // Set the value to false
+                // If it is already false, we don't want to try and set it again, because if it is
+                // already locked, and exception will occur. The side benifit is if it is true and locked
+                // we will get an exception...
+                if ($prevvalue) {
+                    $userssetting->set_value(false);                              // Set the value to false
+                }
                 $userssetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
             }
         }
@@ -191,9 +196,9 @@ abstract class backup_check {
         $hasanoncap  = has_capability('moodle/backup:anonymise', $coursectx, $userid);
 
         // If setting is enabled but user lacks permission
-        if (!$hasanoncap && $prevvalue) { // If user has not the capability and setting is enabled
+        if (!$hasanoncap) { // If user has not the capability
             // Now analyse if we are allowed to apply changes or must stop with exception
-            if (!$apply) { // Cannot apply changes, throw exception
+            if (!$apply && $prevvalue) { // Cannot apply changes and the value is set, throw exception
                 $a = new stdclass();
                 $a->setting = 'anonymize';
                 $a->value = $prevvalue;
@@ -201,7 +206,9 @@ abstract class backup_check {
                 throw new backup_controller_exception('backup_setting_value_wrong_for_capability', $a);
 
             } else { // Can apply changes
-                $anonsetting->set_value(false);                              // Set the value to false
+                if ($prevvalue) { // If we try and set it back to false and it has already been locked, error will occur
+                    $anonsetting->set_value(false);                              // Set the value to false
+                }
                 $anonsetting->set_status(base_setting::LOCKED_BY_PERMISSION);// Set the status to locked by perm
             }
         }
index dffdb8d..ac4725d 100644 (file)
@@ -147,7 +147,7 @@ abstract class backup_controller_dbops extends backup_dbops {
 
         $targettablename = 'backup_ids_temp';
         $table = new xmldb_table($targettablename);
-        $dbman->drop_temp_table($table); // And drop it
+        $dbman->drop_table($table); // And drop it
     }
 
     /**
index e3e2d00..dc0152f 100644 (file)
@@ -105,7 +105,7 @@ abstract class restore_controller_dbops extends restore_dbops {
         $targettablenames = array('backup_ids_temp', 'backup_files_temp');
         foreach ($targettablenames as $targettablename) {
             $table = new xmldb_table($targettablename);
-            $dbman->drop_temp_table($table); // And drop it
+            $dbman->drop_table($table); // And drop it
         }
     }
 }
index 5a4af22..0d87536 100644 (file)
@@ -242,7 +242,7 @@ class backup_dbops_test extends UnitTestCase {
         // backup_ids_temp table tests
         // If, for any reason table exists, drop it
         if ($dbman->table_exists('backup_ids_temp')) {
-            $dbman->drop_temp_table(new xmldb_table('backup_ids_temp'));
+            $dbman->drop_table(new xmldb_table('backup_ids_temp'));
         }
         // Check backup_ids_temp table doesn't exist
         $this->assertFalse($dbman->table_exists('backup_ids_temp'));
index 43682a5..dc02ad9 100644 (file)
@@ -138,7 +138,7 @@ class backup_dbops_testcase extends advanced_testcase {
         // backup_ids_temp table tests
         // If, for any reason table exists, drop it
         if ($dbman->table_exists('backup_ids_temp')) {
-            $dbman->drop_temp_table(new xmldb_table('backup_ids_temp'));
+            $dbman->drop_table(new xmldb_table('backup_ids_temp'));
         }
         // Check backup_ids_temp table doesn't exist
         $this->assertFalse($dbman->table_exists('backup_ids_temp'));
index cb4a751..2d9b6d8 100644 (file)
@@ -614,7 +614,7 @@ OET;
     // note: no need to print "this is flv link" because it is printed automatically if JS or Flash not available
 
     $output = html_writer::tag('span', $printlink, array('id'=>$id, 'class'=>'mediaplugin mediaplugin_flv'));
-    $output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, rawurlencode($flashurl), $width, $height, $autosize))); // we can not use standard JS init because this may be cached
+    $output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, addslashes_js($flashurl), $width, $height, $autosize))); // we can not use standard JS init because this may be cached
 
     return $output;
 }
index 7601fea..402bc84 100644 (file)
@@ -783,7 +783,7 @@ class grade_report_grader extends grade_report {
                     $headerlink = $this->gtree->get_element_header($element, true, $this->get_pref('showactivityicons'), false);
 
                     $itemcell = new html_table_cell();
-                    $itemcell->attributes['class'] = $type . ' ' . $catlevel . 'highlightable';
+                    $itemcell->attributes['class'] = $type . ' ' . $catlevel . ' highlightable';
 
                     if ($element['object']->is_hidden()) {
                         $itemcell->attributes['class'] .= ' hidden';
index d0c2862..74edbbc 100644 (file)
@@ -220,6 +220,7 @@ $string['nocate'] = 'No such category {$a}!';
 $string['nopermissionadd'] = 'You don\'t have permission to add questions here.';
 $string['nopermissionmove'] = 'You don\'t have permission to move questions from here. You must save the question in this category or save it as a new question.';
 $string['noprobs'] = 'No problems found in your question database.';
+$string['noquestions'] = 'No questions were found that could be exported. Make sure that you have selected a category to export that contains questions.';
 $string['noquestionsinfile'] = 'There are no questions in the import file';
 $string['notenoughanswers'] = 'This type of question requires at least {$a} answers';
 $string['notenoughdatatoeditaquestion'] = 'Neither a question id, nor a category id and question type, was specified.';
index 48c9099..d26e0f9 100644 (file)
@@ -269,6 +269,10 @@ function uninstall_plugin($type, $name) {
 
     // perform clean-up task common for all the plugin/subplugin types
 
+    //delete the web service functions and pre-built services
+    require_once($CFG->dirroot.'/lib/externallib.php');
+    external_delete_descriptions($component);
+
     // delete calendar events
     $DB->delete_records('event', array('modulename' => $pluginname));
 
index c4409d0..ee6f9bd 100644 (file)
@@ -459,21 +459,13 @@ class database_manager {
      *
      * It is recommended to drop temp table when not used anymore.
      *
+     * @deprecated since 2.3, use drop_table() for all table types
      * @param xmldb_table $xmldb_table Table object.
      * @return void
      */
     public function drop_temp_table(xmldb_table $xmldb_table) {
-
-    /// Check table doesn't exist
-        if (!$this->table_exists($xmldb_table)) {
-            throw new ddl_table_missing_exception($xmldb_table->getName());
-        }
-
-        if (!$sqlarr = $this->generator->getDropTempTableSQL($xmldb_table)) {
-            throw new ddl_exception('ddlunknownerror', null, 'temp table drop sql not generated');
-        }
-
-        $this->execute_sql_arr($sqlarr);
+        debugging('database_manager::drop_temp_table() is deprecated, use database_manager::drop_table() instead');
+        $this->drop_table($xmldb_table);
     }
 
     /**
index aa684b6..ed9942e 100644 (file)
@@ -136,12 +136,17 @@ class mssql_sql_generator extends sql_generator {
     }
 
     /**
-     * Given one correct xmldb_table and the new name, returns the SQL statements
-     * to drop it (inside one array)
+     * Given one correct xmldb_table, returns the SQL statements
+     * to drop it (inside one array).
+     *
+     * @param xmldb_table $xmldb_table The table to drop.
+     * @return array SQL statement(s) for dropping the specified table.
      */
-    public function getDropTempTableSQL($xmldb_table) {
-        $sqlarr = $this->getDropTableSQL($xmldb_table);
-        $this->temptables->delete_temptable($xmldb_table->getName());
+    public function getDropTableSQL($xmldb_table) {
+        $sqlarr = parent::getDropTableSQL($xmldb_table);
+        if ($this->temptables->is_temptable($xmldb_table->getName())) {
+            $this->temptables->delete_temptable($xmldb_table->getName());
+        }
         return $sqlarr;
     }
 
index ec1c204..801d740 100644 (file)
@@ -134,13 +134,18 @@ class mysql_sql_generator extends sql_generator {
     }
 
     /**
-     * Given one correct xmldb_table and the new name, returns the SQL statements
-     * to drop it (inside one array)
+     * Given one correct xmldb_table, returns the SQL statements
+     * to drop it (inside one array).
+     *
+     * @param xmldb_table $xmldb_table The table to drop.
+     * @return array SQL statement(s) for dropping the specified table.
      */
-    public function getDropTempTableSQL($xmldb_table) {
-        $sqlarr = $this->getDropTableSQL($xmldb_table);
-        $sqlarr = preg_replace('/^DROP TABLE/', "DROP TEMPORARY TABLE", $sqlarr);
-        $this->temptables->delete_temptable($xmldb_table->getName());
+    public function getDropTableSQL($xmldb_table) {
+        $sqlarr = parent::getDropTableSQL($xmldb_table);
+        if ($this->temptables->is_temptable($xmldb_table->getName())) {
+            $sqlarr = preg_replace('/^DROP TABLE/', "DROP TEMPORARY TABLE", $sqlarr);
+            $this->temptables->delete_temptable($xmldb_table->getName());
+        }
         return $sqlarr;
     }
 
index a2cf1ad..312c97d 100644 (file)
@@ -122,13 +122,18 @@ class oracle_sql_generator extends sql_generator {
     }
 
     /**
-     * Given one correct xmldb_table and the new name, returns the SQL statements
-     * to drop it (inside one array)
+     * Given one correct xmldb_table, returns the SQL statements
+     * to drop it (inside one array).
+     *
+     * @param xmldb_table $xmldb_table The table to drop.
+     * @return array SQL statement(s) for dropping the specified table.
      */
-    public function getDropTempTableSQL($xmldb_table) {
-        $sqlarr = $this->getDropTableSQL($xmldb_table);
-        array_unshift($sqlarr, "TRUNCATE TABLE ". $this->getTableName($xmldb_table)); // oracle requires truncate before being able to drop a temp table
-        $this->temptables->delete_temptable($xmldb_table->getName());
+    public function getDropTableSQL($xmldb_table) {
+        $sqlarr = parent::getDropTableSQL($xmldb_table);
+        if ($this->temptables->is_temptable($xmldb_table->getName())) {
+            array_unshift($sqlarr, "TRUNCATE TABLE ". $this->getTableName($xmldb_table)); // oracle requires truncate before being able to drop a temp table
+            $this->temptables->delete_temptable($xmldb_table->getName());
+        }
         return $sqlarr;
     }
 
index cf57825..46436fc 100644 (file)
@@ -86,12 +86,17 @@ class postgres_sql_generator extends sql_generator {
     }
 
     /**
-     * Given one correct xmldb_table and the new name, returns the SQL statements
-     * to drop it (inside one array)
+     * Given one correct xmldb_table, returns the SQL statements
+     * to drop it (inside one array).
+     *
+     * @param xmldb_table $xmldb_table The table to drop.
+     * @return array SQL statement(s) for dropping the specified table.
      */
-    public function getDropTempTableSQL($xmldb_table) {
-        $sqlarr = $this->getDropTableSQL($xmldb_table);
-        $this->temptables->delete_temptable($xmldb_table->getName());
+    public function getDropTableSQL($xmldb_table) {
+        $sqlarr = parent::getDropTableSQL($xmldb_table);
+        if ($this->temptables->is_temptable($xmldb_table->getName())) {
+            $this->temptables->delete_temptable($xmldb_table->getName());
+        }
         return $sqlarr;
     }
 
index 3224ecd..40a0d3d 100644 (file)
@@ -1540,13 +1540,13 @@ class ddl_test extends UnitTestCase {
         $this->assertEqual($records[2]->intro, $this->records['test_table1'][1]->intro);
 
         // Drop table1
-        $dbman->drop_temp_table($table1);
+        $dbman->drop_table($table1);
         $this->assertFalse($dbman->table_exists('test_table1'));
 
         // Try to drop non-existing temp table, must throw exception
         $noetable = $this->tables['test_table1'];
         try {
-            $dbman->drop_temp_table($noetable);
+            $dbman->drop_table($noetable);
             $this->assertTrue(false);
         } catch (Exception $e) {
             $this->assertTrue($e instanceof ddl_table_missing_exception);
@@ -1556,7 +1556,7 @@ class ddl_test extends UnitTestCase {
         // TODO: that's
 
         // Drop table0
-        $dbman->drop_temp_table($table0);
+        $dbman->drop_table($table0);
         $this->assertFalse($dbman->table_exists('test_table0'));
 
         // Have dropped all these temp tables here, to avoid conflicts with other (normal tables) tests!
@@ -1598,12 +1598,12 @@ class ddl_test extends UnitTestCase {
         $this->assertTrue($dbman2->table_exists('test_table1'));
         $inserted = $DB2->insert_record('test_table1', $record2);
 
-        $dbman2->drop_temp_table($table); // Drop temp table before closing DB2
+        $dbman2->drop_table($table); // Drop temp table before closing DB2
         $this->assertFalse($dbman2->table_exists('test_table1'));
         $DB2->dispose(); // Close DB2
 
         $this->assertTrue($dbman->table_exists('test_table1')); // Check table continues existing for DB
-        $dbman->drop_temp_table($table); // Drop temp table
+        $dbman->drop_table($table); // Drop temp table
         $this->assertFalse($dbman->table_exists('test_table1'));
     }
 
index cb18729..4cc1eed 100644 (file)
@@ -660,7 +660,7 @@ abstract class sql_generator {
 
     /**
      * Given one correct xmldb_table and the new name, returns the SQL statements
-     * to drop it (inside one array).
+     * to drop it (inside one array). Works also for temporary tables.
      *
      * @param xmldb_table $xmldb_table The table to drop.
      * @return array SQL statement(s) for dropping the specified table.
@@ -1290,15 +1290,6 @@ abstract class sql_generator {
      */
     abstract public function getCreateTempTableSQL($xmldb_table);
 
-    /**
-     * Given one correct xmldb_table and the new name, returns the SQL statements.
-     * to drop it (inside one array).
-     *
-     * @param xmldb_table $xmldb_table The xmldb_table object instance.
-     * @return array SQL statements.
-     */
-    abstract public function getDropTempTableSQL($xmldb_table);
-
     /**
      * Given one XMLDB Type, length and decimals, returns the DB proper SQL type.
      *
index 41bd729..352202f 100644 (file)
@@ -1466,6 +1466,8 @@ class ddl_testcase extends database_driver_testcase {
     }
 
     public function test_temp_tables() {
+        global $CFG;
+
         $DB = $this->tdb; // do not use global $DB!
         $dbman = $this->tdb->get_manager();
 
@@ -1514,13 +1516,13 @@ class ddl_testcase extends database_driver_testcase {
         $this->assertEquals($records[2]->intro, $this->records['test_table1'][1]->intro);
 
         // Drop table1
-        $dbman->drop_temp_table($table1);
+        $dbman->drop_table($table1);
         $this->assertFalse($dbman->table_exists('test_table1'));
 
         // Try to drop non-existing temp table, must throw exception
         $noetable = $this->tables['test_table1'];
         try {
-            $dbman->drop_temp_table($noetable);
+            $dbman->drop_table($noetable);
             $this->assertTrue(false);
         } catch (Exception $e) {
             $this->assertTrue($e instanceof ddl_table_missing_exception);
@@ -1530,10 +1532,19 @@ class ddl_testcase extends database_driver_testcase {
         // TODO: that's
 
         // Drop table0
-        $dbman->drop_temp_table($table0);
+        $dbman->drop_table($table0);
         $this->assertFalse($dbman->table_exists('test_table0'));
 
-        // Have dropped all these temp tables here, to avoid conflicts with other (normal tables) tests!
+        // Create another temp table1
+        $table1 = $this->tables['test_table1'];
+        $dbman->create_temp_table($table1);
+        $this->assertTrue($dbman->table_exists('test_table1'));
+
+        // Make sure it can be dropped using deprecated drop_temp_table()
+        $CFG->debug = 0;
+        $dbman->drop_temp_table($table1);
+        $this->assertFalse($dbman->table_exists('test_table1'));
+        $CFG->debug = DEBUG_DEVELOPER;
     }
 
     public function test_concurrent_temp_tables() {
@@ -1572,12 +1583,12 @@ class ddl_testcase extends database_driver_testcase {
         $this->assertTrue($dbman2->table_exists('test_table1'));
         $inserted = $DB2->insert_record('test_table1', $record2);
 
-        $dbman2->drop_temp_table($table); // Drop temp table before closing DB2
+        $dbman2->drop_table($table); // Drop temp table before closing DB2
         $this->assertFalse($dbman2->table_exists('test_table1'));
         $DB2->dispose(); // Close DB2
 
         $this->assertTrue($dbman->table_exists('test_table1')); // Check table continues existing for DB
-        $dbman->drop_temp_table($table); // Drop temp table
+        $dbman->drop_table($table); // Drop temp table
         $this->assertFalse($dbman->table_exists('test_table1'));
     }
 
index 2e7ccdd..faf097e 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 // This file is part of Moodle - http://moodle.org/
 //
 // Moodle is free software: you can redistribute it and/or modify
@@ -423,7 +422,7 @@ abstract class moodle_database {
 
     /**
      * This logs the last query based on 'logall', 'logslow' and 'logerrors' options configured via $CFG->dboptions .
-     * @param mixed string error or false if not error
+     * @param string $error or false if not error
      * @return void
      */
     public function query_log($error=false) {
@@ -1040,7 +1039,7 @@ abstract class moodle_database {
     public function get_recordset_list($table, $field, array $values, $sort='', $fields='*', $limitfrom=0, $limitnum=0) {
         list($select, $params) = $this->where_clause_list($field, $values);
         if (empty($select)) {
-            $select = '1 = 2'; /// Fake condition, won't return rows ever. MDL-17645
+            $select = '1 = 2'; // Fake condition, won't return rows ever. MDL-17645
             $params = array();
         }
         return $this->get_recordset_select($table, $select, $params, $sort, $fields, $limitfrom, $limitnum);
@@ -1130,6 +1129,8 @@ abstract class moodle_database {
      * @param string $fields A comma separated list of fields to be returned from the chosen table. If specified,
      *   the first field should be a unique one such as 'id' since it will be used as a key in the associative
      *   array.
+     * @param int $limitfrom return a subset of records, starting at this point (optional).
+     * @param int $limitnum return a subset comprising this many records in total (optional).
      * @return array An array of objects indexed by first column
      * @throws dml_exception A DML specific exception is thrown for any errors.
      */
@@ -1297,10 +1298,11 @@ abstract class moodle_database {
      * @param string $table The database table to be checked against.
      * @param string $select A fragment of SQL to be used in a where clause in the SQL call.
      * @param array $params array of sql parameters
+     * @param string $fields A comma separated list of fields to be returned from the chosen table.
      * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
      *                        IGNORE_MULTIPLE means return first, ignore multiple records found(not recommended);
      *                        MUST_EXIST means throw exception if no record or multiple records found
-     * @return mixed a fieldset object containing the first matching record, false or exception if error not found depending on mode
+     * @return stdClass|false a fieldset object containing the first matching record, false or exception if error not found depending on mode
      * @throws dml_exception A DML specific exception is thrown for any errors.
      */
     public function get_record_select($table, $select, array $params=null, $fields='*', $strictness=IGNORE_MISSING) {
@@ -1400,8 +1402,6 @@ abstract class moodle_database {
     /**
      * Get a single field value (first field) using a SQL statement.
      *
-     * @param string $table the table to query.
-     * @param string $return the field to return the value of.
      * @param string $sql The SQL query returning one row with one column
      * @param array $params array of sql parameters
      * @param int $strictness IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found;
@@ -1465,8 +1465,9 @@ abstract class moodle_database {
      * If the return ID isn't required, then this just reports success as true/false.
      * $data is an object containing needed data
      * @param string $table The database table to be inserted into
-     * @param object $data A data object with values for one or more fields in the record
+     * @param object $dataobject A data object with values for one or more fields in the record
      * @param bool $returnid Should the id of the newly created record entry be returned? If this option is not requested then true/false is returned.
+     * @param bool $bulk Set to true is multiple inserts are expected
      * @return bool|int true or new id
      * @throws dml_exception A DML specific exception is thrown for any errors.
      */
@@ -1686,7 +1687,7 @@ abstract class moodle_database {
 
 
 
-/// sql constructs
+// sql constructs
     /**
      * Returns the FROM clause required by some DBs in all SELECT statements.
      *
@@ -2049,7 +2050,7 @@ abstract class moodle_database {
         return '';
     }
 
-/// transactions
+// transactions
 
     /**
      * Checks and returns true if transactions are supported.
@@ -2122,6 +2123,7 @@ abstract class moodle_database {
      * Indicates delegated transaction finished successfully.
      * The real database transaction is committed only if
      * all delegated transactions committed.
+     * @param moodle_transaction $transaction The transaction to commit
      * @return void
      * @throws dml_transaction_exception Creates and throws transaction related exceptions.
      */
@@ -2230,7 +2232,7 @@ abstract class moodle_database {
         $this->force_rollback = false;
     }
 
-/// session locking
+// session locking
     /**
      * Is session lock supported in this driver?
      * @return bool
@@ -2259,7 +2261,7 @@ abstract class moodle_database {
     public function release_session_lock($rowid) {
     }
 
-/// performance and logging
+// performance and logging
     /**
      * Returns the number of reads done by this database.
      * @return int Number of reads.
index 505292c..c89348a 100644 (file)
@@ -131,7 +131,7 @@ class moodle_temptables {
         if ($temptables = $this->get_temptables()) {
             error_log('Potential coding error - existing temptables found when disposing database. Must be dropped!');
             foreach ($temptables as $temptable) {
-                 $this->mdb->get_manager()->drop_temp_table(new xmldb_table($temptable));
+                 $this->mdb->get_manager()->drop_table(new xmldb_table($temptable));
             }
         }
         $this->mdb = null;
index 212f44f..028538c 100644 (file)
@@ -287,19 +287,6 @@ class mssql_native_moodle_database extends moodle_database {
         return $info;
     }
 
-    /**
-     * Returns if the RDBMS server fulfills the required version
-     *
-     * @param string $version version to check against
-     * @return bool returns if the version is fulfilled (true) or no (false)
-     * @todo Delete this unused and protected method. MDL-32392
-     */
-    protected function is_min_version($version) {
-        $server = $this->get_server_info();
-        $server = $server['version'];
-        return version_compare($server, $version, '>=');
-    }
-
     /**
      * Converts short table name {tablename} to real table name
      * supporting temp tables (#) if detected
index 046e377..08df721 100644 (file)
@@ -296,19 +296,6 @@ class oci_native_moodle_database extends moodle_database {
         return $info;
     }
 
-    /**
-     * Returns if the RDBMS server fulfills the required version
-     *
-     * @param string $version version to check against
-     * @return bool returns if the version is fulfilled (true) or no (false)
-     * @todo Delete this unused and protected method. MDL-32392
-     */
-    protected function is_min_version($version) {
-        $server = $this->get_server_info();
-        $server = $server['version'];
-        return version_compare($server, $version, '>=');
-    }
-
     /**
      * Converts short table name {tablename} to real table name
      * supporting temp tables ($this->unique_session_id based) if detected
index f8367fe..31bf353 100644 (file)
@@ -262,9 +262,8 @@ class pgsql_native_moodle_database extends moodle_database {
      *
      * @param string $version version to check against
      * @return bool returns if the version is fulfilled (true) or no (false)
-     * @todo Make this method private. MDL-32392
      */
-    protected function is_min_version($version) {
+    private function is_min_version($version) {
         $server = $this->get_server_info();
         $server = $server['version'];
         return version_compare($server, $version, '>=');
index 996b4e8..b2b0e60 100644 (file)
@@ -276,19 +276,6 @@ class sqlsrv_native_moodle_database extends moodle_database {
         return $info;
     }
 
-    /**
-     * Returns if the RDBMS server fulfills the required version
-     *
-     * @param string $version version to check against
-     * @return bool returns if the version is fulfilled (true) or no (false)
-     * @todo Delete this unused and protected method. MDL-32392
-     */
-    protected function is_min_version($version) {
-        $server = $this->get_server_info();
-        $server = $server['version'];
-        return version_compare($server, $version, '>=');
-    }
-
     /**
      * Override: Converts short table name {tablename} to real table name
      * supporting temp tables (#) if detected
index 8875307..2cb1118 100644 (file)
@@ -487,4 +487,24 @@ function external_create_service_token($servicename, $context){
     global $USER, $DB;
     $service = $DB->get_record('external_services', array('name'=>$servicename), '*', MUST_EXIST);
     return external_generate_token(EXTERNAL_TOKEN_EMBEDDED, $service, $USER->id, $context, 0);
+}
+
+/**
+ * Delete all pre-built services (+ related tokens) and external functions information defined in the specified component.
+ *
+ * @param string $component name of component (moodle, mod_assignment, etc.)
+ */
+function external_delete_descriptions($component) {
+    global $DB;
+
+    $params = array($component);
+
+    $DB->delete_records_select('external_tokens',
+            "externalserviceid IN (SELECT id FROM {external_services} WHERE component = ?)", $params);
+    $DB->delete_records_select('external_services_users',
+            "externalserviceid IN (SELECT id FROM {external_services} WHERE component = ?)", $params);
+    $DB->delete_records_select('external_services_functions',
+            "functionname IN (SELECT name FROM {external_functions} WHERE component = ?)", $params);
+    $DB->delete_records('external_services', array('component'=>$component));
+    $DB->delete_records('external_functions', array('component'=>$component));
 }
\ No newline at end of file
index 4609c6d..7bdb7bd 100644 (file)
@@ -1,9 +1,80 @@
 Version history:
 
-3.2.7
+3.2.9
+-----
+- Fixed #490, controlbar background, buffer bar and progress bar colors were all reset to white
+
+3.2.8
 -----
+- Added new property clip.backBufferLength, to be used with FMS 3.5
+- Adds support for StageVideo. To enable it set clip.accelerated to true.
+- Tries to reload two times if the stream is not initially found. Also does 3 connection attempts if the connection fails with RTMP.
+- Support for FMS slow motion
+- Support for thumbnails in RSS files
+- Added onPlayStatus clip event handler on NetStreamClient.
+- Added new clip events for stream switching onSwitchFailed and onSwitchComplete
+- made it possible to replay a clip using play(<current_clip's_index>)
+
+Fixes:
+- fixed to dispatch onStart also when replaying the previous clip, now the JS controlbar again works when replaying
+- cuepoints were fired multiple times when there is a playlist with several clips. Issue #150.
+- fixed XML parsing error when metadata's keys contains dashes
+- backgroundImage css property can now be set to "none" to be removed
+- fixed the facts that clips in a playlist were cut off by a fraction in the end
+- fullScreenOnly now works in conjunction with displayTime
+- JS plugins now handles grouped syntax like flowplayer("a.player" /*...*/ )
+- JS function setClip can now be used to add listeners on the new Clip
+- different players with the same configuration stored in a variable can now use JS plugins
+- using linkUrl now works when calling JS function setClip
+- zIndex for plugins works fine now, issue #302
+- onLastSecond was fired twice, issue #300
+- fixed license key verification on subdomains, issue #318
+- fixed XSS vulnerability with linkUrls. Thank you Szymon Gruszecki for discovering and reporting this to us. Issue #329.
+- fixed switch stream api support in paused state. #279.
+- added switching state properties. #339
+- fixed the stopBuffering() API method to close the NetConnection and to clear the screen
+- Issue #355 setup targeting for Flash 10.0 and 10.1 to provide support for Flash 10.0 without Stagevideo requirements.
+- fixed #364, NetConnection unnecessary closed/reconnected when the netConnection does not change from clip to clip
+- xss fix for flashembed #357
+- Issue #384 added links support in context menus with configuration { url: "domain.com", target: "_blank"} which will work in embedded players.
+- #378, javascript method loadPluginWithConfig is unavailable and non existant. Documentation updated required to remove this and updates for loadPlugin like so
+this.loadPlugin("content","../flowplayer.content.swf", { html: "test", top: 30  }); or
+this.loadPlugin("content","../flowplayer.content.swf", { html: "test"  }, function() {
+                        this.css({ top: 30 });
+                    });
+- #191 send the resume event, and no stop event first before reconnecting due to a connection timeout so the player comes out of a paused state correctly.
+- #363 pause stream after metadata not beforehand or else no metadata is sent for rtmp clips .
+- #363 silent seek and force to seek to a keyframe or else video frame will not display initially when paused.
+- #375 clearing the event listeners when adding new video displays prevents new events being added when the playlist is replaced.
+- #391 add message argument to connection failure callback required by some connection providers.
+- #363 add overridable pause to frame for different seek functionality between http and rtmp.
+- #392 possible fix for extensions with no filetypes like rtmp flv clips, require positive index check.
+- #395 apply buffer animation status to VOD streams only.
+- #375 possible fix when replacing the playlist in onBeforeFinish, move replay button to onFinish.
+- #390 correct seek back to a valid time on invalid seeking while seeking in the buffer.
+- #404 implement netstreamplayoptions for http streams, resets the stream or start loading a new stream.
+- fixed an issue in parsing JSON config that contains several comments separated by whitespace
+- new clip property 'stopLiveOnPause'
+- #415 regression issue with #395, stop the buffering animation correctly.
+- #414 problem appears again for very short clips with invalid seek times, make it step back 1 second from the invalid seek time to seek the buffer correctly.
+- #416 enable seekableOnBegin to enable the scrubbar correctly when autobuffering.
+- #423 add the . to clip type extension checks or else files with known extension postfixes within them will be chosen instead.
+- #426 when a plugin width is set to a percentage, x/y is required to be floored or else it will affect the animation engine. specifically for the autohide function.
+- #430 adding event listeners for netconnection to obtain certain events.
+- #430 clear buffering status on connection failure.
+- #430 clear buffering status on stream failure.
+- #412 check for empty baseurl or else player url is appended and affects the url parsing.
+- #439 check for all rtmp streaming protocols when checking for rtmp urls.
+- #442 fix for code error in the javascript api.
+- #461 when we have a clip base url set, we need the complete clip url sent to play2 for http streams.
+- #470 check for a playlist when replacing the playlist with an rss feed.
+- #494 regression issued caused by #412, enable base url correctly.
 
-- Loads the new controlbar plugin version 3.2.5. No other functional changes.
+3.2.7
+-----
+- Loads the new controlbar plugin version 3.2.5.
+Fixes:
+- Fixed 'orig' scaling in fullscreen: http://flowplayer.org/forum/2/10274#post-52646
 
 3.2.6
 -----
diff --git a/lib/flowplayer/README_audio.txt b/lib/flowplayer/README_audio.txt
new file mode 100644 (file)
index 0000000..04a2f27
--- /dev/null
@@ -0,0 +1,75 @@
+Version history:
+
+3.2.8
+-----
+Fixes:
+- fixed to dispatch onStart only once
+- the duration is now available in the clip when onStart is dispatched
+- audio duration was estimated to be too long, issue #323
+- duration not available in the onMetaData event, issue #278
+- now dispatches error 200 when the mp3 URL does not respond, issue #334
+- #428 regression issue calculating the initial duration, was returning too small for the duration tracker.
+- #428 when fully downloaded ID3 is resent and update the duration.
+- #475 if we have a clip duration set, dispatch start or else wait until the duration is estimated. Start required for beginning duration tracker.
+
+3.2.3
+-----
+Fixes:
+- Fixed to dispatch onStart when the mp3 file does not contain a id3 tag
+- Now uses baseUrl if that is given
+
+3.2.2
+-----
+Fixes:
+- Now can download cover images from different domains without cross-domain security errors
+
+3.2.1
+-----
+Changes:
+- Supports cover images via a 'coverImage' configuration option
+- now works with securestreaming plugin
+Fixes:
+- fix to work properly if accessing the ID3 tag fails because Flash security prevents it
+- works better if the file does not have the ID3 tag
+
+3.2.0
+-----
+- added a new plugin event "onDuration" that is dispatched whenever a new duration value is estimated and the
+clip.duration value was changed. The new duration value is passed as event argument.
+
+3.1.3
+-----
+- added timeProvider setter as required by the changed StreamProvider interface
+- now checks the crossdomain.xml file to allow reading of the ID3 tag when this file is present in the domain
+  hosting the audio file
+
+3.1.2
+-----
+- compatible with the new ConnectionProvider and URLResolver API
+
+3.1.1
+-----
+Fixes:
+- calling closeBuffering() after the audio had finished caused an exception
+
+3.1.0
+-----
+- compatibility with core 3.1 StreamProvider interface
+
+3.0.4
+-----
+- fixed to stop audio when stop() is called
+
+3.0.3
+-----
+- changed to recalculate the duration until the end of the file has been reached,
+  this is needed to correctly estimate the duration of variable bitrate MP3's 
+
+3.0.2
+-----
+- dispatches the LOAD event when initialized (needed for flowplayer 3.0.2 compatibility)
+- fixed crashes of Mac  Safari when navigating out of a page that had a playing audio
+
+3.0.1
+-----
+- First public beta release
diff --git a/lib/flowplayer/flowplayer-3.2.6.js b/lib/flowplayer/flowplayer-3.2.6.js
deleted file mode 100644 (file)
index 4f61c14..0000000
+++ /dev/null
@@ -1,1577 +0,0 @@
-/**
- * flowplayer.js 3.2.6. The Flowplayer API
- *
- * Copyright 2009 Flowplayer Oy
- *
- * This file is part of Flowplayer.
- *
- * Flowplayer is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Flowplayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
- *
- * Date: 2010-08-25 12:48:46 +0000 (Wed, 25 Aug 2010)
- * Revision: 575
- */
-(function() {
-
-/*
-       FEATURES
-       --------
-       - $f() and flowplayer() functions
-       - handling multiple instances
-       - Flowplayer programming API
-       - Flowplayer event model
-       - player loading / unloading
-       - jQuery support
-*/
-
-
-/*jslint glovar: true, browser: true */
-/*global flowplayer, $f */
-
-// {{{ private utility methods
-
-       function log(args) {
-               console.log("$f.fireEvent", [].slice.call(args));
-       }
-
-
-       // thanks: http://keithdevens.com/weblog/archive/2007/Jun/07/javascript.clone
-       function clone(obj) {
-               if (!obj || typeof obj != 'object') { return obj; }
-               var temp = new obj.constructor();
-               for (var key in obj) {
-                       if (obj.hasOwnProperty(key)) {
-                               temp[key] = clone(obj[key]);
-                       }
-               }
-               return temp;
-       }
-
-       // stripped from jQuery, thanks John Resig
-       function each(obj, fn) {
-               if (!obj) { return; }
-
-               var name, i = 0, length = obj.length;
-
-               // object
-               if (length === undefined) {
-                       for (name in obj) {
-                               if (fn.call(obj[name], name, obj[name]) === false) { break; }
-                       }
-
-               // array
-               } else {
-                       for (var value = obj[0];
-                               i < length && fn.call( value, i, value ) !== false; value = obj[++i]) {
-                       }
-               }
-
-               return obj;
-       }
-
-
-       // convenience
-       function el(id) {
-               return document.getElementById(id);
-       }
-
-
-       // used extensively. a very simple implementation.
-       function extend(to, from, skipFuncs) {
-               if (typeof from != 'object') { return to; }
-
-               if (to && from) {
-                       each(from, function(name, value) {
-                               if (!skipFuncs || typeof value != 'function') {
-                                       to[name] = value;
-                               }
-                       });
-               }
-
-               return to;
-       }
-
-       // var arr = select("elem.className");
-       function select(query) {
-               var index = query.indexOf(".");
-               if (index != -1) {
-                       var tag = query.slice(0, index) || "*";
-                       var klass = query.slice(index + 1, query.length);
-                       var els = [];
-                       each(document.getElementsByTagName(tag), function() {
-                               if (this.className && this.className.indexOf(klass) != -1) {
-                                       els.push(this);
-                               }
-                       });
-                       return els;
-               }
-       }
-
-       // fix event inconsistencies across browsers
-       function stopEvent(e) {
-               e = e || window.event;
-
-               if (e.preventDefault) {
-                       e.stopPropagation();
-                       e.preventDefault();
-
-               } else {
-                       e.returnValue = false;
-                       e.cancelBubble = true;
-               }
-               return false;
-       }
-
-       // push an event listener into existing array of listeners
-       function bind(to, evt, fn) {
-               to[evt] = to[evt] || [];
-               to[evt].push(fn);
-       }
-
-
-       // generates an unique id
-   function makeId() {
-      return "_" + ("" + Math.random()).slice(2, 10);
-   }
-
-//}}}
-
-
-// {{{ Clip
-
-       var Clip = function(json, index, player) {
-
-               // private variables
-               var self = this,
-                        cuepoints = {},
-                        listeners = {};
-
-               self.index = index;
-
-               // instance variables
-               if (typeof json == 'string') {
-                       json = {url:json};
-               }
-
-               extend(this, json, true);
-
-               // event handling
-               each(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),
-                       function() {
-
-                       var evt = "on" + this;
-
-                       // before event
-                       if (evt.indexOf("*") != -1) {
-                               evt = evt.slice(0, evt.length -1);
-                               var before = "onBefore" + evt.slice(2);
-
-                               self[before] = function(fn) {
-                                       bind(listeners, before, fn);
-                                       return self;
-                               };
-                       }
-
-                       self[evt] = function(fn) {
-                               bind(listeners, evt, fn);
-                               return self;
-                       };
-
-
-                       // set common clip event listeners to player level
-                       if (index == -1) {
-                               if (self[before]) {
-                                       player[before] = self[before];
-                               }
-                               if (self[evt])  {
-                                       player[evt] = self[evt];
-                               }
-                       }
-
-               });
-
-               extend(this, {
-
-                       onCuepoint: function(points, fn) {
-
-                               // embedded cuepoints
-                               if (arguments.length == 1) {
-                                       cuepoints.embedded = [null, points];
-                                       return self;
-                               }
-
-                               if (typeof points == 'number') {
-                                       points = [points];
-                               }
-
-                               var fnId = makeId();
-                               cuepoints[fnId] = [points, fn];
-
-                               if (player.isLoaded()) {
-                                       player._api().fp_addCuepoints(points, index, fnId);
-                               }
-
-                               return self;
-                       },
-
-                       update: function(json) {
-                               extend(self, json);
-
-                               if (player.isLoaded()) {
-                                       player._api().fp_updateClip(json, index);
-                               }
-                               var conf = player.getConfig();
-                               var clip = (index == -1) ? conf.clip : conf.playlist[index];
-                               extend(clip, json, true);
-                       },
-
-
-                       // internal event for performing clip tasks. should be made private someday
-                       _fireEvent: function(evt, arg1, arg2, target) {
-                               if (evt == 'onLoad') {
-                                       each(cuepoints, function(key, val) {
-                                               if (val[0]) {
-                                                       player._api().fp_addCuepoints(val[0], index, key);
-                                               }
-                                       });
-                                       return false;
-                               }
-
-                               // target clip we are working against
-                               target = target || self;
-
-                               if (evt == 'onCuepoint') {
-                                       var fn = cuepoints[arg1];
-                                       if (fn) {
-                                               return fn[1].call(player, target, arg2);
-                                       }
-                               }
-
-                               // 1. clip properties, 2-3. metadata, 4. updates, 5. resumes from nested clip
-                               if (arg1 && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(evt) != -1) {
-                                       // update clip properties
-                                       extend(target, arg1);
-
-                                       if (arg1.metaData) {
-                                               if (!target.duration) {
-                                                       target.duration = arg1.metaData.duration;
-                                               } else {
-                                                       target.fullDuration = arg1.metaData.duration;
-                                               }
-                                       }
-                               }
-
-
-                               var ret = true;
-                               each(listeners[evt], function() {
-                                       ret = this.call(player, target, arg1, arg2);
-                               });
-                               return ret;
-                       }
-
-               });
-
-
-               // get cuepoints from config
-               if (json.onCuepoint) {
-                       var arg = json.onCuepoint;
-                       self.onCuepoint.apply(self, typeof arg == 'function' ? [arg] : arg);
-                       delete json.onCuepoint;
-               }
-
-               // get other events
-               each(json, function(key, val) {
-
-                       if (typeof val == 'function') {
-                               bind(listeners, key, val);
-                               delete json[key];
-                       }
-
-               });
-
-
-               // setup common clip event callbacks for Player object too (shortcuts)
-               if (index == -1) {
-                       player.onCuepoint = this.onCuepoint;
-               }
-
-       };
-
-//}}}
-
-
-// {{{ Plugin
-
-       var Plugin = function(name, json, player, fn) {
-
-               var self = this,
-                        listeners = {},
-                        hasMethods = false;
-
-               if (fn) {
-                       extend(listeners, fn);
-               }
-
-               // custom callback functions in configuration
-               each(json, function(key, val) {
-                       if (typeof val == 'function') {
-                               listeners[key] = val;
-                               delete json[key];
-                       }
-               });
-
-               // core plugin methods
-               extend(this, {
-
-                       // speed and fn are optional
-                       animate: function(props, speed, fn) {
-                               if (!props) {
-                                       return self;
-                               }
-
-                               if (typeof speed == 'function') {
-                                       fn = speed;
-                                       speed = 500;
-                               }
-
-                               if (typeof props == 'string') {
-                                       var key = props;
-                                       props = {};
-                                       props[key] = speed;
-                                       speed = 500;
-                               }
-
-                               if (fn) {
-                                       var fnId = makeId();
-                                       listeners[fnId] = fn;
-                               }
-
-                               if (speed === undefined) { speed = 500; }
-                               json = player._api().fp_animate(name, props, speed, fnId);
-                               return self;
-                       },
-
-                       css: function(props, val) {
-                               if (val !== undefined) {
-                                       var css = {};
-                                       css[props] = val;
-                                       props = css;
-                               }
-                               json = player._api().fp_css(name, props);
-                               extend(self, json);
-                               return self;
-                       },
-
-                       show: function() {
-                               this.display = 'block';
-                               player._api().fp_showPlugin(name);
-                               return self;
-                       },
-
-                       hide: function() {
-                               this.display = 'none';
-                               player._api().fp_hidePlugin(name);
-                               return self;
-                       },
-
-                       // toggle between visible / hidden state
-                       toggle: function() {
-                               this.display = player._api().fp_togglePlugin(name);
-                               return self;
-                       },
-
-                       fadeTo: function(o, speed, fn) {
-
-                               if (typeof speed == 'function') {
-                                       fn = speed;
-                                       speed = 500;
-                               }
-
-                               if (fn) {
-                                       var fnId = makeId();
-                                       listeners[fnId] = fn;
-                               }
-                               this.display = player._api().fp_fadeTo(name, o, speed, fnId);
-                               this.opacity = o;
-                               return self;
-                       },
-
-                       fadeIn: function(speed, fn) {
-                               return self.fadeTo(1, speed, fn);
-                       },
-
-                       fadeOut: function(speed, fn) {
-                               return self.fadeTo(0, speed, fn);
-                       },
-
-                       getName: function() {
-                               return name;
-                       },
-
-                       getPlayer: function() {
-                               return player;
-                       },
-
-                       // internal method. should be made private some day
-         _fireEvent: function(evt, arg, arg2) {
-
-            // update plugins properties & methods
-            if (evt == 'onUpdate') {
-               var json = player._api().fp_getPlugin(name);
-                                       if (!json) { return;    }
-
-               extend(self, json);
-               delete self.methods;
-
-               if (!hasMethods) {
-                  each(json.methods, function() {
-                     var method = "" + this;
-
-                     self[method] = function() {
-                        var a = [].slice.call(arguments);
-                        var ret = player._api().fp_invoke(name, method, a);
-                        return ret === 'undefined' || ret === undefined ? self : ret;
-                     };
-                  });
-                  hasMethods = true;
-               }
-            }
-
-            // plugin callbacks
-            var fn = listeners[evt];
-
-                       if (fn) {
-                               var ret = fn.apply(self, arg);
-
-                               // "one-shot" callback
-                               if (evt.slice(0, 1) == "_") {
-                                       delete listeners[evt];
-                               }
-
-                               return ret;
-            }
-
-            return self;
-         }
-
-               });
-
-       };
-
-
-//}}}
-
-
-function Player(wrapper, params, conf) {
-
-       // private variables (+ arguments)
-       var self = this,
-               api = null,
-               isUnloading = false,
-               html,
-               commonClip,
-               playlist = [],
-               plugins = {},
-               listeners = {},
-               playerId,
-               apiId,
-
-               // n'th player on the page
-               playerIndex,
-
-               // active clip's index number
-               activeIndex,
-
-               swfHeight,
-               wrapperHeight;
-
-
-// {{{ public methods
-
-       extend(self, {
-
-               id: function() {
-                       return playerId;
-               },
-
-               isLoaded: function() {
-                       return (api !== null && api.fp_play !== undefined && !isUnloading);
-               },
-
-               getParent: function() {
-                       return wrapper;
-               },
-
-               hide: function(all) {
-                       if (all) { wrapper.style.height = "0px"; }
-                       if (self.isLoaded()) { api.style.height = "0px"; }
-                       return self;
-               },
-
-               show: function() {
-                       wrapper.style.height = wrapperHeight + "px";
-                       if (self.isLoaded()) { api.style.height = swfHeight + "px"; }
-                       return self;
-               },
-
-               isHidden: function() {
-                       return self.isLoaded() && parseInt(api.style.height, 10) === 0;
-               },
-
-               load: function(fn) {
-                       if (!self.isLoaded() && self._fireEvent("onBeforeLoad") !== false) {
-                               var onPlayersUnloaded = function() {
-                                       html = wrapper.innerHTML;
-
-                                       // do not use splash as alternate content for flashembed
-                                       if (html && !flashembed.isSupported(params.version)) {
-                                               wrapper.innerHTML = "";
-                                       }
-
-                                       // onLoad listener given as argument
-                                       if (fn) {
-                                               fn.cached = true;
-                                               bind(listeners, "onLoad", fn);
-                                       }
-
-                                       // install Flash object inside given container
-                                       flashembed(wrapper, params, {config: conf});
-                               };
-
-                               // unload all instances
-                               var unloadedPlayersNb = 0;
-                               each(players, function()  {
-                                       this.unload(function(wasUnloaded) {
-                                               if ( ++unloadedPlayersNb == players.length ) {
-                                                       onPlayersUnloaded();
-                                               }
-                                       });
-                               });
-                       }
-
-                       return self;
-               },
-
-               unload: function(fn) {
-
-
-                       // if we are fullscreen on safari, we can't unload as it would crash the PluginHost, sorry
-                       if (this.isFullscreen() && /WebKit/i.test(navigator.userAgent)) {
-                               if ( fn ) { fn(false); }
-                               return self;
-                       }
-
-
-                       // unload only if in splash state
-                       if (html.replace(/\s/g,'') !== '') {
-
-                               if (self._fireEvent("onBeforeUnload") === false) {
-                                       if ( fn ) { fn(false); }
-                                       return self;
-                               }
-
-                               isUnloading = true;
-                               // try closing
-                               try {
-                                       if (api) {
-                                               api.fp_close();
-
-                                               // fire unload only when API is present
-                                               self._fireEvent("onUnload");
-                                       }
-                               } catch (error) {}
-
-                               var clean = function() {
-                                       api = null;
-                                       wrapper.innerHTML = html;
-                                       isUnloading = false;
-
-                                       if ( fn ) { fn(true); }
-                               };
-
-                               setTimeout(clean, 50);
-                       }
-                       else if ( fn ) { fn(false); }
-
-                       return self;
-
-               },
-
-               getClip: function(index) {
-                       if (index === undefined) {
-                               index = activeIndex;
-                       }
-                       return playlist[index];
-               },
-
-
-               getCommonClip: function() {
-                       return commonClip;
-               },
-
-               getPlaylist: function() {
-                       return playlist;
-               },
-
-      getPlugin: function(name) {
-         var plugin = plugins[name];
-
-                       // create plugin if nessessary
-         if (!plugin && self.isLoaded()) {
-                               var json = self._api().fp_getPlugin(name);
-                               if (json) {
-                                       plugin = new Plugin(name, json, self);
-                                       plugins[name] = plugin;
-                               }
-         }
-         return plugin;
-      },
-
-               getScreen: function() {
-                       return self.getPlugin("screen");
-               },
-
-               getControls: function() {
-                       return self.getPlugin("controls")._fireEvent("onUpdate");
-               },
-
-               // 3.2
-               getLogo: function() {
-                       try {
-                               return self.getPlugin("logo")._fireEvent("onUpdate");
-                       } catch (ignored) {}
-               },
-
-               // 3.2
-               getPlay: function() {
-                       return self.getPlugin("play")._fireEvent("onUpdate");
-               },
-
-
-               getConfig: function(copy) {
-                       return copy ? clone(conf) : conf;
-               },
-
-               getFlashParams: function() {
-                       return params;
-               },
-
-               loadPlugin: function(name, url, props, fn) {
-
-                       // properties not supplied
-                       if (typeof props == 'function') {
-                               fn = props;
-                               props = {};
-                       }
-
-                       // if fn not given, make a fake id so that plugin's onUpdate get's fired
-                       var fnId = fn ? makeId() : "_";
-                       self._api().fp_loadPlugin(name, url, props, fnId);
-
-                       // create new plugin
-                       var arg = {};
-                       arg[fnId] = fn;
-                       var p = new Plugin(name, null, self, arg);
-                       plugins[name] = p;
-                       return p;
-               },
-
-
-               getState: function() {
-                       return self.isLoaded() ? api.fp_getState() : -1;
-               },
-
-               // "lazy" play
-               play: function(clip, instream) {
-
-                       var p = function() {
-                               if (clip !== undefined) {
-                                       self._api().fp_play(clip, instream);
-                               } else {
-                                       self._api().fp_play();
-                               }
-                       };
-
-                       if (self.isLoaded()) {
-                               p();
-                       } else if ( isUnloading ) {
-                               setTimeout(function() {
-                                       self.play(clip, instream);
-                               }, 50);
-
-                       } else {
-                               self.load(function() {
-                                       p();
-                               });
-                       }
-
-                       return self;
-               },
-
-               getVersion: function() {
-                       var js = "flowplayer.js 3.2.6";
-                       if (self.isLoaded()) {
-                               var ver = api.fp_getVersion();
-                               ver.push(js);
-                               return ver;
-                       }
-                       return js;
-               },
-
-               _api: function() {
-                       if (!self.isLoaded()) {
-                               throw "Flowplayer " +self.id()+ " not loaded when calling an API method";
-                       }
-                       return api;
-               },
-
-               setClip: function(clip) {
-                       self.setPlaylist([clip]);
-                       return self;
-               },
-
-               getIndex: function() {
-                       return playerIndex;
-               },
-
-               _swfHeight: function() {
-                       return api.clientHeight;
-               }
-
-       });
-
-
-       // event handlers
-       each(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),
-               function() {
-                       var name = "on" + this;
-
-                       // before event
-                       if (name.indexOf("*") != -1) {
-                               name = name.slice(0, name.length -1);
-                               var name2 = "onBefore" + name.slice(2);
-                               self[name2] = function(fn) {
-                                       bind(listeners, name2, fn);
-                                       return self;
-                               };
-                       }
-
-                       // normal event
-                       self[name] = function(fn) {
-                               bind(listeners, name, fn);
-                               return self;
-                       };
-               }
-       );
-
-
-       // core API methods
-       each(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),
-               function() {
-                       var name = this;
-
-                       self[name] = function(a1, a2) {
-                               if (!self.isLoaded()) { return self; }
-                               var ret = null;
-
-                               // two arguments
-                               if (a1 !== undefined && a2 !== undefined) {
-                                       ret = api["fp_" + name](a1, a2);
-
-                               } else {
-                                       ret = (a1 === undefined) ? api["fp_" + name]() : api["fp_" + name](a1);
-
-                               }
-
-                               return ret === 'undefined' || ret === undefined ? self : ret;
-                       };
-               }
-       );
-
-//}}}
-
-
-// {{{ public method: _fireEvent
-
-       self._fireEvent = function(a) {
-
-               if (typeof a == 'string') { a = [a]; }
-
-               var evt = a[0], arg0 = a[1], arg1 = a[2], arg2 = a[3], i = 0;
-               if (conf.debug) { log(a); }
-
-               // internal onLoad
-               if (!self.isLoaded() && evt == 'onLoad' && arg0 == 'player') {
-
-                       api = api || el(apiId);
-                       swfHeight = self._swfHeight();
-
-                       each(playlist, function() {
-                               this._fireEvent("onLoad");
-                       });
-
-                       each(plugins, function(name, p) {
-                               p._fireEvent("onUpdate");
-                       });
-
-                       commonClip._fireEvent("onLoad");
-               }
-
-               // other onLoad events are skipped
-               if (evt == 'onLoad' && arg0 != 'player') { return; }
-
-
-               // "normalize" error handling
-               if (evt == 'onError') {
-                       if (typeof arg0 == 'string' || (typeof arg0 == 'number' && typeof arg1 == 'number'))  {
-                               arg0 = arg1;
-                               arg1 = arg2;
-                       }
-               }
-
-
-      if (evt == 'onContextMenu') {
-         each(conf.contextMenu[arg0], function(key, fn)  {
-            fn.call(self);
-         });
-         return;
-      }
-
-               if (evt == 'onPluginEvent' || evt == 'onBeforePluginEvent') {
-                       var name = arg0.name || arg0;
-                       var p = plugins[name];
-
-                       if (p) {
-                               p._fireEvent("onUpdate", arg0);
-                               return p._fireEvent(arg1, a.slice(3));
-                       }
-                       return;
-               }
-
-               // replace whole playlist
-               if (evt == 'onPlaylistReplace') {
-                       playlist = [];
-                       var index = 0;
-                       each(arg0, function() {
-                               playlist.push(new Clip(this, index++, self));
-                       });
-               }
-
-               // insert new clip to the playlist. arg0 = clip, arg1 = index
-               if (evt == 'onClipAdd') {
-
-                       // instream clip additions are ignored at this point
-                       if (arg0.isInStream) { return; }
-
-                       // add new clip into playlist
-                       arg0 = new Clip(arg0, arg1, self);
-                       playlist.splice(arg1, 0, arg0);
-
-                       // increment index variable for the rest of the clips on playlist
-                       for (i = arg1 + 1; i < playlist.length; i++) {
-                               playlist[i].index++;
-                       }
-               }
-
-
-               var ret = true;
-
-               // clip event
-               if (typeof arg0 == 'number' && arg0 < playlist.length) {
-
-                       activeIndex = arg0;
-                       var clip = playlist[arg0];
-
-                       if (clip) {
-                               ret = clip._fireEvent(evt, arg1, arg2);
-                       }
-
-                       if (!clip || ret !== false) {
-                               // clip argument is given for common clip, because it behaves as the target
-                               ret = commonClip._fireEvent(evt, arg1, arg2, clip);
-                       }
-               }
-
-
-               // trigger player event
-               each(listeners[evt], function() {
-                       ret = this.call(self, arg0, arg1);
-
-                       // remove cached entry
-                       if (this.cached) {
-                               listeners[evt].splice(i, 1);
-                       }
-
-                       // break loop
-                       if (ret === false) { return false;       }
-                       i++;
-
-               });
-
-               return ret;
-       };
-
-//}}}
-
-
-// {{{ init
-
-   function init() {
-        wrapper.innerHTML = ''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them
-               // replace previous installation
-               if ($f(wrapper)) {
-                       $f(wrapper).getParent().innerHTML = "";
-                       playerIndex = $f(wrapper).getIndex();
-                       players[playerIndex] = self;
-
-               // register this player into global array of instances
-               } else {
-                       players.push(self);
-                       playerIndex = players.length -1;
-               }
-
-               wrapperHeight = parseInt(wrapper.style.height, 10) || wrapper.clientHeight;
-
-               // playerId
-               playerId = wrapper.id || "fp" + makeId();
-               apiId = params.id || playerId + "_api";
-               params.id = apiId;
-               conf.playerId = playerId;
-
-
-               // plain url is given as config
-               if (typeof conf == 'string') {
-                       conf = {clip:{url:conf}};
-               }
-
-               if (typeof conf.clip == 'string') {
-                       conf.clip = {url: conf.clip};
-               }
-
-               // common clip is always there
-               conf.clip = conf.clip || {};
-
-
-               // wrapper href as common clip's url
-               if (wrapper.getAttribute("href", 2) && !conf.clip.url) {
-                       conf.clip.url = wrapper.getAttribute("href", 2);
-               }
-
-               commonClip = new Clip(conf.clip, -1, self);
-
-               // playlist
-               conf.playlist = conf.playlist || [conf.clip];
-
-               var index = 0;
-
-               each(conf.playlist, function() {
-
-                       var clip = this;
-
-                       /* sometimes clip is given as array. this is not accepted. */
-                       if (typeof clip == 'object' && clip.length) {
-                               clip = {url: "" + clip};
-                       }
-
-                       // populate common clip properties to each clip
-                       each(conf.clip, function(key, val) {
-                               if (val !== undefined && clip[key] === undefined && typeof val != 'function') {
-                                       clip[key] = val;
-                               }
-                       });
-
-                       // modify playlist in configuration
-                       conf.playlist[index] = clip;
-
-                       // populate playlist array
-                       clip = new Clip(clip, index, self);
-                       playlist.push(clip);
-                       index++;
-               });
-
-               // event listeners
-               each(conf, function(key, val) {
-                       if (typeof val == 'function') {
-
-                               // common clip event
-                               if (commonClip[key]) {
-                                       commonClip[key](val);
-
-                               // player event
-                               } else {
-                                       bind(listeners, key, val);
-                               }
-
-                               // no need to supply for the Flash component
-                               delete conf[key];
-                       }
-               });
-
-
-               // plugins
-               each(conf.plugins, function(name, val) {
-                       if (val) {
-                               plugins[name] = new Plugin(name, val, self);
-                       }
-               });
-
-
-               // setup controlbar plugin if not explicitly defined
-               if (!conf.plugins || conf.plugins.controls === undefined) {
-                       plugins.controls = new Plugin("controls", null, self);
-               }
-
-               // setup canvas as plugin
-               plugins.canvas = new Plugin("canvas", null, self);
-
-               html = wrapper.innerHTML;
-
-               // click function
-               function doClick(e) {
-
-                       // ipad/iPhone --> follow the link if plugin not installed
-                       var hasiPadSupport = self.hasiPadSupport && self.hasiPadSupport();
-                       if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(playlist[0].url) && ! hasiPadSupport ) {
-                               return true;
-                       }
-
-                       if (!self.isLoaded() && self._fireEvent("onBeforeClick") !== false) {
-                               self.load();
-                       }
-                       return stopEvent(e);
-               }
-
-               function installPlayer() {
-                       // defer loading upon click
-                       if (html.replace(/\s/g, '') !== '') {
-
-                               if (wrapper.addEventListener) {
-                                       wrapper.addEventListener("click", doClick, false);
-
-                               } else if (wrapper.attachEvent) {
-                                       wrapper.attachEvent("onclick", doClick);
-                               }
-
-                       // player is loaded upon page load
-                       } else {
-
-                               // prevent default action from wrapper. (fixes safari problems)
-                               if (wrapper.addEventListener) {
-                                       wrapper.addEventListener("click", stopEvent, false);
-                               }
-                               // load player
-                               self.load();
-                       }
-               }
-
-               // now that the player is initialized, wait for the plugin chain to finish
-               // before actually changing the dom
-               setTimeout(installPlayer, 0);
-       }
-
-       // possibly defer initialization until DOM get's loaded
-       if (typeof wrapper == 'string') {
-               var node = el(wrapper);
-               if (!node) { throw "Flowplayer cannot access element: " + wrapper; }
-               wrapper = node;
-               init();
-
-       // we have a DOM element so page is already loaded
-       } else {
-               init();
-       }
-
-
-//}}}
-
-
-}
-
-
-// {{{ flowplayer() & statics
-
-// container for player instances
-var players = [];
-
-
-// this object is returned when multiple player's are requested
-function Iterator(arr) {
-
-       this.length = arr.length;
-
-       this.each = function(fn)  {
-               each(arr, fn);
-       };
-
-       this.size = function() {
-               return arr.length;
-       };
-}
-
-// these two variables are the only global variables
-window.flowplayer = window.$f = function() {
-       var instance = null;
-       var arg = arguments[0];
-
-    // Moodle hack - we do not want the missing flash hints - we need the original links for accessibility and incompatible browsers
-    if (!flashembed.isSupported([6, 65])) {
-        return null;
-    }
-    // Moodle hack end
-
-       // $f()
-       if (!arguments.length) {
-               each(players, function() {
-                       if (this.isLoaded())  {
-                               instance = this;
-                               return false;
-                       }
-               });
-
-               return instance || players[0];
-       }
-
-       if (arguments.length == 1) {
-
-               // $f(index);
-               if (typeof arg == 'number') {
-                       return players[arg];
-
-
-               // $f(wrapper || 'containerId' || '*');
-               } else {
-
-                       // $f("*");
-                       if (arg == '*') {
-                               return new Iterator(players);
-                       }
-
-                       // $f(wrapper || 'containerId');
-                       each(players, function() {
-                               if (this.id() == arg.id || this.id() == arg || this.getParent() == arg)  {
-                                       instance = this;
-                                       return false;
-                               }
-                       });
-
-                       return instance;
-               }
-       }
-
-       // instance builder
-       if (arguments.length > 1) {
-
-               // flashembed parameters
-               var params = arguments[1],
-                        conf = (arguments.length == 3) ? arguments[2] : {};
-
-
-               if (typeof params == 'string') {
-                       params = {src: params};
-               }
-
-               params = extend({
-                       bgcolor: "#000000",
-                       version: [9, 0],
-                       expressInstall: "http://static.flowplayer.org/swf/expressinstall.swf",
-                       cachebusting: false
-
-               }, params);
-
-               if (typeof arg == 'string') {
-
-                       // select arg by classname
-                       if (arg.indexOf(".") != -1) {
-                               var instances = [];
-
-                               each(select(arg), function() {
-                                       instances.push(new Player(this, clone(params), clone(conf)));
-                               });
-
-                               return new Iterator(instances);
-
-                       // select node by id
-                       } else {
-                               var node = el(arg);
-                               return new Player(node !== null ? node : arg, params, conf);
-                       }
-
-
-               // arg is a DOM element
-               } else if (arg) {
-                       return new Player(arg, params, conf);
-               }
-
-       }
-
-       return null;
-};
-
-extend(window.$f, {
-
-       // called by Flash External Interface
-       fireEvent: function() {
-               var a = [].slice.call(arguments);
-               var p = $f(a[0]);
-               return p ? p._fireEvent(a.slice(1)) : null;
-       },
-
-
-       // create plugins by modifying Player's prototype
-       addPlugin: function(name, fn) {
-               Player.prototype[name] = fn;
-               return $f;
-       },
-
-       // utility methods for plugin developers
-       each: each,
-
-       extend: extend
-});
-
-
-//}}}
-
-
-//{{{ jQuery support
-
-if (typeof jQuery == 'function') {
-
-       jQuery.fn.flowplayer = function(params, conf) {
-
-               // select instances
-               if (!arguments.length || typeof arguments[0] == 'number') {
-                       var arr = [];
-                       this.each(function()  {
-                               var p = $f(this);
-                               if (p) {
-                                       arr.push(p);
-                               }
-                       });
-                       return arguments.length ? arr[arguments[0]] : new Iterator(arr);
-               }
-
-               // create flowplayer instances
-               return this.each(function() {
-                       $f(this, clone(params), conf ? clone(conf) : {});
-               });
-
-       };
-
-}
-
-//}}}
-
-
-})();
-/**
- * @license
- * jQuery Tools 3.2.6 / Flashembed - New wave Flash embedding
- *
- * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
- *
- * http://flowplayer.org/tools/toolbox/flashembed.html
- *
- * Since : March 2008
- * Date  : @DATE
- */
-(function() {
-
-       var IE = document.all,
-                URL = 'http://www.adobe.com/go/getflashplayer',
-                JQUERY = typeof jQuery == 'function',
-                RE = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/,
-                GLOBAL_OPTS = {
-                       // very common opts
-                       width: '100%',
-                       height: '100%',
-                       id: "_" + ("" + Math.random()).slice(9),
-
-                       // flashembed defaults
-                       allowfullscreen: true,
-                       allowscriptaccess: 'always',
-                       quality: 'high',
-
-                       // flashembed specific options
-                       version: [3, 0],
-                       onFail: null,
-                       expressInstall: null,
-                       w3c: false,
-                       cachebusting: false
-       };
-
-       // version 9 bugfix: (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
-       if (window.attachEvent) {
-               window.attachEvent("onbeforeunload", function() {
-                       __flash_unloadHandler = function() {};
-                       __flash_savedUnloadHandler = function() {};
-               });
-       }
-
-       // simple extend
-       function extend(to, from) {
-               if (from) {
-                       for (var key in from) {
-                               if (from.hasOwnProperty(key)) {
-                                       to[key] = from[key];
-                               }
-                       }
-               }
-               return to;
-       }
-
-       // used by asString method
-       function map(arr, func) {
-               var newArr = [];
-               for (var i in arr) {
-                       if (arr.hasOwnProperty(i)) {
-                               newArr[i] = func(arr[i]);
-                       }
-               }
-               return newArr;
-       }
-
-       window.flashembed = function(root, opts, conf) {
-
-               // root must be found / loaded
-               if (typeof root == 'string') {
-                       root = document.getElementById(root.replace("#", ""));
-               }
-
-               // not found
-               if (!root) { return; }
-
-               if (typeof opts == 'string') {
-                       opts = {src: opts};
-               }
-
-               return new Flash(root, extend(extend({}, GLOBAL_OPTS), opts), conf);
-       };
-
-       // flashembed "static" API
-       var f = extend(window.flashembed, {
-
-               conf: GLOBAL_OPTS,
-
-               getVersion: function()  {
-                       var fo, ver;
-
-                       try {
-                               ver = navigator.plugins["Shockwave Flash"].description.slice(16);
-                       } catch(e) {
-
-                               try  {
-                                       fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
-                                       ver = fo && fo.GetVariable("$version");
-
-                               } catch(err) {
-                try  {
-                    fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
-                    ver = fo && fo.GetVariable("$version");
-                } catch(err2) { }
-                               }
-                       }
-
-                       ver = RE.exec(ver);
-                       return ver ? [ver[1], ver[3]] : [0, 0];
-               },
-
-               asString: function(obj) {
-
-                       if (obj === null || obj === undefined) { return null; }
-                       var type = typeof obj;
-                       if (type == 'object' && obj.push) { type = 'array'; }
-
-                       switch (type){
-
-                               case 'string':
-                                       obj = obj.replace(new RegExp('(["\\\\])', 'g'), '\\$1');
-
-                                       // flash does not handle %- characters well. transforms "50%" to "50pct" (a dirty hack, I admit)
-                                       obj = obj.replace(/^\s?(\d+\.?\d+)%/, "$1pct");
-                                       return '"' +obj+ '"';
-
-                               case 'array':
-                                       return '['+ map(obj, function(el) {
-                                               return f.asString(el);
-                                       }).join(',') +']';
-
-                               case 'function':
-                                       return '"function()"';
-
-                               case 'object':
-                                       var str = [];
-                                       for (var prop in obj) {
-                                               if (obj.hasOwnProperty(prop)) {
-                                                       str.push('"'+prop+'":'+ f.asString(obj[prop]));
-                                               }
-                                       }
-                                       return '{'+str.join(',')+'}';
-                       }
-
-                       // replace ' --> "  and remove spaces
-                       return String(obj).replace(/\s/g, " ").replace(/\'/g, "\"");
-               },
-
-               getHTML: function(opts, conf) {
-
-                       opts = extend({}, opts);
-
-                       /******* OBJECT tag and it's attributes *******/
-                       var html = '<object width="' + opts.width +
-                               '" height="' + opts.height +
-                               '" id="' + opts.id +
-                               '" name="' + opts.id + '"';
-
-                       if (opts.cachebusting) {
-                               opts.src += ((opts.src.indexOf("?") != -1 ? "&" : "?") + Math.random());
-                       }
-
-                       if (opts.w3c || !IE) {
-                               html += ' data="' +opts.src+ '" type="application/x-shockwave-flash"';
-                       } else {
-                               html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
-                       }
-
-                       html += '>';
-
-                       /******* nested PARAM tags *******/
-                       if (opts.w3c || IE) {
-                               html += '<param name="movie" value="' +opts.src+ '" />';
-                       }
-
-                       // not allowed params
-                       opts.width = opts.height = opts.id = opts.w3c = opts.src = null;
-                       opts.onFail = opts.version = opts.expressInstall = null;
-
-                       for (var key in opts) {
-                               if (opts[key]) {
-                                       html += '<param name="'+ key +'" value="'+ opts[key] +'" />';
-                               }
-                       }
-
-                       /******* FLASHVARS *******/
-                       var vars = "";
-
-                       if (conf) {
-                               for (var k in conf) {
-                                       if (conf[k]) {
-                                               var val = conf[k];
-                                               vars += k +'='+ (/function|object/.test(typeof val) ? f.asString(val) : val) + '&';
-                                       }
-                               }
-                               vars = vars.slice(0, -1);
-                               html += '<param name="flashvars" value=\'' + vars + '\' />';
-                       }
-
-                       html += "</object>";
-
-                       return html;
-               },
-
-               isSupported: function(ver) {
-                       return VERSION[0] > ver[0] || VERSION[0] == ver[0] && VERSION[1] >= ver[1];
-               }
-
-       });
-
-       var VERSION = f.getVersion();
-
-       function Flash(root, opts, conf) {
-
-               // version is ok
-               if (f.isSupported(opts.version)) {
-                       root.innerHTML = f.getHTML(opts, conf);
-
-               // express install
-               } else if (opts.expressInstall && f.isSupported([6, 65])) {
-                       root.innerHTML = f.getHTML(extend(opts, {src: opts.expressInstall}), {
-                               MMredirectURL: location.href,
-                               MMplayerType: 'PlugIn',
-                               MMdoctitle: document.title
-                       });
-
-               } else {
-
-                       // fail #2.1 custom content inside container
-                       if (!root.innerHTML.replace(/\s/g, '')) {
-                               root.innerHTML =
-                                       "<h2>Flash version " + opts.version + " or greater is required</h2>" +
-                                       "<h3>" +
-                                               (VERSION[0] > 0 ? "Your version is " + VERSION : "You have no flash plugin installed") +
-                                       "</h3>" +
-
-                                       (root.tagName == 'A' ? "<p>Click here to download latest version</p>" :
-                                               "<p>Download latest version from <a href='" + URL + "'>here</a></p>");
-
-                               if (root.tagName == 'A') {
-                                       root.onclick = function() {
-                                               location.href = URL;
-                                       };
-                               }
-                       }
-
-                       // onFail
-                       if (opts.onFail) {
-                               var ret = opts.onFail.call(this);
-                               if (typeof ret == 'string') { root.innerHTML = ret; }
-                       }
-               }
-
-               // http://flowplayer.org/forum/8/18186#post-18593
-               if (IE) {
-                       window[opts.id] = document.getElementById(opts.id);
-               }
-
-               // API methods for callback
-               extend(this, {
-
-                       getRoot: function() {
-                               return root;
-                       },
-
-                       getOptions: function() {
-                               return opts;
-                       },
-
-
-                       getConf: function() {
-                               return conf;
-                       },
-
-                       getApi: function() {
-                               return root.firstChild;
-                       }
-
-               });
-       }
-
-       // setup jquery support
-       if (JQUERY) {
-
-               // tools version number
-               jQuery.tools = jQuery.tools || {version: '3.2.6'};
-
-               jQuery.tools.flashembed = {
-                       conf: GLOBAL_OPTS
-               };
-
-               jQuery.fn.flashembed = function(opts, conf) {
-                       return this.each(function() {
-                               jQuery(this).data("flashembed", flashembed(this, opts, conf));
-                       });
-               };
-       }
-
-})();
-
diff --git a/lib/flowplayer/flowplayer-3.2.7.swf b/lib/flowplayer/flowplayer-3.2.7.swf
deleted file mode 100644 (file)
index 20a4119..0000000
Binary files a/lib/flowplayer/flowplayer-3.2.7.swf and /dev/null differ
diff --git a/lib/flowplayer/flowplayer-3.2.8.js b/lib/flowplayer/flowplayer-3.2.8.js
new file mode 100644 (file)
index 0000000..ee42b3c
--- /dev/null
@@ -0,0 +1,1003 @@
+/*
+ * flowplayer.js 3.2.8. The Flowplayer API
+ *
+ * Copyright 2009-2011 Flowplayer Oy
+ *
+ * This file is part of Flowplayer.
+ *
+ * Flowplayer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Flowplayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Date: 2011-12-30 12:34:08 -0500 (Fri, 30 Dec 2011)
+ * Revision: 761
+ */
+(function () {
+    function g(o) {
+        console.log("$f.fireEvent", [].slice.call(o))
+    }
+
+    function k(q) {
+        if (!q || typeof q != "object") {
+            return q
+        }
+        var o = new q.constructor();
+        for (var p in q) {
+            if (q.hasOwnProperty(p)) {
+                o[p] = k(q[p])
+            }
+        }
+        return o
+    }
+
+    function m(t, q) {
+        if (!t) {
+            return
+        }
+        var o, p = 0, r = t.length;
+        if (r === undefined) {
+            for (o in t) {
+                if (q.call(t[o], o, t[o]) === false) {
+                    break
+                }
+            }
+        } else {
+            for (var s = t[0]; p < r && q.call(s, p, s) !== false; s = t[++p]) {
+            }
+        }
+        return t
+    }
+
+    function c(o) {
+        return document.getElementById(o)
+    }
+
+    function i(q, p, o) {
+        if (typeof p != "object") {
+            return q
+        }
+        if (q && p) {
+            m(p, function (r, s) {
+                if (!o || typeof s != "function") {
+                    q[r] = s
+                }
+            })
+        }
+        return q
+    }
+
+    function n(s) {
+        var q = s.indexOf(".");
+        if (q != -1) {
+            var p = s.slice(0, q) || "*";
+            var o = s.slice(q + 1, s.length);
+            var r = [];
+            m(document.getElementsByTagName(p), function () {
+                if (this.className && this.className.indexOf(o) != -1) {
+                    r.push(this)
+                }
+            });
+            return r
+        }
+    }
+
+    function f(o) {
+        o = o || window.event;
+        if (o.preventDefault) {
+            o.stopPropagation();
+            o.preventDefault()
+        } else {
+            o.returnValue = false;
+            o.cancelBubble = true
+        }
+        return false
+    }
+
+    function j(q, o, p) {
+        q[o] = q[o] || [];
+        q[o].push(p)
+    }
+
+    function e() {
+        return"_" + ("" + Math.random()).slice(2, 10)
+    }
+
+    var h = function (t, r, s) {
+        var q = this, p = {}, u = {};
+        q.index = r;
+        if (typeof t == "string") {
+            t = {url:t}
+        }
+        i(this, t, true);
+        m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function () {
+            var v = "on" + this;
+            if (v.indexOf("*") != -1) {
+                v = v.slice(0, v.length - 1);
+                var w = "onBefore" + v.slice(2);
+                q[w] = function (x) {
+                    j(u, w, x);
+                    return q
+                }
+            }
+            q[v] = function (x) {
+                j(u, v, x);
+                return q
+            };
+            if (r == -1) {
+                if (q[w]) {
+                    s[w] = q[w]
+                }
+                if (q[v]) {
+                    s[v] = q[v]
+                }
+            }
+        });
+        i(this, {onCuepoint:function (x, w) {
+            if (arguments.length == 1) {
+                p.embedded = [null, x];
+                return q
+            }
+            if (typeof x == "number") {
+                x = [x]
+            }
+            var v = e();
+            p[v] = [x, w];
+            if (s.isLoaded()) {
+                s._api().fp_addCuepoints(x, r, v)
+            }
+            return q
+        }, update:function (w) {
+            i(q, w);
+            if (s.isLoaded()) {
+                s._api().fp_updateClip(w, r)
+            }
+            var v = s.getConfig();
+            var x = (r == -1) ? v.clip : v.playlist[r];
+            i(x, w, true)
+        }, _fireEvent:function (v, y, w, A) {
+            if (v == "onLoad") {
+                m(p, function (B, C) {
+                    if (C[0]) {
+                        s._api().fp_addCuepoints(C[0], r, B)
+                    }
+                });
+                return false
+            }
+            A = A || q;
+            if (v == "onCuepoint") {
+                var z = p[y];
+                if (z) {
+                    return z[1].call(s, A, w)
+                }
+            }
+            if (y && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v) != -1) {
+                i(A, y);
+                if (y.metaData) {
+                    if (!A.duration) {
+                        A.duration = y.metaData.duration
+                    } else {
+                        A.fullDuration = y.metaData.duration
+                    }
+                }
+            }
+            var x = true;
+            m(u[v], function () {
+                x = this.call(s, A, y, w)
+            });
+            return x
+        }});
+        if (t.onCuepoint) {
+            var o = t.onCuepoint;
+            q.onCuepoint.apply(q, typeof o == "function" ? [o] : o);
+            delete t.onCuepoint
+        }
+        m(t, function (v, w) {
+            if (typeof w == "function") {
+                j(u, v, w);
+                delete t[v]
+            }
+        });
+        if (r == -1) {
+            s.onCuepoint = this.onCuepoint
+        }
+    };
+    var l = function (p, r, q, t) {
+        var o = this, s = {}, u = false;
+        if (t) {
+            i(s, t)
+        }
+        m(r, function (v, w) {
+            if (typeof w == "function") {
+                s[v] = w;
+                delete r[v]
+            }
+        });
+        i(this, {animate:function (y, z, x) {
+            if (!y) {
+                return o
+            }
+            if (typeof z == "function") {
+                x = z;
+                z = 500
+            }
+            if (typeof y == "string") {
+                var w = y;
+                y = {};
+                y[w] = z;
+                z = 500
+            }
+            if (x) {
+                var v = e();
+                s[v] = x
+            }
+            if (z === undefined) {
+                z = 500
+            }
+            r = q._api().fp_animate(p, y, z, v);
+            return o
+        }, css:function (w, x) {
+            if (x !== undefined) {
+                var v = {};
+                v[w] = x;
+                w = v
+            }
+            r = q._api().fp_css(p, w);
+            i(o, r);
+            return o
+        }, show:function () {
+            this.display = "block";
+            q._api().fp_showPlugin(p);
+            return o
+        }, hide:function () {
+            this.display = "none";
+            q._api().fp_hidePlugin(p);
+            return o
+        }, toggle:function () {
+            this.display = q._api().fp_togglePlugin(p);
+            return o
+        }, fadeTo:function (y, x, w) {
+            if (typeof x == "function") {
+                w = x;
+                x = 500
+            }
+            if (w) {
+                var v = e();
+                s[v] = w
+            }
+            this.display = q._api().fp_fadeTo(p, y, x, v);
+            this.opacity = y;
+            return o
+        }, fadeIn:function (w, v) {
+            return o.fadeTo(1, w, v)
+        }, fadeOut:function (w, v) {
+            return o.fadeTo(0, w, v)
+        }, getName:function () {
+            return p
+        }, getPlayer:function () {
+            return q
+        }, _fireEvent:function (w, v, x) {
+            if (w == "onUpdate") {
+                var z = q._api().fp_getPlugin(p);
+                if (!z) {
+                    return
+                }
+                i(o, z);
+                delete o.methods;
+                if (!u) {
+                    m(z.methods, function () {
+                        var B = "" + this;
+                        o[B] = function () {
+                            var C = [].slice.call(arguments);
+                            var D = q._api().fp_invoke(p, B, C);
+                            return D === "undefined" || D === undefined ? o : D
+                        }
+                    });
+                    u = true
+                }
+            }
+            var A = s[w];
+            if (A) {
+                var y = A.apply(o, v);
+                if (w.slice(0, 1) == "_") {
+                    delete s[w]
+                }
+                return y
+            }
+            return o
+        }})
+    };
+
+    function b(q, G, t) {
+        var w = this, v = null, D = false, u, s, F = [], y = {}, x = {}, E, r, p, C, o, A;
+        i(w, {id:function () {
+            return E
+        }, isLoaded:function () {
+            return(v !== null && v.fp_play !== undefined && !D)
+        }, getParent:function () {
+            return q
+        }, hide:function (H) {
+            if (H) {
+                q.style.height = "0px"
+            }
+            if (w.isLoaded()) {
+                v.style.height = "0px"
+            }
+            return w
+        }, show:function () {
+            q.style.height = A + "px";
+            if (w.isLoaded()) {
+                v.style.height = o + "px"
+            }
+            return w
+        }, isHidden:function () {
+            return w.isLoaded() && parseInt(v.style.height, 10) === 0
+        }, load:function (J) {
+            if (!w.isLoaded() && w._fireEvent("onBeforeLoad") !== false) {
+                var H = function () {
+                    if (u && !flashembed.isSupported(G.version)) {
+                        q.innerHTML = ""
+                    }
+                    if (J) {
+                        J.cached = true;
+                        j(x, "onLoad", J)
+                    }
+                    flashembed(q, G, {config:t})
+                };
+                var I = 0;
+                m(a, function () {
+                    this.unload(function (K) {
+                        if (++I == a.length) {
+                            H()
+                        }
+                    })
+                })
+            }
+            return w
+        }, unload:function (J) {
+            if (u.replace(/\s/g, "") !== "") {
+                if (w._fireEvent("onBeforeUnload") === false) {
+                    if (J) {
+                        J(false)
+                    }
+                    return w
+                }
+                D = true;
+                try {
+                    if (v) {
+                        v.fp_close();
+                        w._fireEvent("onUnload")
+                    }
+                } catch (H) {
+                }
+                var I = function () {
+                    v = null;
+                    q.innerHTML = u;
+                    D = false;
+                    if (J) {
+                        J(true)
+                    }
+                };
+                if (/WebKit/i.test(navigator.userAgent) && !/Chrome/i.test(navigator.userAgent)) {
+                    setTimeout(I, 0)
+                } else {
+                    I()
+                }
+            } else {
+                if (J) {
+                    J(false)
+                }
+            }
+            return w
+        }, getClip:function (H) {
+            if (H === undefined) {
+                H = C
+            }
+            return F[H]
+        }, getCommonClip:function () {
+            return s
+        }, getPlaylist:function () {
+            return F
+        }, getPlugin:function (H) {
+            var J = y[H];
+            if (!J && w.isLoaded()) {
+                var I = w._api().fp_getPlugin(H);
+                if (I) {
+                    J = new l(H, I, w);
+                    y[H] = J
+                }
+            }
+            return J
+        }, getScreen:function () {
+            return w.getPlugin("screen")
+        }, getControls:function () {
+            return w.getPlugin("controls")._fireEvent("onUpdate")
+        }, getLogo:function () {
+            try {
+                return w.getPlugin("logo")._fireEvent("onUpdate")
+            } catch (H) {
+            }
+        }, getPlay:function () {
+            return w.getPlugin("play")._fireEvent("onUpdate")
+        }, getConfig:function (H) {
+            return H ? k(t) : t
+        }, getFlashParams:function () {
+            return G
+        }, loadPlugin:function (K, J, M, L) {
+            if (typeof M == "function") {
+                L = M;
+                M = {}
+            }
+            var I = L ? e() : "_";
+            w._api().fp_loadPlugin(K, J, M, I);
+            var H = {};
+            H[I] = L;
+            var N = new l(K, null, w, H);
+            y[K] = N;
+            return N
+        }, getState:function () {
+            return w.isLoaded() ? v.fp_getState() : -1
+        }, play:function (I, H) {
+            var J = function () {
+                if (I !== undefined) {
+                    w._api().fp_play(I, H)
+                } else {
+                    w._api().fp_play()
+                }
+            };
+            if (w.isLoaded()) {
+                J()
+            } else {
+                if (D) {
+                    setTimeout(function () {
+                        w.play(I, H)
+                    }, 50)
+                } else {
+                    w.load(function () {
+                        J()
+                    })
+                }
+            }
+            return w
+        }, getVersion:function () {
+            var I = "flowplayer.js 3.2.8";
+            if (w.isLoaded()) {
+                var H = v.fp_getVersion();
+                H.push(I);
+                return H
+            }
+            return I
+        }, _api:function () {
+            if (!w.isLoaded()) {
+                throw"Flowplayer " + w.id() + " not loaded when calling an API method"
+            }
+            return v
+        }, setClip:function (H) {
+            m(H, function (I, J) {
+                if (typeof J == "function") {
+                    j(x, I, J);
+                    delete H[I]
+                } else {
+                    if (I == "onCuepoint") {
+                        $f(q).getCommonClip().onCuepoint(H[I][0], H[I][1])
+                    }
+                }
+            });
+            w.setPlaylist([H]);
+            return w
+        }, getIndex:function () {
+            return p
+        }, bufferAnimate:function (H) {
+            v.fp_bufferAnimate(H === undefined || H);
+            return w
+        }, _swfHeight:function () {
+            return v.clientHeight
+        }});
+        m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function () {
+            var H = "on" + this;
+            if (H.indexOf("*") != -1) {
+                H = H.slice(0, H.length - 1);
+                var I = "onBefore" + H.slice(2);
+                w[I] = function (J) {
+                    j(x, I, J);
+                    return w
+                }
+            }
+            w[H] = function (J) {
+                j(x, H, J);
+                return w
+            }
+        });
+        m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","), function () {
+            var H = this;
+            w[H] = function (J, I) {
+                if (!w.isLoaded()) {
+                    return w
+                }
+                var K = null;
+                if (J !== undefined && I !== undefined) {
+                    K = v["fp_" + H](J, I)
+                } else {
+                    K = (J === undefined) ? v["fp_" + H]() : v["fp_" + H](J)
+                }
+                return K === "undefined" || K === undefined ? w : K
+            }
+        });
+        w._fireEvent = function (Q) {
+            if (typeof Q == "string") {
+                Q = [Q]
+            }
+            var R = Q[0], O = Q[1], M = Q[2], L = Q[3], K = 0;
+            if (t.debug) {
+                g(Q)
+            }
+            if (!w.isLoaded() && R == "onLoad" && O == "player") {
+                v = v || c(r);
+                o = w._swfHeight();
+                m(F, function () {
+                    this._fireEvent("onLoad")
+                });
+                m(y, function (S, T) {
+                    T._fireEvent("onUpdate")
+                });
+                s._fireEvent("onLoad")
+            }
+            if (R == "onLoad" && O != "player") {
+                return
+            }
+            if (R == "onError") {
+                if (typeof O == "string" || (typeof O == "number" && typeof M == "number")) {
+                    O = M;
+                    M = L
+                }
+            }
+            if (R == "onContextMenu") {
+                m(t.contextMenu[O], function (S, T) {
+                    T.call(w)
+                });
+                return
+            }
+            if (R == "onPluginEvent" || R == "onBeforePluginEvent") {
+                var H = O.name || O;
+                var I = y[H];
+                if (I) {
+                    I._fireEvent("onUpdate", O);
+                    return I._fireEvent(M, Q.slice(3))
+                }
+                return
+            }
+            if (R == "onPlaylistReplace") {
+                F = [];
+                var N = 0;
+                m(O, function () {
+                    F.push(new h(this, N++, w))
+                })
+            }
+            if (R == "onClipAdd") {
+                if (O.isInStream) {
+                    return
+                }
+                O = new h(O, M, w);
+                F.splice(M, 0, O);
+                for (K = M + 1; K < F.length; K++) {
+                    F[K].index++
+                }
+            }
+            var P = true;
+            if (typeof O == "number" && O < F.length) {
+                C = O;
+                var J = F[O];
+                if (J) {
+                    P = J._fireEvent(R, M, L)
+                }
+                if (!J || P !== false) {
+                    P = s._fireEvent(R, M, L, J)
+                }
+            }
+            m(x[R], function () {
+                P = this.call(w, O, M);
+                if (this.cached) {
+                    x[R].splice(K, 1)
+                }
+                if (P === false) {
+                    return false
+                }
+                K++
+            });
+            return P
+        };
+        function B() {
+            q.innerHTML = ''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them
+            if ($f(q)) {
+                $f(q).getParent().innerHTML = "";
+                p = $f(q).getIndex();
+                a[p] = w
+            } else {
+                a.push(w);
+                p = a.length - 1
+            }
+            A = parseInt(q.style.height, 10) || q.clientHeight;
+            E = q.id || "fp" + e();
+            r = G.id || E + "_api";
+            G.id = r;
+            u = q.innerHTML;
+            if (typeof t == "string") {
+                t = {clip:{url:t}}
+            }
+            t.playerId = E;
+            t.clip = t.clip || {};
+            if (q.getAttribute("href", 2) && !t.clip.url) {
+                t.clip.url = q.getAttribute("href", 2)
+            }
+            s = new h(t.clip, -1, w);
+            t.playlist = t.playlist || [t.clip];
+            var I = 0;
+            m(t.playlist, function () {
+                var L = this;
+                if (typeof L == "object" && L.length) {
+                    L = {url:"" + L}
+                }
+                m(t.clip, function (M, N) {
+                    if (N !== undefined && L[M] === undefined && typeof N != "function") {
+                        L[M] = N
+                    }
+                });
+                t.playlist[I] = L;
+                L = new h(L, I, w);
+                F.push(L);
+                I++
+            });
+            m(t, function (L, M) {
+                if (typeof M == "function") {
+                    if (s[L]) {
+                        s[L](M)
+                    } else {
+                        j(x, L, M)
+                    }
+                    delete t[L]
+                }
+            });
+            m(t.plugins, function (L, M) {
+                if (M) {
+                    y[L] = new l(L, M, w)
+                }
+            });
+            if (!t.plugins || t.plugins.controls === undefined) {
+                y.controls = new l("controls", null, w)
+            }
+            y.canvas = new l("canvas", null, w);
+            u = q.innerHTML;
+            function K(L) {
+                if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(F[0].url) && !J()) {
+                    return true
+                }
+                if (!w.isLoaded() && w._fireEvent("onBeforeClick") !== false) {
+                    w.load()
+                }
+                return f(L)
+            }
+
+            function J() {
+                return w.hasiPadSupport && w.hasiPadSupport()
+            }
+
+            function H() {
+                if (u.replace(/\s/g, "") !== "") {
+                    if (q.addEventListener) {
+                        q.addEventListener("click", K, false)
+                    } else {
+                        if (q.attachEvent) {
+                            q.attachEvent("onclick", K)
+                        }
+                    }
+                } else {
+                    if (q.addEventListener && !J()) {
+                        q.addEventListener("click", f, false)
+                    }
+                    w.load()
+                }
+            }
+
+            setTimeout(H, 0)
+        }
+
+        if (typeof q == "string") {
+            var z = c(q);
+            if (!z) {
+                throw"Flowplayer cannot access element: " + q
+            }
+            q = z;
+            B()
+        } else {
+            B()
+        }
+    }
+
+    var a = [];
+
+    function d(o) {
+        this.length = o.length;
+        this.each = function (q) {
+            m(o, q)
+        };
+        this.size = function () {
+            return o.length
+        };
+        var p = this;
+        for (name in b.prototype) {
+            p[name] = function () {
+                var q = arguments;
+                p.each(function () {
+                    this[name].apply(this, q)
+                })
+            }
+        }
+    }
+
+    window.flowplayer = window.$f = function () {
+        var p = null;
+        var o = arguments[0];
+        if(!flashembed.isSupported([6, 65])){return null;} // Moodle hack - we do not want the missing flash hints - we need the original links for accessibility and incompatible browsers
+        if (!arguments.length) {
+            m(a, function () {
+                if (this.isLoaded()) {
+                    p = this;
+                    return false
+                }
+            });
+            return p || a[0]
+        }
+        if (arguments.length == 1) {
+            if (typeof o == "number") {
+                return a[o]
+            } else {
+                if (o == "*") {
+                    return new d(a)
+                }
+                m(a, function () {
+                    if (this.id() == o.id || this.id() == o || this.getParent() == o) {
+                        p = this;
+                        return false
+                    }
+                });
+                return p
+            }
+        }
+        if (arguments.length > 1) {
+            var t = arguments[1], q = (arguments.length == 3) ? arguments[2] : {};
+            if (typeof t == "string") {
+                t = {src:t}
+            }
+            t = i({bgcolor:"#000000", version:[9, 0], expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf", cachebusting:false}, t);
+            if (typeof o == "string") {
+                if (o.indexOf(".") != -1) {
+                    var s = [];
+                    m(n(o), function () {
+                        s.push(new b(this, k(t), k(q)))
+                    });
+                    return new d(s)
+                } else {
+                    var r = c(o);
+                    return new b(r !== null ? r : k(o), k(t), k(q))
+                }
+            } else {
+                if (o) {
+                    return new b(o, k(t), k(q))
+                }
+            }
+        }
+        return null
+    };
+    i(window.$f, {fireEvent:function () {
+        var o = [].slice.call(arguments);
+        var q = $f(o[0]);
+        return q ? q._fireEvent(o.slice(1)) : null
+    }, addPlugin:function (o, p) {
+        b.prototype[o] = p;
+        return $f
+    }, each:m, extend:i});
+    if (typeof jQuery == "function") {
+        jQuery.fn.flowplayer = function (q, p) {
+            if (!arguments.length || typeof arguments[0] == "number") {
+                var o = [];
+                this.each(function () {
+                    var r = $f(this);
+                    if (r) {
+                        o.push(r)
+                    }
+                });
+                return arguments.length ? o[arguments[0]] : new d(o)
+            }
+            return this.each(function () {
+                $f(this, k(q), p ? k(p) : {})
+            })
+        }
+    }
+})();
+(function () {
+    var h = document.all, j = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = {width:"100%", height:"100%", id:"_" + ("" + Math.random()).slice(9), allowfullscreen:true, allowscriptaccess:"always", quality:"high", version:[3, 0], onFail:null, expressInstall:null, w3c:false, cachebusting:false};
+    if (window.attachEvent) {
+        window.attachEvent("onbeforeunload", function () {
+            __flash_unloadHandler = function () {
+            };
+            __flash_savedUnloadHandler = function () {
+            }
+        })
+    }
+    function i(m, l) {
+        if (l) {
+            for (var f in l) {
+                if (l.hasOwnProperty(f)) {
+                    m[f] = l[f]
+                }
+            }
+        }
+        return m
+    }
+
+    function a(f, n) {
+        var m = [];
+        for (var l in f) {
+            if (f.hasOwnProperty(l)) {
+                m[l] = n(f[l])
+            }
+        }
+        return m
+    }
+
+    window.flashembed = function (f, m, l) {
+        if (typeof f == "string") {
+            f = document.getElementById(f.replace("#", ""))
+        }
+        if (!f) {
+            return
+        }
+        if (typeof m == "string") {
+            m = {src:m}
+        }
+        return new d(f, i(i({}, b), m), l)
+    };
+    var g = i(window.flashembed, {conf:b, getVersion:function () {
+        var m, f;
+        try {
+            f = navigator.plugins["Shockwave Flash"].description.slice(16)
+        } catch (o) {
+            try {
+                m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+                f = m && m.GetVariable("$version")
+            } catch (n) {
+                try {
+                    m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+                    f = m && m.GetVariable("$version")
+                } catch (l) {
+                }
+            }
+        }
+        f = e.exec(f);
+        return f ? [f[1], f[3]] : [0, 0]
+    }, asString:function (l) {
+        if (l === null || l === undefined) {
+            return null
+        }
+        var f = typeof l;
+        if (f == "object" && l.push) {
+            f = "array"
+        }
+        switch (f) {
+            case"string":
+                l = l.replace(new RegExp('(["\\\\])', "g"), "\\$1");
+                l = l.replace(/^\s?(\d+\.?\d*)%/, "$1pct");
+                l = l.replace(/(%)/g, "%25").replace(/'/g, "\\u0027").replace(/"/g, "\\u0022").replace(/&/g, "%26");
+                return'"' + l + '"';
+            case"array":
+                return"[" + a(l,
+                    function (o) {
+                        return g.asString(o)
+                    }).join(",") + "]";
+            case"function":
+                return'"function()"';
+            case"object":
+                var m = [];
+                for (var n in l) {
+                    if (l.hasOwnProperty(n)) {
+                        m.push('"' + n + '":' + g.asString(l[n]))
+                    }
+                }
+                return"{" + m.join(",") + "}"
+        }
+        return String(l).replace(/\s/g, " ").replace(/\'/g, '"')
+    }, getHTML:function (o, l) {
+        o = i({}, o);
+        var n = '<object width="' + o.width + '" height="' + o.height + '" id="' + o.id + '" name="' + o.id + '"';
+        if (o.cachebusting) {
+            o.src += ((o.src.indexOf("?") != -1 ? "&" : "?") + Math.random())
+        }
+        if (o.w3c || !h) {
+            n += ' data="' + o.src + '" type="application/x-shockwave-flash"'
+        } else {
+            n += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+        }
+        n += ">";
+        if (o.w3c || h) {
+            n += '<param name="movie" value="' + o.src + '" />'
+        }
+        o.width = o.height = o.id = o.w3c = o.src = null;
+        o.onFail = o.version = o.expressInstall = null;
+        for (var m in o) {
+            if (o[m]) {
+                n += '<param name="' + m + '" value="' + o[m] + '" />'
+            }
+        }
+        var p = "";
+        if (l) {
+            for (var f in l) {
+                if (l[f]) {
+                    var q = l[f];
+                    p += f + "=" + (/function|object/.test(typeof q) ? g.asString(q) : q) + "&"
+                }
+            }
+            p = p.slice(0, -1);
+            n += '<param name="flashvars" value=\'' + p + "' />"
+        }
+        n += "</object>";
+        return n
+    }, isSupported:function (f) {
+        return k[0] > f[0] || k[0] == f[0] && k[1] >= f[1]
+    }});
+    var k = g.getVersion();
+
+    function d(f, n, m) {
+        if (g.isSupported(n.version)) {
+            f.innerHTML = g.getHTML(n, m)
+        } else {
+            if (n.expressInstall && g.isSupported([6, 65])) {
+                f.innerHTML = g.getHTML(i(n, {src:n.expressInstall}), {MMredirectURL:encodeURIComponent(location.href), MMplayerType:"PlugIn", MMdoctitle:document.title})
+            } else {
+                if (!f.innerHTML.replace(/\s/g, "")) {
+                    f.innerHTML = "<h2>Flash version " + n.version + " or greater is required</h2><h3>" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "</h3>" + (f.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + j + "'>here</a></p>");
+                    if (f.tagName == "A") {
+                        f.onclick = function () {
+                            location.href = j
+                        }
+                    }
+                }
+                if (n.onFail) {
+                    var l = n.onFail.call(this);
+                    if (typeof l == "string") {
+                        f.innerHTML = l
+                    }
+                }
+            }
+        }
+        if (h) {
+            window[n.id] = document.getElementById(n.id)
+        }
+        i(this, {getRoot:function () {
+            return f
+        }, getOptions:function () {
+            return n
+        }, getConf:function () {
+            return m
+        }, getApi:function () {
+            return f.firstChild
+        }})
+    }
+
+    if (c) {
+        jQuery.tools = jQuery.tools || {version:"3.2.8"};
+        jQuery.tools.flashembed = {conf:b};
+        jQuery.fn.flashembed = function (l, f) {
+            return this.each(function () {
+                $(this).data("flashembed", flashembed(this, l, f))
+            })
+        }
+    }
+})();
\ No newline at end of file
diff --git a/lib/flowplayer/flowplayer-3.2.8.min.js b/lib/flowplayer/flowplayer-3.2.8.min.js
new file mode 100644 (file)
index 0000000..93feb73
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * flowplayer.js 3.2.8. The Flowplayer API
+ *
+ * Copyright 2009-2011 Flowplayer Oy
+ *
+ * This file is part of Flowplayer.
+ *
+ * Flowplayer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Flowplayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Date: 2011-12-30 12:34:08 -0500 (Fri, 30 Dec 2011)
+ * Revision: 761
+ *
+ * this file was modified for Moodle - see flowplayer-3.2.8.js
+ */
+(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!==undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}if(J){J.cached=true;j(x,"onLoad",J)}flashembed(q,G,{config:t})};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};if(/WebKit/i.test(navigator.userAgent)&&!/Chrome/i.test(navigator.userAgent)){setTimeout(I,0)}else{I()}}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.8";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){m(H,function(I,J){if(typeof J=="function"){j(x,I,J);delete H[I]}else{if(I=="onCuepoint"){$f(q).getCommonClip().onCuepoint(H[I][0],H[I][1])}}});w.setPlaylist([H]);return w},getIndex:function(){return p},bufferAnimate:function(H){v.fp_bufferAnimate(H===undefined||H);return w},_swfHeight:function(){return v.clientHeight}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=w._swfHeight();m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){q.innerHTML='';if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;u=q.innerHTML;if(typeof t=="string"){t={clip:{url:t}}}t.playerId=E;t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var I=0;m(t.playlist,function(){var L=this;if(typeof L=="object"&&L.length){L={url:""+L}}m(t.clip,function(M,N){if(N!==undefined&&L[M]===undefined&&typeof N!="function"){L[M]=N}});t.playlist[I]=L;L=new h(L,I,w);F.push(L);I++});m(t,function(L,M){if(typeof M=="function"){if(s[L]){s[L](M)}else{j(x,L,M)}delete t[L]}});m(t.plugins,function(L,M){if(M){y[L]=new l(L,M,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);u=q.innerHTML;function K(L){if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(F[0].url)&&!J()){return true}if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(L)}function J(){return w.hasiPadSupport&&w.hasiPadSupport()}function H(){if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",K,false)}else{if(q.attachEvent){q.attachEvent("onclick",K)}}}else{if(q.addEventListener&&!J()){q.addEventListener("click",f,false)}w.load()}}setTimeout(H,0)}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}q=z;B()}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(q){m(o,q)};this.size=function(){return o.length};var p=this;for(name in b.prototype){p[name]=function(){var q=arguments;p.each(function(){this[name].apply(this,q)})}}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!flashembed.isSupported([6, 65])){return null;}if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:k(o),k(t),k(q))}}else{if(o){return new b(o,k(t),k(q))}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d*)%/,"$1pct");l=l.replace(/(%)/g,"%25").replace(/'/g,"\\u0027").replace(/"/g,"\\u0022").replace(/&/g,"%26");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='<object width="'+o.width+'" height="'+o.height+'" id="'+o.id+'" name="'+o.id+'"';if(o.cachebusting){o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(o.w3c||!h){n+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(o.w3c||h){n+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+='<param name="'+m+'" value="'+o[m]+'" />'}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='<param name="flashvars" value=\''+p+"' />"}n+="</object>";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+n.version+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>");if(f.tagName=="A"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.8"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();
\ No newline at end of file
diff --git a/lib/flowplayer/flowplayer-3.2.9.swf b/lib/flowplayer/flowplayer-3.2.9.swf
new file mode 100644 (file)
index 0000000..9bdb3f9
Binary files /dev/null and b/lib/flowplayer/flowplayer-3.2.9.swf differ
diff --git a/lib/flowplayer/flowplayer.audio-3.2.2.swf b/lib/flowplayer/flowplayer.audio-3.2.2.swf
deleted file mode 100644 (file)
index 16aef5c..0000000
Binary files a/lib/flowplayer/flowplayer.audio-3.2.2.swf and /dev/null differ
diff --git a/lib/flowplayer/flowplayer.audio-3.2.8.swf b/lib/flowplayer/flowplayer.audio-3.2.8.swf
new file mode 100644 (file)
index 0000000..df9692a
Binary files /dev/null and b/lib/flowplayer/flowplayer.audio-3.2.8.swf differ
diff --git a/lib/flowplayer/flowplayer.controls-3.2.5.swf b/lib/flowplayer/flowplayer.controls-3.2.5.swf
deleted file mode 100644 (file)
index 5507a53..0000000
Binary files a/lib/flowplayer/flowplayer.controls-3.2.5.swf and /dev/null differ
diff --git a/lib/flowplayer/flowplayer.controls-3.2.9.swf b/lib/flowplayer/flowplayer.controls-3.2.9.swf
new file mode 100644 (file)
index 0000000..a3d34c7
Binary files /dev/null and b/lib/flowplayer/flowplayer.controls-3.2.9.swf differ
index d607cb7..d51ac0d 100644 (file)
@@ -6,6 +6,6 @@ Our changes:
 * no splashscreens
 
 TODO:
-* switch to git repo once flowplayer decides to use real vesion control system
+* switch to git repo once flowplayer decides to use better version control system
 
 skodak
\ No newline at end of file
index 828d938..310c492 100644 (file)
@@ -210,7 +210,7 @@ class MoodleQuickForm_selectgroups extends HTML_QuickForm_element {
     function loadArrayOptGroups($arr, $values=null)
     {
         if (!is_array($arr)) {
-            return PEAR::raiseError('Argument 1 of HTML_Select::loadArrayOptGroups is not a valid array');
+            return self::raiseError('Argument 1 of HTML_Select::loadArrayOptGroups is not a valid array');
         }
         if (isset($values)) {
             $this->setSelected($values);
@@ -255,7 +255,7 @@ class MoodleQuickForm_selectgroups extends HTML_QuickForm_element {
     function loadArrayOptions($optgroup, $arr, $values=null)
     {
         if (!is_array($arr)) {
-            return PEAR::raiseError('Argument 1 of HTML_Select::loadArray is not a valid array');
+            return self::raiseError('Argument 1 of HTML_Select::loadArray is not a valid array');
         }
         if (isset($values)) {
             $this->setSelected($values);
index 607fdc9..f66b1d7 100644 (file)
@@ -61,7 +61,7 @@ function pear_handle_error($error){
     print_object($error->backtrace);
 }
 
-if (!empty($CFG->debug) and $CFG->debug >= DEBUG_ALL){
+if (!empty($CFG->debug) and ($CFG->debug >= DEBUG_ALL or $CFG->debug == -1)){
     //TODO: this is a wrong place to init PEAR!
     $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_CALLBACK;
     $GLOBALS['_PEAR_default_error_options'] = 'pear_handle_error';
@@ -2117,7 +2117,7 @@ function validate_' . $this->_formName . '(frm) {
         }
 
         if (!empty($elementList)) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Nonexistant element(s): '" . implode("', '", array_keys($elementList)) . "' in HTML_QuickForm::freeze()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Nonexistant element(s): '" . implode("', '", array_keys($elementList)) . "' in HTML_QuickForm::freeze()", 'HTML_QuickForm_Error', true);
         }
         return true;
     }
index 06dfcd9..ef1ec74 100644 (file)
@@ -1650,9 +1650,9 @@ M.util.load_flowplayer = function() {
             for(var i=0; i<M.util.video_players.length; i++) {
                 var video = M.util.video_players[i];
                 if (video.width > 0 && video.height > 0) {
-                    var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf', width: video.width, height: video.height};
+                    var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.9.swf', width: video.width, height: video.height};
                 } else {
-                    var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf';
+                    var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.9.swf';
                 }
                 flowplayer(video.id, src, {
                     plugins: {controls: controls},
@@ -1739,17 +1739,17 @@ M.util.load_flowplayer = function() {
                     controls.height = 25;
                     controls.time = true;
                 }
-                flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.7.swf', {
-                    plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.2.swf'}},
+                flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.9.swf', {
+                    plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.8.swf'}},
                     clip: {url: audio.fileurl, provider: "audio", autoPlay: false}
                 });
             }
         }
 
         if (M.cfg.jsrev == -10) {
-            var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.6.js';
+            var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.8.min.js';
         } else {
-            var jsurl = M.cfg.wwwroot + '/lib/javascript.php?file=/lib/flowplayer/flowplayer-3.2.6.js&rev=' + M.cfg.jsrev;
+            var jsurl = M.cfg.wwwroot + '/lib/javascript.php?file=/lib/flowplayer/flowplayer-3.2.8.min.js&rev=' + M.cfg.jsrev;
         }
         var fileref = document.createElement('script');
         fileref.setAttribute('type','text/javascript');
index 6e311be..5a9c5b6 100644 (file)
@@ -2511,7 +2511,10 @@ EOD;
             if ($item->hidden) {
                 $link->add_class('dimmed');
             }
-            $link->text = $content.$link->text; // add help icon
+            if (!empty($content)) {
+                // Providing there is content we will use that for the link content.
+                $link->text = $content;
+            }
             $content = $this->render($link);
         } else if ($item->action instanceof moodle_url) {
             $attributes = array();
@@ -2896,4 +2899,4 @@ class core_renderer_ajax extends core_renderer {
      * @param string $id
      */
     public function heading($text, $level = 2, $classes = 'main', $id = null) {}
-}
\ No newline at end of file
+}
index 169d16f..3b72e6e 100644 (file)
@@ -67,7 +67,7 @@ define('K_PATH_URL', $CFG->wwwroot . '/lib/tcpdf/');
 define('K_PATH_FONTS', K_PATH_MAIN . 'fonts/');
 
 /** cache directory for temporary files (full path) */
-define('K_PATH_CACHE', $CFG->cachedir . '/');
+define('K_PATH_CACHE', $CFG->cachedir . '/tcpdf/');
 
 /** images directory */
 define('K_PATH_IMAGES', $CFG->dirroot . '/');
@@ -99,6 +99,7 @@ class pdf extends TCPDF {
      * See the parent class documentation for the parameters info.
      */
     public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8') {
+        make_cache_directory('tcpdf');
 
         parent::__construct($orientation, $unit, $format, $unicode, $encoding);
 
index 2c687dd..2c51010 100644 (file)
@@ -89,6 +89,17 @@ class HTML_Common {
         $this->setTabOffset($tabOffset);
     } // end constructor
 
+    public static function raiseError($message = null,
+                                       $code = null,
+                                       $mode = null,
+                                       $options = null,
+                                       $userinfo = null,
+                                       $error_class = null,
+                                       $skipmsg = false) {
+        $pear = new PEAR();
+        return $pear->raiseError($message, $code, $mode, $options, $userinfo, $error_class, $skipmsg);
+    }
+
     /**
      * Returns the current API version
      * @access   public
index ccca6fb..af116b2 100644 (file)
@@ -398,7 +398,7 @@ class HTML_QuickForm extends HTML_Common {
                 $this->setConstants($datasource->constantValues($this), $constantsFilter);
             }
         } else {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_DATASOURCE, null, E_USER_WARNING, "Datasource is not an object in QuickForm::setDatasource()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_INVALID_DATASOURCE, null, E_USER_WARNING, "Datasource is not an object in QuickForm::setDatasource()", 'HTML_QuickForm_Error', true);
         }
     } // end func setDatasource
 
@@ -421,13 +421,13 @@ class HTML_QuickForm extends HTML_Common {
                 if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
                     foreach ($filter as $val) {
                         if (!is_callable($val)) {
-                            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
+                            return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                         } else {
                             $defaultValues = $this->_recursiveFilter($val, $defaultValues);
                         }
                     }
                 } elseif (!is_callable($filter)) {
-                    return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
+                    return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setDefaults()", 'HTML_QuickForm_Error', true);
                 } else {
                     $defaultValues = $this->_recursiveFilter($filter, $defaultValues);
                 }
@@ -460,13 +460,13 @@ class HTML_QuickForm extends HTML_Common {
                 if (is_array($filter) && (2 != count($filter) || !is_callable($filter))) {
                     foreach ($filter as $val) {
                         if (!is_callable($val)) {
-                            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
+                            return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
                         } else {
                             $constantValues = $this->_recursiveFilter($val, $constantValues);
                         }
                     }
                 } elseif (!is_callable($filter)) {
-                    return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
+                    return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::setConstants()", 'HTML_QuickForm_Error', true);
                 } else {
                     $constantValues = $this->_recursiveFilter($filter, $constantValues);
                 }
@@ -557,7 +557,7 @@ class HTML_QuickForm extends HTML_Common {
     {
         $type = strtolower($type);
         if (!HTML_QuickForm::isTypeRegistered($type)) {
-            $error = PEAR::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING, "Element '$type' does not exist in HTML_QuickForm::_loadElement()", 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING, "Element '$type' does not exist in HTML_QuickForm::_loadElement()", 'HTML_QuickForm_Error', true);
             return $error;
         }
         $className = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][1];
@@ -614,7 +614,7 @@ class HTML_QuickForm extends HTML_Common {
                 $elKeys = array_keys($this->_elements);
                 $this->_duplicateIndex[$elementName][] = end($elKeys);
             } else {
-                $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::addElement()", 'HTML_QuickForm_Error', true);
+                $error = self::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::addElement()", 'HTML_QuickForm_Error', true);
                 return $error;
             }
         } else {
@@ -650,10 +650,10 @@ class HTML_QuickForm extends HTML_Common {
     function &insertElementBefore(&$element, $nameAfter)
     {
         if (!empty($this->_duplicateIndex[$nameAfter])) {
-            $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, 'Several elements named "' . $nameAfter . '" exist in HTML_QuickForm::insertElementBefore().', 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, 'Several elements named "' . $nameAfter . '" exist in HTML_QuickForm::insertElementBefore().', 'HTML_QuickForm_Error', true);
             return $error;
         } elseif (!$this->elementExists($nameAfter)) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$nameAfter' does not exist in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$nameAfter' does not exist in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
             return $error;
         }
         $elementName = $element->getName();
@@ -662,7 +662,7 @@ class HTML_QuickForm extends HTML_Common {
         // Like in addElement(), check that it's not an incompatible duplicate
         if (!empty($elementName) && isset($this->_elementIndex[$elementName])) {
             if ($this->_elements[$this->_elementIndex[$elementName]]->getType() != $element->getType()) {
-                $error = PEAR::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
+                $error = self::raiseError(null, QUICKFORM_INVALID_ELEMENT_NAME, null, E_USER_WARNING, "Element '$elementName' already exists in HTML_QuickForm::insertElementBefore()", 'HTML_QuickForm_Error', true);
                 return $error;
             }
             $duplicate = true;
@@ -745,7 +745,7 @@ class HTML_QuickForm extends HTML_Common {
         if (isset($this->_elementIndex[$element])) {
             return $this->_elements[$this->_elementIndex[$element]];
         } else {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElement()", 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElement()", 'HTML_QuickForm_Error', true);
             return $error;
         }
     } // end func getElement
@@ -768,7 +768,7 @@ class HTML_QuickForm extends HTML_Common {
     function &getElementValue($element)
     {
         if (!isset($this->_elementIndex[$element])) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
             return $error;
         }
         $value = $this->_elements[$this->_elementIndex[$element]]->getValue();
@@ -983,7 +983,7 @@ class HTML_QuickForm extends HTML_Common {
     function &removeElement($elementName, $removeRules = true)
     {
         if (!isset($this->_elementIndex[$elementName])) {
-            $error = PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$elementName' does not exist in HTML_QuickForm::removeElement()", 'HTML_QuickForm_Error', true);
+            $error = self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$elementName' does not exist in HTML_QuickForm::removeElement()", 'HTML_QuickForm_Error', true);
             return $error;
         }
         $el =& $this->_elements[$this->_elementIndex[$elementName]];
@@ -1024,17 +1024,17 @@ class HTML_QuickForm extends HTML_Common {
     {
         if (!$force) {
             if (!is_array($element) && !$this->elementExists($element)) {
-                return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+                return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
             } elseif (is_array($element)) {
                 foreach ($element as $el) {
                     if (!$this->elementExists($el)) {
-                        return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$el' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+                        return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$el' does not exist in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
                     }
                 }
             }
         }
         if (false === ($newName = $this->isRuleRegistered($type, true))) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addRule()", 'HTML_QuickForm_Error', true);
         } elseif (is_string($newName)) {
             $type = $newName;
         }
@@ -1089,7 +1089,7 @@ class HTML_QuickForm extends HTML_Common {
     function addGroupRule($group, $arg1, $type='', $format=null, $howmany=0, $validation = 'server', $reset = false)
     {
         if (!$this->elementExists($group)) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Group '$group' does not exist in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Group '$group' does not exist in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
         }
 
         $groupObj =& $this->getElement($group);
@@ -1103,7 +1103,7 @@ class HTML_QuickForm extends HTML_Common {
                     $reset = isset($rule[4]) && $rule[4];
                     $type = $rule[1];
                     if (false === ($newName = $this->isRuleRegistered($type, true))) {
-                        return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
+                        return self::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
                     } elseif (is_string($newName)) {
                         $type = $newName;
                     }
@@ -1131,7 +1131,7 @@ class HTML_QuickForm extends HTML_Common {
             }
         } elseif (is_string($arg1)) {
             if (false === ($newName = $this->isRuleRegistered($type, true))) {
-                return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
+                return self::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, "Rule '$type' is not registered in HTML_QuickForm::addGroupRule()", 'HTML_QuickForm_Error', true);
             } elseif (is_string($newName)) {
                 $type = $newName;
             }
@@ -1179,7 +1179,7 @@ class HTML_QuickForm extends HTML_Common {
     function addFormRule($rule)
     {
         if (!is_callable($rule)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, 'Callback function does not exist in HTML_QuickForm::addFormRule()', 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_INVALID_RULE, null, E_USER_WARNING, 'Callback function does not exist in HTML_QuickForm::addFormRule()', 'HTML_QuickForm_Error', true);
         }
         $this->_formRules[] = $rule;
     }
@@ -1198,7 +1198,7 @@ class HTML_QuickForm extends HTML_Common {
     function applyFilter($element, $filter)
     {
         if (!is_callable($filter)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::applyFilter()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::applyFilter()", 'HTML_QuickForm_Error', true);
         }
         if ($element == '__ALL__') {
             $this->_submitValues = $this->_recursiveFilter($filter, $this->_submitValues);
@@ -1528,7 +1528,7 @@ class HTML_QuickForm extends HTML_Common {
                 if (is_array($res)) {
                     $this->_errors += $res;
                 } else {
-                    return PEAR::raiseError(null, QUICKFORM_ERROR, null, E_USER_WARNING, 'Form rule callback returned invalid value in HTML_QuickForm::validate()', 'HTML_QuickForm_Error', true);
+                    return self::raiseError(null, QUICKFORM_ERROR, null, E_USER_WARNING, 'Form rule callback returned invalid value in HTML_QuickForm::validate()', 'HTML_QuickForm_Error', true);
                 }
             }
         }
@@ -1568,7 +1568,7 @@ class HTML_QuickForm extends HTML_Common {
         }
 
         if (!empty($elementList)) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Nonexistant element(s): '" . implode("', '", array_keys($elementList)) . "' in HTML_QuickForm::freeze()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Nonexistant element(s): '" . implode("', '", array_keys($elementList)) . "' in HTML_QuickForm::freeze()", 'HTML_QuickForm_Error', true);
         }
         return true;
     } // end func freeze
@@ -1603,7 +1603,7 @@ class HTML_QuickForm extends HTML_Common {
     function process($callback, $mergeFiles = true)
     {
         if (!is_callable($callback)) {
-            return PEAR::raiseError(null, QUICKFORM_INVALID_PROCESS, null, E_USER_WARNING, "Callback function does not exist in QuickForm::process()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_INVALID_PROCESS, null, E_USER_WARNING, "Callback function does not exist in QuickForm::process()", 'HTML_QuickForm_Error', true);
         }
         $values = ($mergeFiles === true) ? HTML_QuickForm::arrayMerge($this->_submitValues, $this->_submitFiles) : $this->_submitValues;
         return call_user_func($callback, $values);
@@ -1826,7 +1826,7 @@ class HTML_QuickForm extends HTML_Common {
     function exportValue($element)
     {
         if (!isset($this->_elementIndex[$element])) {
-            return PEAR::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
+            return self::raiseError(null, QUICKFORM_NONEXIST_ELEMENT, null, E_USER_WARNING, "Element '$element' does not exist in HTML_QuickForm::getElementValue()", 'HTML_QuickForm_Error', true);
         }
         $value = $this->_elements[$this->_elementIndex[$element]]->exportValue($this->_submitValues, false);
         if (isset($this->_duplicateIndex[$element])) {
@@ -1912,7 +1912,7 @@ class HTML_QuickForm extends HTML_Common {
      * @param mixed     result code
      * @return bool     whether $value is an error
      */
-    function isError($value)
+    static function isError($value)
     {
         return (is_object($value) && is_a($value, 'html_quickform_error'));
     } // end func isError
@@ -1927,7 +1927,7 @@ class HTML_QuickForm extends HTML_Common {
      * @param   int     error code
      * @return  string  error message
      */
-    function errorMessage($value)
+    static function errorMessage($value)
     {
         // make the variable static so that it only has to do the defining on the first call
         static $errorMessages;
index 7d9000c..a8906f5 100644 (file)
@@ -165,7 +165,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
         switch ($event) {
             case 'updateValue':
                 if ($caller->getAttribute('method') == 'get') {
-                    return PEAR::raiseError('Cannot add a file upload field to a GET method form');
+                    return self::raiseError('Cannot add a file upload field to a GET method form');
                 }
                 $this->_value = $this->_findValue();
                 $caller->updateAttributes(array('enctype' => 'multipart/form-data'));
index 8a8fd81..f15ad8b 100644 (file)
@@ -326,7 +326,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element {
     function loadArray($arr, $values=null)
     {
         if (!is_array($arr)) {
-            return PEAR::raiseError('Argument 1 of HTML_Select::loadArray is not a valid array');
+            return self::raiseError('Argument 1 of HTML_Select::loadArray is not a valid array');
         }
         if (isset($values)) {
             $this->setSelected($values);
@@ -358,7 +358,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element {
     function loadDbResult(&$result, $textCol=null, $valueCol=null, $values=null)
     {
         if (!is_object($result) || !is_a($result, 'db_result')) {
-            return PEAR::raiseError('Argument 1 of HTML_Select::loadDbResult is not a valid DB_result');
+            return self::raiseError('Argument 1 of HTML_Select::loadDbResult is not a valid DB_result');
         }
         if (isset($values)) {
             $this->setValue($values);
@@ -401,7 +401,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element {
         } elseif (is_subclass_of($conn, "db_common")) {
             $dbConn = &$conn;
         } else {
-            return PEAR::raiseError('Argument 1 of HTML_Select::loadQuery is not a valid type');
+            return self::raiseError('Argument 1 of HTML_Select::loadQuery is not a valid type');
         }
         $result = $dbConn->query($sql);
         if (DB::isError($result)) {
index b0c809d..18766fe 100644 (file)
@@ -39,6 +39,8 @@ class phpunit_data_generator {
     protected $categorycount = 0;
     protected $coursecount = 0;
     protected $scalecount = 0;
+    protected $groupcount = 0;
+    protected $groupingcount = 0;
 
     /** @var array list of plugin generators */
     protected $generators = array();
@@ -403,6 +405,92 @@ EOD;
         return $generator->create_instance($record, $options);
     }
 
+    /**
+     * Create a test group for the specified course
+     *
+     * $record should be either an array or a stdClass containing infomation about the group to create.
+     * At the very least it needs to contain courseid.
+     * Default values are added for name, description, and descriptionformat if they are not present.
+     *
+     * This function calls {@see groups_create_group()} to create the group within the database.
+     *
+     * @param array|stdClass $record
+     * @return stdClass group record
+     */
+    public function create_group($record) {
+        global $DB, $CFG;
+
+        require_once($CFG->dirroot . '/group/lib.php');
+
+        $this->groupcount++;
+        $i = $this->groupcount;
+
+        $record = (array)$record;
+
+        if (empty($record['courseid'])) {
+            throw new coding_exception('courseid must be present in phpunit_util::create_group() $record');
+        }
+
+        if (!isset($record['name'])) {
+            $record['name'] = 'group-' . $i;
+        }
+
+        if (!isset($record['description'])) {
+            $record['description'] = "Test Group $i\n{$this->loremipsum}";
+        }
+
+        if (!isset($record['descriptionformat'])) {
+            $record['descriptionformat'] = FORMAT_MOODLE;
+        }
+
+        $id = groups_create_group((object)$record);
+
+        return $DB->get_record('groups', array('id'=>$id));
+    }
+
+    /**
+     * Create a test grouping for the specified course
+     *
+     * $record should be either an array or a stdClass containing infomation about the grouping to create.
+     * At the very least it needs to contain courseid.
+     * Default values are added for name, description, and descriptionformat if they are not present.
+     *
+     * This function calls {@see groups_create_grouping()} to create the grouping within the database.
+     *
+     * @param array|stdClass $record
+     * @return stdClass grouping record
+     */
+    public function create_grouping($record) {
+        global $DB, $CFG;
+
+        require_once($CFG->dirroot . '/group/lib.php');
+
+        $this->groupingcount++;
+        $i = $this->groupingcount;
+
+        $record = (array)$record;
+
+        if (empty($record['courseid'])) {
+            throw new coding_exception('courseid must be present in phpunit_util::create_grouping() $record');
+        }
+
+        if (!isset($record['name'])) {
+            $record['name'] = 'grouping-' . $i;
+        }
+
+        if (!isset($record['description'])) {
+            $record['description'] = "Test Grouping $i\n{$this->loremipsum}";
+        }
+
+        if (!isset($record['descriptionformat'])) {
+            $record['descriptionformat'] = FORMAT_MOODLE;
+        }
+
+        $id = groups_create_grouping((object)$record);
+
+        return $DB->get_record('groupings', array('id'=>$id));
+    }
+
     /**
      * Create a test scale
      * @param array|stdClass $record
@@ -641,4 +729,4 @@ abstract class phpunit_block_generator {
      * @return stdClass activity record
      */
     abstract public function create_instance($record = null, array $options = null);
-}
\ No newline at end of file
+}
index 190c0b9..150d42c 100644 (file)
@@ -516,7 +516,7 @@ class plugin_manager {
             ),
 
             'workshopallocation' => array(
-                'manual', 'random'
+                'manual', 'random', 'scheduled'
             ),
 
             'workshopeval' => array(
index 8988c61..7e3047c 100644 (file)
@@ -280,7 +280,7 @@ function resourcelib_embed_flashvideo($fullurl, $title, $clicktoopen) {
     }
     $output = '<div class="resourcecontent resourceflv">';
     $output .= html_writer::tag('span', $clicktoopen, array('id'=>$id, 'class'=>'resourcemediaplugin resourcemediaplugin_flv', 'title'=>$title));
-    $output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, rawurlencode($fullurl), $width, $height, $autosize)));
+    $output .= html_writer::script(js_writer::function_call('M.util.add_video_player', array($id, addslashes_js($fullurl), $width, $height, $autosize)));
     $output .= '</div>';
 
     return $output;
index 3448ae7..e04b307 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 //============================================================+
 // File name   : 2dbarcodes.php
-// Version     : 1.0.012
+// Version     : 1.0.013
 // Begin       : 2009-04-07
-// Last Update : 2011-09-15
-// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// Last Update : 2012-01-12
+// Author      : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
 // License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
 // -------------------------------------------------------------------
-// Copyright (C) 2009-2011  Nicola Asuni - Tecnick.com S.r.l.
+// Copyright (C) 2009-2012  Nicola Asuni - Tecnick.com LTD
 //
 // This file is part of TCPDF software library.
 //
  * PHP class to creates array representations for 2D barcodes to be used with TCPDF.
  * @package com.tecnick.tcpdf
  * @author Nicola Asuni
- * @version 1.0.012
+ * @version 1.0.013
  */
 
 /**
  * @class TCPDF2DBarcode
  * PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
  * @package com.tecnick.tcpdf
- * @version 1.0.012
+ * @version 1.0.013
  * @author Nicola Asuni
  */
 class TCPDF2DBarcode {
@@ -142,8 +142,7 @@ class TCPDF2DBarcode {
         * @public
         */
        public function getBarcodeHTML($w=10, $h=10, $color='black') {
-               // replace table for special characters
-               $html = '<div style="font-size:0;position:relative;">'."\n";
+               $html = '<div style="font-size:0;position:relative;width:'.($w * $this->barcode_array['num_cols']).'px;height:'.($h * $this->barcode_array['num_rows']).'px;">'."\n";
                // print barcode elements
                $y = 0;
                // for each row
index f4942ff..23a14f9 100644 (file)
@@ -1,3 +1,98 @@
+5.9.156 (2012-04-10)
+       - Bug item #3515885 "TOC and booklet: left and right page exchanged".
+       - SetAutoPageBreak(false) now works also in multicolumn mode.
+
+5.9.155 (2012-04-02)
+       - Bug item #3512596 "font import problems" was fixed.
+       - Method addTTFfont() was modified to extract only specified Platform ID and Encoding ID (check the source code documentation).
+       - All fonts were updated.
+       - Bug item #3513867 "booklet and setHeaderTemplateAutoreset: header shifted left" was fixed.
+       - Bug item #3513749 "TCPDF Superscript/Subscript" was fixed.
+
+5.9.154 (2012-03-29)
+       - A debug echo was removed.
+
+5.9.153 (2012-03-28)
+       - A bug on font conversion was fixed.
+       - All fonts were updated.
+       - Method isCharDefined() was added to find if a character is defined on the selected font.
+       - Method replaceMissingChars() was added to automatically replace missing chars on selected font.
+       - SetFont() method was fixed.
+
+5.9.152 (2012-03-23)
+       - The following overprint methods were added: setOverprint(), getOverprint().
+       - Signature of setAlpha() method was changed and method getAlpha() was added.
+       - stroke-opacity support was added on SVG.
+       - The following date methods were added: setDocCreationTimestamp(), setDocModificationTimestamp(), getDocCreationTimestamp(), getDocModificationTimestamp(), getFormattedDate(), getTimestamp().
+       - Signature of _datestring() method was changed.
+       - Method getFontBBox() was added.
+       - Method setPageBoxTypes() was aded.
+
+5.9.151 (2012-03-22)
+       - Bug item #3509889 "Transform() distorts PDF" was fixed.
+       - Precision of real number were extended.
+       - ComboBox and ListBox methods were fixed.
+       - Bulgarian language file was added.
+       - addTOC() method was improved to include bookmark color and font style.
+
+5.9.150 (2012-03-16)
+       - A bug related to form fields in PDF/A mode was fixed.
+
+5.9.149 (2012-02-21)
+       - Bug item #3489933 "SVG Parser treats tspan like text" was fixed.
+
+5.9.148 (2012-02-17)
+       - Bug item #3488600 "Multiple radiobutton sets get first set value" was fixed.
+
+5.9.147 (2012-02-14)
+       - A problem with SVG gradients has been fixed.
+
+5.9.146 (2012-02-12)
+       - Bug item #3486880 "$filehash undefine error" was fixed.
+       - The default font is now the one specified at PDF_FONT_NAME_MAIN constant.
+
+5.9.145 (2012-01-28)
+       - Japanese language file was added.
+       - TCPDF license and README.TXT files were updated.
+
+5.9.144 (2012-01-12)
+       - HTML output on barcode classes was improved.
+
+5.9.143 (2012-01-08)
+       - Bug item #3471057 "setCreator() has no effect" was fixed.
+
+5.9.142 (2011-12-23)
+       - Source code documentation was updated.
+
+5.9.141 (2011-12-14)
+       - Some minor bugs were fixed.
+
+5.9.140 (2011-12-13)
+       - SVG now supports embedded images encoded as base64.
+
+5.9.139 (2011-12-11)
+       - Spot color methods were fixed.
+
+5.9.138 (2011-12-10)
+       - cropMark() method was improved (check source code documentation).
+       - Example n. 56 was updated.
+       - Bug item #3452390 "Check Box still not ticked when set to true" was fixed.
+
+5.9.137 (2011-12-01)
+       - Bug item #3447005 "Background color and border of Form Elements is printed" was fixed.
+       - Color support for Form elements was improved.
+
+5.9.136 (2011-11-27)
+       - Bug item #3443387 "SetMargins with keep option does not work for top margin" was fixed.
+
+5.9.135 (2011-11-04)
+       - Bug item #3433406 "Double keywords in description" was fixed.
+
+5.9.134 (2011-10-29)
+       - The default value for $defcol parameter on convertHTMLColorToDec() method was fixed.
+       - Deafult HTTP headers were changed to avoid browser caching.
+       - Some deprecated syntax were replaced.
+
 5.9.133 (2011-10-26)
        - Bug item #3428446 "copyPage method not working when diskcache enabled" was fixed.
 
index 26adda0..daf21f7 100644 (file)
@@ -5,9 +5,7 @@
   TCPDF is free software: you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation, either version 3 of the
-  License, or (at your option) any later version. Additionally, 
-  YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE 
-  GENERATED PDF DOCUMENTS.
+  License, or (at your option) any later version.
 
 **********************************************************************
 **********************************************************************
index 7a3ab8b..83520bb 100644 (file)
@@ -8,16 +8,16 @@ http://sourceforge.net/donate/index.php?group_id=128076
 ------------------------------------------------------------
 
 Name: TCPDF
-Version: 5.9.133
-Release date: 2011-10-26
+Version: 5.9.156
+Release date: 2012-04-10
 Author:        Nicola Asuni
 
-Copyright (c) 2002-2011:
+Copyright (c) 2002-2012:
        Nicola Asuni
-       Tecnick.com s.r.l.
-       Via Della Pace, 11
-       09044 Quartucciu (CA)
-       ITALY
+       Tecnick.com LTD
+       Manor Coach House, Church Hill
+       Aldershot, Hants, GU12 4RQ
+       UK
        www.tecnick.com
 
 URLs:
@@ -64,18 +64,16 @@ Installation (full instructions on http:  www.tcpdf.org):
 Source Code Documentation:
        http://www.tcpdf.org
 
-For Additional Documentation:
+Additional Documentation:
        http://www.tcpdf.org
 
 License
-       Copyright (C) 2002-2011  Nicola Asuni - Tecnick.com S.r.l.
+       Copyright (C) 2002-2012  Nicola Asuni - Tecnick.com LTD
 
        TCPDF is free software: you can redistribute it and/or modify it
        under the terms of the GNU Lesser General Public License as
        published by the Free Software Foundation, either version 3 of the
-       License, or (at your option) any later version. Additionally,
-       YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE
-       GENERATED PDF DOCUMENTS.
+       License, or (at your option) any later version.
 
        TCPDF is distributed in the hope that it will be useful, but
        WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -88,4 +86,12 @@ License
 
        See LICENSE.TXT file for more information.
 
+Third party fonts
+       This library includes third party font files released with different licenses.
+       These fonts are not required by TCPDF but have been included as you convenience.
+       The original TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
+       To get the original distribution archives please check the information on fonts subfolders:
+        - DejaVu fonts 2.33 (Bitstream) - Copyright, License and other info: fonts/dejavu-fonts-ttf-2.33
+        - GNU FreeFont (GNU-GPLv3) - Copyright, License and other info: fonts/freefont-20100919
+
 ============================================================
index e444ca0..4027aa7 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 //============================================================+
 // File name   : barcodes.php
-// Version     : 1.0.021
+// Version     : 1.0.023
 // Begin       : 2008-06-09
-// Last Update : 2011-09-15
-// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// Last Update : 2012-01-14
+// Author      : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
 // License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
 // -------------------------------------------------------------------
-// Copyright (C) 2008-2011  Nicola Asuni - Tecnick.com S.r.l.
+// Copyright (C) 2008-2012  Nicola Asuni - Tecnick.com LTD
 //
 // This file is part of TCPDF software library.
 //
  * PHP class to creates array representations for common 1D barcodes to be used with TCPDF.
  * @package com.tecnick.tcpdf
  * @author Nicola Asuni
- * @version 1.0.021
+ * @version 1.0.023
  */
 
 /**
  * @class TCPDFBarcode
  * PHP class to creates array representations for common 1D barcodes to be used with TCPDF (http://www.tcpdf.org).<br>
  * @package com.tecnick.tcpdf
- * @version 1.0.021
+ * @version 1.0.023
  * @author Nicola Asuni
  */
 class TCPDFBarcode {
@@ -145,8 +145,7 @@ class TCPDFBarcode {
         * @public
         */
        public function getBarcodeHTML($w=2, $h=30, $color='black') {
-               // replace table for special characters
-               $html = '<div style="font-size:0;position:relative;">'."\n";
+               $html = '<div style="font-size:0;position:relative;width:'.($this->barcode_array['maxw'] * $w).'px;height:'.($h).'px;">'."\n";
                // print bars
                $x = 0;
                foreach ($this->barcode_array['bcode'] as $k => $v) {
index 811145f..e3b3e4a 100644 (file)
@@ -5,17 +5,27 @@
 // Last Update : 2011-04-15
 //
 // Description : Configuration file for TCPDF.
+// Author      : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
+// License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
+// -------------------------------------------------------------------
+// Copyright (C) 2004-2012  Nicola Asuni - Tecnick.com LTD
 //
-// Author: Nicola Asuni
+// This file is part of TCPDF software library.
 //
-// (c) Copyright:
-//               Nicola Asuni
-//               Tecnick.com s.r.l.
-//               Via Della Pace, 11
-//               09044 Quartucciu (CA)
-//               ITALY
-//               www.tecnick.com
-//               info@tecnick.com
+// TCPDF is free software: you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// TCPDF is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with TCPDF.  If not, see <http://www.gnu.org/licenses/>.
+//
+// See LICENSE.TXT file for more information.
 //============================================================+
 
 /**
index fc78bbb..ff92011 100644 (file)
@@ -4,10 +4,10 @@
 // Version     : 1.0.001
 // Begin       : 2010-06-07
 // Last Update : 2011-09-14
-// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// Author      : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
 // License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
 // -------------------------------------------------------------------
-// Copyright (C) 2010-2011  Nicola Asuni - Tecnick.com S.r.l.
+// Copyright (C) 2010-2012  Nicola Asuni - Tecnick.com LTD
 //
 // This file is part of TCPDF software library.
 //
@@ -941,7 +941,7 @@ class Datamatrix {
        /**
         * Places "chr+bit" with appropriate wrapping within array[].
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $row (int) Row number.
@@ -967,7 +967,7 @@ class Datamatrix {
        /**
         * Places the 8 bits of a utah-shaped symbol character.
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $row (int) Row number.
@@ -991,7 +991,7 @@ class Datamatrix {
        /**
         * Places the 8 bits of the first special corner case.
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $chr (int) Char byte.
@@ -1013,7 +1013,7 @@ class Datamatrix {
        /**
         * Places the 8 bits of the second special corner case.
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $chr (int) Char byte.
@@ -1035,7 +1035,7 @@ class Datamatrix {
        /**
         * Places the 8 bits of the third special corner case.
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $chr (int) Char byte.
@@ -1057,7 +1057,7 @@ class Datamatrix {
        /**
         * Places the 8 bits of the fourth special corner case.
         * (Annex F - ECC 200 symbol character placement)
-        * @param $marr array Array of symbols.
+        * @param $marr (array) Array of symbols.
         * @param $nrow (int) Number of rows.
         * @param $ncol (int) Number of columns.
         * @param $chr (int) Char byte.
index 11b824a..414f8b6 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 //============================================================+
 // File name   : encodings_maps.php
-// Version     : 1.0.000
+// Version     : 1.0.001
 // Begin       : 2011-10-01
-// Last Update : 2011-10-01
-// Author      : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
+// Last Update : 2011-11-15
+// Author      : Nicola Asuni - Tecnick.com LTD - Manor Coach House, Church Hill, Aldershot, Hants, GU12 4RQ, UK - www.tecnick.com - info@tecnick.com
 // License     : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
 // -------------------------------------------------------------------
-// Copyright (C) 2008-2011  Nicola Asuni - Tecnick.com S.r.l.
+// Copyright (C) 2008-2012  Nicola Asuni - Tecnick.com LTD
 //
 // This file is part of TCPDF software library.
 //
@@ -530,40 +530,6 @@ public $encmap = array(
 240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',
 248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'),
 
-// encoding map for: cp1254
-'cp1254' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',
-8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',
-16=>'.notdef',17=>'.notdef',18=>'.notdef',19=>'.notdef',20=>'.notdef',21=>'.notdef',22=>'.notdef',23=>'.notdef',
-24=>'.notdef',25=>'.notdef',26=>'.notdef',27=>'.notdef',28=>'.notdef',29=>'.notdef',30=>'.notdef',31=>'.notdef',
-32=>'space',33=>'exclam',34=>'quotedbl',35=>'numbersign',36=>'dollar',37=>'percent',38=>'ampersand',39=>'quotesingle',
-40=>'parenleft',41=>'parenright',42=>'asterisk',43=>'plus',44=>'comma',45=>'hyphen',46=>'period',47=>'slash',
-48=>'zero',49=>'one',50=>'two',51=>'three',52=>'four',53=>'five',54=>'six',55=>'seven',
-56=>'eight',57=>'nine',58=>'colon',59=>'semicolon',60=>'less',61=>'equal',62=>'greater',63=>'question',
-64=>'at',65=>'A',66=>'B',67=>'C',68=>'D',69=>'E',70=>'F',71=>'G',
-72=>'H',73=>'I',74=>'J',75=>'K',76=>'L',77=>'M',78=>'N',79=>'O',
-80=>'P',81=>'Q',82=>'R',83=>'S',84=>'T',85=>'U',86=>'V',87=>'W',
-88=>'X',89=>'Y',90=>'Z',91=>'bracketleft',92=>'backslash',93=>'bracketright',94=>'asciicircum',95=>'underscore',
-96=>'grave',97=>'a',98=>'b',99=>'c',100=>'d',101=>'e',102=>'f',103=>'g',
-104=>'h',105=>'i',106=>'j',107=>'k',108=>'l',109=>'m',110=>'n',111=>'o',
-112=>'p',113=>'q',114=>'r',115=>'s',116=>'t',117=>'u',118=>'v',119=>'w',
-120=>'x',121=>'y',122=>'z',123=>'braceleft',124=>'bar',125=>'braceright',126=>'asciitilde',127=>'.notdef',
-128=>'Euro',129=>'.notdef',130=>'quotesinglbase',131=>'florin',132=>'quotedblbase',133=>'ellipsis',134=>'dagger',135=>'daggerdbl',
-136=>'circumflex',137=>'perthousand',138=>'Scaron',139=>'guilsinglleft',140=>'OE',141=>'.notdef',142=>'.notdef',143=>'.notdef',
-144=>'.notdef',145=>'quoteleft',146=>'quoteright',147=>'quotedblleft',148=>'quotedblright',149=>'bullet',150=>'endash',151=>'emdash',
-152=>'tilde',153=>'trademark',154=>'scaron',155=>'guilsinglright',156=>'oe',157=>'.notdef',158=>'.notdef',159=>'Ydieresis',
-160=>'space',161=>'exclamdown',162=>'cent',163=>'sterling',164=>'currency',165=>'yen',166=>'brokenbar',167=>'section',
-168=>'dieresis',169=>'copyright',170=>'ordfeminine',171=>'guillemotleft',172=>'logicalnot',173=>'hyphen',174=>'registered',175=>'macron',
-176=>'degree',177=>'plusminus',178=>'twosuperior',179=>'threesuperior',180=>'acute',181=>'mu',182=>'paragraph',183=>'periodcentered',
-184=>'cedilla',185=>'onesuperior',186=>'ordmasculine',187=>'guillemotright',188=>'onequarter',189=>'onehalf',190=>'threequarters',191=>'questiondown',
-192=>'Agrave',193=>'Aacute',194=>'Acircumflex',195=>'Atilde',196=>'Adieresis',197=>'Aring',198=>'AE',199=>'Ccedilla',
-200=>'Egrave',201=>'Eacute',202=>'Ecircumflex',203=>'Edieresis',204=>'Igrave',205=>'Iacute',206=>'Icircumflex',207=>'Idieresis',
-208=>'Gbreve',209=>'Ntilde',210=>'Ograve',211=>'Oacute',212=>'Ocircumflex',213=>'Otilde',214=>'Odieresis',215=>'multiply',
-216=>'Oslash',217=>'Ugrave',218=>'Uacute',219=>'Ucircumflex',220=>'Udieresis',221=>'Idotaccent',222=>'Scedilla',223=>'germandbls',
-224=>'agrave',225=>'aacute',226=>'acircumflex',227=>'atilde',228=>'adieresis',229=>'aring',230=>'ae',231=>'ccedilla',
-232=>'egrave',233=>'eacute',234=>'ecircumflex',235=>'edieresis',236=>'igrave',237=>'iacute',238=>'icircumflex',239=>'idieresis',
-240=>'gbreve',241=>'ntilde',242=>'ograve',243=>'oacute',244=>'ocircumflex',245=>'otilde',246=>'odieresis',247=>'divide',
-248=>'oslash',249=>'ugrave',250=>'uacute',251=>'ucircumflex',252=>'udieresis',253=>'dotlessi',254=>'scedilla',255=>'ydieresis'),
-
 // encoding map for: iso-8859-1
 'iso-8859-1' => array(0=>'.notdef',1=>'.notdef',2=>'.notdef',3=>'.notdef',4=>'.notdef',5=>'.notdef',6=>'.notdef',7=>'.notdef',
 8=>'.notdef',9=>'.notdef',10=>'.notdef',11=>'.notdef',12=>'.notdef',13=>'.notdef',14=>'.notdef',15=>'.notdef',
index a6ec150..81fca68 100644 (file)
Binary files a/lib/tcpdf/fonts/freemono.ctg.z and b/lib/tcpdf/fonts/freemono.ctg.z differ
index fe446e7..0ec476d 100644 (file)
@@ -11,5 +11,5 @@ $enc='';
 $file='freemono.z';
 $ctg='freemono.ctg.z';
 $desc=array('Flags'=>33,'FontBBox'=>'[-793 -200 699 800]','ItalicAngle'=>0,'Ascent'=>800,'Descent'=>-200,'Leading'=>90,'CapHeight'=>563,'XHeight'=>417,'StemV'=>70,'StemH'=>30,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
-$cw=array(0=>0,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>0,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>0,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,257=>600,258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,267=>600,268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,277=>600,278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,287=>600,288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,297=>600,298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=>600,305=>600,306=>600,307=>600,308=>600,309=>600,310=>600,311=>600,312=>600,313=>600,314=>600,315=>600,316=>600,317=>600,318=>600,319=>600,320=>600,321=>600,322=>600,323=>600,324=>600,325=>600,326=>600,327=>600,328=>600,329=>600,330=>600,331=>600,332=>600,333=>600,334=>600,335=>600,336=>600,337=>600,338=>600,339=>600,340=>600,341=>600,342=>600,343=>600,344=>600,345=>600,346=>600,347=>600,348=>600,349=>600,350=>600,351=>600,352=>600,353=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,372=>600,373=>600,374=>600,375=>600,376=>600,377=>600,378=>600,379=>600,380=>600,381=>600,382=>600,383=>600,384=>600,385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,402=>600,403=>600,404=>600,405=>600,406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,544=>600,548=>600,549=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,597=>600,598=>600,599=>600,600=>600,601=>600,602=>600,603=>600,604=>600,605=>600,606=>600,607=>600,608=>600,609=>600,610=>600,611=>600,612=>600,613=>600,614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,620=>600,621=>600,622=>600,623=>600,624=>600,625=>600,626=>600,627=>600,628=>600,629=>600,630=>600,631=>600,632=>600,633=>600,634=>600,635=>600,636=>600,637=>600,638=>600,639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,646=>600,647=>600,648=>600,649=>600,650=>600,651=>600,652=>600,653=>600,654=>600,655=>600,656=>600,657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,663=>600,664=>600,665=>600,666=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,673=>600,674=>600,675=>600,676=>600,677=>600,678=>600,679=>600,680=>600,681=>600,682=>600,683=>600,684=>600,685=>600,686=>600,687=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,695=>600,696=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,705=>600,706=>600,707=>600,708=>600,709=>600,710=>600,711=>600,712=>600,713=>600,714=>600,715=>600,716=>600,717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,727=>600,728=>600,729=>600,730=>600,731=>600,732=>600,733=>600,734=>600,735=>600,736=>600,737=>600,738=>600,739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,748=>600,749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,758=>600,759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,843=>0,844=>0,845=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,1120=>600,1121=>600,1122=>600,1123=>600,1124=>600,1126=>600,1127=>600,1128=>600,1130=>600,1131=>600,1132=>600,1133=>600,1136=>600,1137=>600,1138=>600,1140=>600,1141=>600,1142=>600,1143=>600,1148=>600,1149=>600,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1162=>600,1163=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,1272=>600,1273=>600,1296=>600,1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,1310=>600,1311=>600,1329=>600,1330=>600,1331=>600,1332=>600,1333=>600,1334=>600,1335=>600,1336=>600,1337=>600,1338=>600,1339=>600,1340=>600,1341=>600,1342=>600,1343=>600,1344=>600,1345=>600,1346=>600,1347=>600,1348=>600,1349=>600,1350=>600,1351=>600,1352=>600,1353=>600,1354=>600,1355=>600,1356=>600,1357=>600,1358=>600,1359=>600,1360=>600,1361=>600,1362=>600,1363=>600,1364=>600,1365=>600,1366=>600,1369=>600,1370=>600,1371=>600,1372=>600,1373=>600,1374=>600,1375=>600,1377=>600,1378=>600,1379=>600,1380=>600,1381=>600,1382=>600,1383=>600,1384=>600,1385=>600,1386=>600,1387=>600,1388=>600,1389=>600,1390=>600,1391=>600,1392=>600,1393=>600,1394=>600,1395=>600,1396=>600,1397=>600,1398=>600,1399=>600,1400=>600,1401=>600,1402=>600,1403=>600,1404=>600,1405=>600,1406=>600,1407=>600,1408=>600,1409=>600,1410=>600,1411=>600,1412=>600,1413=>600,1414=>600,1415=>600,1417=>600,1418=>600,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>600,1471=>0,1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,4347=>600,4348=>600,5024=>600,5025=>600,5026=>600,5027=>600,5028=>600,5029=>600,5030=>600,5031=>600,5032=>600,5033=>600,5034=>600,5035=>600,5036=>600,5037=>600,5038=>600,5039=>600,5040=>600,5041=>600,5042=>600,5043=>600,5044=>600,5045=>600,5046=>600,5047=>600,5048=>600,5049=>600,5050=>600,5051=>600,5052=>600,5053=>600,5054=>600,5055=>600,5056=>600,5057=>600,5058=>600,5059=>600,5060=>600,5061=>600,5062=>600,5063=>600,5064=>600,5065=>600,5066=>600,5067=>600,5068=>600,5069=>600,5070=>600,5071=>600,5072=>600,5073=>600,5074=>600,5075=>600,5076=>600,5077=>600,5078=>600,5079=>600,5080=>600,5081=>600,5082=>600,5083=>600,5084=>600,5085=>600,5086=>600,5087=>600,5088=>600,5089=>600,5090=>600,5091=>600,5092=>600,5093=>600,5094=>600,5095=>600,5096=>600,5097=>600,5098=>600,5099=>600,5100=>600,5101=>600,5102=>600,5103=>600,5104=>600,5105=>600,5106=>600,5107=>600,5108=>600,5792=>600,5793=>600,5794=>600,5795=>600,5796=>600,5797=>600,5798=>600,5799=>600,5800=>600,5801=>600,5802=>600,5803=>600,5804=>600,5805=>600,5806=>600,5807=>600,5808=>600,5809=>600,5810=>600,5811=>600,5812=>600,5813=>600,5814=>600,5815=>600,5816=>600,5817=>600,5818=>600,5819=>600,5820=>600,5821=>600,5822=>600,5823=>600,5824=>600,5825=>600,5826=>600,5827=>600,5828=>600,5829=>600,5830=>600,5831=>600,5832=>600,5833=>600,5834=>600,5835=>600,5836=>600,5837=>600,5838=>600,5839=>600,5840=>600,5841=>600,5842=>600,5843=>600,5844=>600,5845=>600,5846=>600,5847=>600,5848=>600,5849=>600,5850=>600,5851=>600,5852=>600,5853=>600,5854=>600,5855=>600,5856=>600,5857=>600,5858=>600,5859=>600,5860=>600,5861=>600,5862=>600,5863=>600,5864=>600,5865=>600,5866=>600,5867=>600,5868=>600,5869=>600,5870=>600,5871=>600,5872=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,7722=>600,7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,7732=>600,7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,7742=>600,7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,7752=>600,7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,7762=>600,7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,7772=>600,7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,7782=>600,7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,7792=>600,7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,7939=>600,7940=>600,7941=>600,7942=>600,7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,7949=>600,7950=>600,7951=>600,7952=>600,7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7960=>600,7961=>600,7962=>600,7963=>600,7964=>600,7965=>600,7968=>600,7969=>600,7970=>600,7971=>600,7972=>600,7973=>600,7974=>600,7975=>600,7976=>600,7977=>600,7978=>600,7979=>600,7980=>600,7981=>600,7982=>600,7983=>600,7984=>600,7985=>600,7986=>600,7987=>600,7988=>600,7989=>600,7990=>600,7991=>600,7992=>600,7993=>600,7994=>600,7995=>600,7996=>600,7997=>600,7998=>600,7999=>600,8000=>600,8001=>600,8002=>600,8003=>600,8004=>600,8005=>600,8008=>600,8009=>600,8010=>600,8011=>600,8012=>600,8013=>600,8016=>600,8017=>600,8018=>600,8019=>600,8020=>600,8021=>600,8022=>600,8023=>600,8025=>600,8027=>600,8029=>600,8031=>600,8032=>600,8033=>600,8034=>600,8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,8040=>600,8041=>600,8042=>600,8043=>600,8044=>600,8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,8050=>600,8051=>600,8052=>600,8053=>600,8054=>600,8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,8060=>600,8061=>600,8064=>600,8065=>600,8066=>600,8067=>600,8068=>600,8069=>600,8070=>600,8071=>600,8072=>600,8073=>600,8074=>600,8075=>600,8076=>600,8077=>600,8078=>600,8079=>600,8080=>600,8081=>600,8082=>600,8083=>600,8084=>600,8085=>600,8086=>600,8087=>600,8088=>600,8089=>600,8090=>600,8091=>600,8092=>600,8093=>600,8094=>600,8095=>600,8096=>600,8097=>600,8098=>600,8099=>600,8100=>600,8101=>600,8102=>600,8103=>600,8104=>600,8105=>600,8106=>600,8107=>600,8108=>600,8109=>600,8110=>600,8111=>600,8112=>600,8113=>600,8114=>600,8115=>600,8116=>600,8118=>600,8119=>600,8120=>600,8121=>600,8122=>600,8123=>600,8124=>600,8125=>600,8126=>600,8127=>600,8128=>600,8129=>600,8130=>600,8131=>600,8132=>600,8134=>600,8135=>600,8136=>600,8137=>600,8138=>600,8139=>600,8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,8145=>600,8146=>600,8147=>600,8150=>600,8151=>600,8152=>600,8153=>600,8154=>600,8155=>600,8157=>600,8158=>600,8159=>600,8160=>600,8161=>600,8162=>600,8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,8168=>600,8169=>600,8170=>600,8171=>600,8172=>600,8173=>600,8174=>600,8175=>600,8178=>600,8179=>600,8180=>600,8182=>600,8183=>600,8184=>600,8185=>600,8186=>600,8187=>600,8188=>600,8189=>600,8190=>600,8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8211=>600,8212=>600,8213=>600,8214=>600,8215=>600,8216=>600,8217=>600,8218=>600,8219=>600,8220=>600,8221=>600,8222=>600,8223=>600,8224=>600,8225=>600,8226=>600,8227=>600,8228=>600,8229=>600,8230=>600,8231=>600,8232=>600,8233=>600,8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8240=>600,8241=>600,8242=>600,8243=>600,8244=>600,8245=>600,8246=>600,8247=>600,8248=>600,8249=>600,8250=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8353=>600,8354=>600,8355=>600,8356=>600,8357=>600,8358=>600,8359=>600,8360=>600,8361=>600,8362=>600,8363=>600,8364=>600,8365=>600,8366=>600,8368=>600,8369=>600,8370=>600,8371=>600,8372=>600,8373=>600,8400=>0,8401=>0,8402=>0,8406=>0,8407=>0,8411=>0,8412=>0,8413=>0,8414=>0,8415=>0,8416=>0,8417=>0,8418=>0,8419=>0,8421=>0,8422=>0,8424=>0,8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,8448=>600,8449=>600,8450=>600,8451=>600,8452=>600,8453=>600,8454=>600,8455=>600,8456=>600,8457=>600,8461=>600,8462=>600,8463=>600,8464=>600,8465=>600,8466=>600,8467=>600,8468=>600,8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,8474=>600,8476=>600,8477=>600,8478=>600,8480=>600,8481=>600,8482=>600,8484=>600,8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8494=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,8505=>600,8506=>600,8507=>600,8513=>600,8514=>600,8515=>600,8516=>600,8523=>600,8525=>600,8526=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8551=>600,8552=>600,8553=>600,8554=>600,8555=>600,8556=>600,8557=>600,8558=>600,8559=>600,8560=>600,8561=>600,8562=>600,8563=>600,8564=>600,8565=>600,8566=>600,8567=>600,8568=>600,8569=>600,8570=>600,8571=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8602=>600,8603=>600,8604=>600,8605=>600,8606=>600,8607=>600,8608=>600,8609=>600,8610=>600,8611=>600,8612=>600,8613=>600,8614=>600,8615=>600,8616=>600,8617=>600,8618=>600,8619=>600,8620=>600,8621=>600,8622=>600,8623=>600,8624=>600,8625=>600,8626=>600,8627=>600,8628=>600,8629=>600,8630=>600,8631=>600,8632=>600,8633=>600,8634=>600,8635=>600,8636=>600,8637=>600,8638=>600,8639=>600,8640=>600,8641=>600,8642=>600,8643=>600,8644=>600,8645=>600,8646=>600,8647=>600,8648=>600,8649=>600,8650=>600,8651=>600,8652=>600,8653=>600,8654=>600,8655=>600,8656=>600,8657=>600,8658=>600,8659=>600,8660=>600,8661=>600,8669=>600,8678=>600,8679=>600,8680=>600,8681=>600,8691=>600,8704=>600,8705=>600,8706=>600,8707=>600,8708=>600,8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8714=>600,8715=>600,8716=>600,8717=>600,8718=>600,8719=>600,8720=>600,8721=>600,8722=>600,8723=>600,8724=>600,8725=>600,8726=>600,8727=>600,8728=>600,8729=>600,8730=>600,8731=>600,8732=>600,8733=>600,8734=>600,8735=>600,8736=>600,8737=>600,8738=>600,8739=>600,8740=>600,8741=>600,8742=>600,8743=>600,8744=>600,8745=>600,8746=>600,8747=>600,8748=>600,8749=>600,8750=>600,8751=>600,8752=>600,8753=>600,8754=>600,8755=>600,8756=>600,8757=>600,8758=>600,8759=>600,8760=>600,8761=>600,8762=>600,8763=>600,8764=>600,8765=>600,8766=>600,8767=>600,8768=>600,8769=>600,8770=>600,8771=>600,8772=>600,8773=>600,8774=>600,8775=>600,8776=>600,8777=>600,8778=>600,8779=>600,8780=>600,8781=>600,8782=>600,8783=>600,8784=>600,8785=>600,8786=>600,8787=>600,8788=>600,8789=>600,8790=>600,8791=>600,8792=>600,8793=>600,8794=>600,8795=>600,8796=>600,8797=>600,8798=>600,8799=>600,8800=>600,8801=>600,8802=>600,8803=>600,8804=>600,8805=>600,8806=>600,8807=>600,8808=>600,8809=>600,8810=>600,8811=>600,8812=>600,8813=>600,8814=>600,8815=>600,8816=>600,8817=>600,8818=>600,8819=>600,8820=>600,8821=>600,8822=>600,8823=>600,8824=>600,8825=>600,8826=>600,8827=>600,8828=>600,8829=>600,8830=>600,8831=>600,8832=>600,8833=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,8839=>600,8840=>600,8841=>600,8842=>600,8843=>600,8844=>600,8845=>600,8846=>600,8847=>600,8848=>600,8849=>600,8850=>600,8851=>600,8852=>600,8853=>600,8854=>600,8855=>600,8856=>600,8857=>600,8858=>600,8859=>600,8860=>600,8861=>600,8862=>600,8863=>600,8864=>600,8865=>600,8866=>600,8867=>600,8868=>600,8869=>600,8870=>600,8871=>600,8872=>600,8873=>600,8874=>600,8875=>600,8876=>600,8877=>600,8878=>600,8879=>600,8880=>600,8881=>600,8882=>600,8883=>600,8884=>600,8885=>600,8886=>600,8887=>600,8888=>600,8889=>600,8890=>600,8891=>600,8892=>600,8893=>600,8894=>600,8895=>600,8896=>600,8897=>600,8898=>600,8899=>600,8900=>600,8901=>600,8902=>600,8903=>600,8904=>600,8905=>600,8906=>600,8907=>600,8908=>600,8909=>600,8910=>600,8911=>600,8912=>600,8913=>600,8914=>600,8915=>600,8916=>600,8917=>600,8918=>600,8919=>600,8920=>600,8921=>600,8922=>600,8923=>600,8924=>600,8925=>600,8926=>600,8927=>600,8928=>600,8929=>600,8930=>600,8931=>600,8932=>600,8933=>600,8934=>600,8935=>600,8936=>600,8937=>600,8938=>600,8939=>600,8940=>600,8941=>600,8942=>600,8943=>600,8944=>600,8945=>600,8960=>600,8962=>600,8963=>600,8964=>600,8965=>600,8966=>600,8968=>600,8969=>600,8970=>600,8971=>600,8972=>600,8973=>600,8974=>600,8975=>600,8976=>600,8978=>600,8980=>600,8981=>600,8984=>600,8985=>600,8988=>600,8989=>600,8990=>600,8991=>600,8992=>600,8993=>600,8994=>600,8995=>600,8996=>600,8997=>600,8998=>600,8999=>600,9001=>600,9002=>600,9003=>600,9004=>600,9014=>600,9015=>600,9016=>600,9017=>600,9018=>600,9019=>600,9020=>600,9021=>600,9022=>600,9023=>600,9024=>600,9025=>600,9026=>600,9027=>600,9028=>600,9029=>600,9030=>600,9031=>600,9032=>600,9033=>600,9034=>600,9035=>600,9036=>600,9037=>600,9038=>600,9039=>600,9040=>600,9041=>600,9042=>600,9043=>600,9044=>600,9045=>600,9046=>600,9047=>600,9048=>600,9049=>600,9050=>600,9051=>600,9052=>600,9053=>600,9054=>600,9055=>600,9056=>600,9057=>600,9058=>600,9059=>600,9060=>600,9061=>600,9062=>600,9063=>600,9064=>600,9065=>600,9066=>600,9067=>600,9068=>600,9069=>600,9070=>600,9071=>600,9072=>600,9073=>600,9074=>600,9075=>600,9076=>600,9077=>600,9078=>600,9079=>600,9080=>600,9081=>600,9082=>600,9084=>600,9085=>600,9086=>600,9087=>600,9088=>600,9089=>600,9090=>600,9091=>600,9092=>600,9093=>600,9094=>600,9095=>600,9096=>600,9097=>600,9098=>600,9099=>600,9100=>600,9101=>600,9102=>600,9103=>600,9104=>600,9105=>600,9106=>600,9107=>600,9108=>600,9109=>600,9110=>600,9111=>600,9112=>600,9113=>600,9114=>600,9115=>600,9116=>600,9117=>600,9118=>600,9119=>600,9120=>600,9121=>600,9122=>600,9123=>600,9124=>600,9125=>600,9126=>600,9127=>600,9128=>600,9129=>600,9130=>600,9131=>600,9132=>600,9133=>600,9134=>600,9135=>600,9136=>600,9137=>600,9138=>600,9139=>600,9140=>600,9141=>600,9142=>600,9143=>600,9146=>600,9147=>600,9148=>600,9149=>600,9150=>600,9151=>600,9152=>600,9153=>600,9154=>600,9155=>600,9156=>600,9157=>600,9158=>600,9159=>600,9160=>600,9161=>600,9162=>600,9163=>600,9164=>600,9165=>600,9166=>600,9167=>600,9178=>600,9179=>600,9182=>600,9183=>600,9186=>600,9187=>600,9188=>600,9189=>600,9190=>600,9216=>600,9217=>600,9218=>600,9219=>600,9220=>600,9221=>600,9222=>600,9223=>600,9224=>600,9225=>600,9226=>600,9227=>600,9228=>600,9229=>600,9230=>600,9231=>600,9232=>600,9233=>600,9234=>600,9235=>600,9236=>600,9237=>600,9238=>600,9239=>600,9240=>600,9241=>600,9242=>600,9243=>600,9244=>600,9245=>600,9246=>600,9247=>600,9248=>600,9249=>600,9251=>600,9252=>600,9280=>600,9281=>600,9282=>600,9283=>600,9284=>600,9285=>600,9286=>600,9287=>600,9288=>600,9289=>600,9290=>600,9312=>600,9313=>600,9314=>600,9315=>600,9316=>600,9317=>600,9318=>600,9319=>600,9320=>600,9321=>600,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600,9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600,9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9622=>600,9623=>600,9624=>600,9625=>600,9626=>600,9627=>600,9628=>600,9629=>600,9630=>600,9631=>600,9632=>600,9633=>600,9634=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,9673=>600,9674=>600,9675=>600,9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600,9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,9693=>600,9694=>600,9695=>600,9696=>600,9697=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9712=>600,9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,9718=>600,9719=>600,9720=>600,9721=>600,9722=>600,9723=>600,9724=>600,9725=>600,9726=>600,9727=>600,9728=>600,9729=>600,9730=>600,9731=>600,9733=>600,9734=>600,9735=>600,9736=>600,9737=>600,9744=>600,9745=>600,9746=>600,9754=>600,9755=>600,9756=>600,9757=>600,9758=>600,9759=>600,9766=>600,9768=>600,9769=>600,9774=>600,9775=>600,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,9788=>600,9789=>600,9790=>600,9791=>600,9792=>600,9793=>600,9794=>600,9795=>600,9796=>600,9797=>600,9798=>600,9799=>600,9800=>600,9801=>600,9802=>600,9803=>600,9804=>600,9805=>600,9806=>600,9807=>600,9808=>600,9809=>600,9810=>600,9811=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,9856=>600,9857=>600,9858=>600,9859=>600,9860=>600,9861=>600,10176=>600,10177=>600,10178=>600,10179=>600,10180=>600,10181=>600,10182=>600,10183=>600,10184=>600,10185=>600,10186=>600,10188=>600,10192=>600,10193=>600,10194=>600,10195=>600,10196=>600,10197=>600,10198=>600,10199=>600,10212=>600,10213=>600,10214=>600,10215=>600,10216=>600,10217=>600,10218=>600,10219=>600,10226=>600,10227=>600,10229=>600,10230=>600,10231=>600,10232=>600,10233=>600,10234=>600,10235=>600,10236=>600,10240=>600,10241=>600,10242=>600,10243=>600,10244=>600,10245=>600,10246=>600,10247=>600,10248=>600,10249=>600,10250=>600,10251=>600,10252=>600,10253=>600,10254=>600,10255=>600,10256=>600,10257=>600,10258=>600,10259=>600,10260=>600,10261=>600,10262=>600,10263=>600,10264=>600,10265=>600,10266=>600,10267=>600,10268=>600,10269=>600,10270=>600,10271=>600,10272=>600,10273=>600,10274=>600,10275=>600,10276=>600,10277=>600,10278=>600,10279=>600,10280=>600,10281=>600,10282=>600,10283=>600,10284=>600,10285=>600,10286=>600,10287=>600,10288=>600,10289=>600,10290=>600,10291=>600,10292=>600,10293=>600,10294=>600,10295=>600,10296=>600,10297=>600,10298=>600,10299=>600,10300=>600,10301=>600,10302=>600,10303=>600,10304=>600,10305=>600,10306=>600,10307=>600,10308=>600,10309=>600,10310=>600,10311=>600,10312=>600,10313=>600,10314=>600,10315=>600,10316=>600,10317=>600,10318=>600,10319=>600,10320=>600,10321=>600,10322=>600,10323=>600,10324=>600,10325=>600,10326=>600,10327=>600,10328=>600,10329=>600,10330=>600,10331=>600,10332=>600,10333=>600,10334=>600,10335=>600,10336=>600,10337=>600,10338=>600,10339=>600,10340=>600,10341=>600,10342=>600,10343=>600,10344=>600,10345=>600,10346=>600,10347=>600,10348=>600,10349=>600,10350=>600,10351=>600,10352=>600,10353=>600,10354=>600,10355=>600,10356=>600,10357=>600,10358=>600,10359=>600,10360=>600,10361=>600,10362=>600,10363=>600,10364=>600,10365=>600,10366=>600,10367=>600,10368=>600,10369=>600,10370=>600,10371=>600,10372=>600,10373=>600,10374=>600,10375=>600,10376=>600,10377=>600,10378=>600,10379=>600,10380=>600,10381=>600,10382=>600,10383=>600,10384=>600,10385=>600,10386=>600,10387=>600,10388=>600,10389=>600,10390=>600,10391=>600,10392=>600,10393=>600,10394=>600,10395=>600,10396=>600,10397=>600,10398=>600,10399=>600,10400=>600,10401=>600,10402=>600,10403=>600,10404=>600,10405=>600,10406=>600,10407=>600,10408=>600,10409=>600,10410=>600,10411=>600,10412=>600,10413=>600,10414=>600,10415=>600,10416=>600,10417=>600,10418=>600,10419=>600,10420=>600,10421=>600,10422=>600,10423=>600,10424=>600,10425=>600,10426=>600,10427=>600,10428=>600,10429=>600,10430=>600,10431=>600,10432=>600,10433=>600,10434=>600,10435=>600,10436=>600,10437=>600,10438=>600,10439=>600,10440=>600,10441=>600,10442=>600,10443=>600,10444=>600,10445=>600,10446=>600,10447=>600,10448=>600,10449=>600,10450=>600,10451=>600,10452=>600,10453=>600,10454=>600,10455=>600,10456=>600,10457=>600,10458=>600,10459=>600,10460=>600,10461=>600,10462=>600,10463=>600,10464=>600,10465=>600,10466=>600,10467=>600,10468=>600,10469=>600,10470=>600,10471=>600,10472=>600,10473=>600,10474=>600,10475=>600,10476=>600,10477=>600,10478=>600,10479=>600,10480=>600,10481=>600,10482=>600,10483=>600,10484=>600,10485=>600,10486=>600,10487=>600,10488=>600,10489=>600,10490=>600,10491=>600,10492=>600,10493=>600,10494=>600,10495=>600,10752=>600,10753=>600,10754=>600,10755=>600,10756=>600,10757=>600,10758=>600,10781=>600,10815=>600,11008=>600,11009=>600,11010=>600,11011=>600,11012=>600,11013=>600,11014=>600,11015=>600,11016=>600,11017=>600,11018=>600,11019=>600,11020=>600,11021=>600,11026=>600,11027=>600,11028=>600,11029=>600,11030=>600,11031=>600,11032=>600,11033=>600,11035=>600,11036=>600,11037=>600,11038=>600,11039=>600,11040=>600,11041=>600,11042=>600,11043=>600,11044=>600,11045=>600,11046=>600,11047=>600,11048=>600,11049=>600,11050=>600,11051=>600,11091=>600,11092=>600,11799=>600,42888=>600,42889=>600,42890=>600,42891=>600,42892=>600,43264=>600,43265=>600,43266=>600,43267=>600,43268=>600,43269=>600,43270=>600,43271=>600,43272=>600,43273=>600,43274=>600,43275=>600,43276=>600,43277=>600,43278=>600,43279=>600,43280=>600,43281=>600,43282=>600,43283=>600,43284=>600,43285=>600,43286=>600,43287=>600,43288=>600,43289=>600,43290=>600,43291=>600,43292=>600,43293=>600,43294=>600,43295=>600,43296=>600,43297=>600,43298=>600,43299=>600,43300=>600,43301=>600,43302=>0,43303=>0,43304=>0,43305=>0,43306=>0,43307=>0,43308=>0,43309=>0,43310=>600,43311=>600,64256=>600,64257=>600,64258=>600,64259=>600,64260=>600,64261=>600,64285=>600,64286=>600,64287=>600,64288=>600,64289=>600,64290=>600,64291=>600,64292=>600,64293=>600,64294=>600,64295=>600,64296=>600,64297=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,64329=>600,64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600,65535=>600);
+$cw=array(0=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,257=>600,258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,267=>600,268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,277=>600,278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,287=>600,288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,297=>600,298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=>600,305=>600,306=>600,307=>600,308=>600,309=>600,310=>600,311=>600,312=>600,313=>600,314=>600,315=>600,316=>600,317=>600,318=>600,319=>600,320=>600,321=>600,322=>600,323=>600,324=>600,325=>600,326=>600,327=>600,328=>600,329=>600,330=>600,331=>600,332=>600,333=>600,334=>600,335=>600,336=>600,337=>600,338=>600,339=>600,340=>600,341=>600,342=>600,343=>600,344=>600,345=>600,346=>600,347=>600,348=>600,349=>600,350=>600,351=>600,352=>600,353=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,372=>600,373=>600,374=>600,375=>600,376=>600,377=>600,378=>600,379=>600,380=>600,381=>600,382=>600,383=>600,384=>600,385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,402=>600,403=>600,404=>600,405=>600,406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,544=>600,548=>600,549=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,597=>600,598=>600,599=>600,600=>600,601=>600,602=>600,603=>600,604=>600,605=>600,606=>600,607=>600,608=>600,609=>600,610=>600,611=>600,612=>600,613=>600,614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,620=>600,621=>600,622=>600,623=>600,624=>600,625=>600,626=>600,627=>600,628=>600,629=>600,630=>600,631=>600,632=>600,633=>600,634=>600,635=>600,636=>600,637=>600,638=>600,639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,646=>600,647=>600,648=>600,649=>600,650=>600,651=>600,652=>600,653=>600,654=>600,655=>600,656=>600,657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,663=>600,664=>600,665=>600,666=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,673=>600,674=>600,675=>600,676=>600,677=>600,678=>600,679=>600,680=>600,681=>600,682=>600,683=>600,684=>600,685=>600,686=>600,687=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,695=>600,696=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,705=>600,706=>600,707=>600,708=>600,709=>600,710=>600,711=>600,712=>600,713=>600,714=>600,715=>600,716=>600,717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,727=>600,728=>600,729=>600,730=>600,731=>600,732=>600,733=>600,734=>600,735=>600,736=>600,737=>600,738=>600,739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,748=>600,749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,758=>600,759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,843=>0,844=>0,845=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,1120=>600,1121=>600,1122=>600,1123=>600,1124=>600,1126=>600,1127=>600,1128=>600,1130=>600,1131=>600,1132=>600,1133=>600,1136=>600,1137=>600,1138=>600,1140=>600,1141=>600,1142=>600,1143=>600,1148=>600,1149=>600,1155=>0,1156=>0,1157=>0,1158=>0,1159=>0,1162=>600,1163=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,1272=>600,1273=>600,1296=>600,1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,1310=>600,1311=>600,1329=>600,1330=>600,1331=>600,1332=>600,1333=>600,1334=>600,1335=>600,1336=>600,1337=>600,1338=>600,1339=>600,1340=>600,1341=>600,1342=>600,1343=>600,1344=>600,1345=>600,1346=>600,1347=>600,1348=>600,1349=>600,1350=>600,1351=>600,1352=>600,1353=>600,1354=>600,1355=>600,1356=>600,1357=>600,1358=>600,1359=>600,1360=>600,1361=>600,1362=>600,1363=>600,1364=>600,1365=>600,1366=>600,1369=>600,1370=>600,1371=>600,1372=>600,1373=>600,1374=>600,1375=>600,1377=>600,1378=>600,1379=>600,1380=>600,1381=>600,1382=>600,1383=>600,1384=>600,1385=>600,1386=>600,1387=>600,1388=>600,1389=>600,1390=>600,1391=>600,1392=>600,1393=>600,1394=>600,1395=>600,1396=>600,1397=>600,1398=>600,1399=>600,1400=>600,1401=>600,1402=>600,1403=>600,1404=>600,1405=>600,1406=>600,1407=>600,1408=>600,1409=>600,1410=>600,1411=>600,1412=>600,1413=>600,1414=>600,1415=>600,1417=>600,1418=>600,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>600,1471=>0,1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,4347=>600,4348=>600,5024=>600,5025=>600,5026=>600,5027=>600,5028=>600,5029=>600,5030=>600,5031=>600,5032=>600,5033=>600,5034=>600,5035=>600,5036=>600,5037=>600,5038=>600,5039=>600,5040=>600,5041=>600,5042=>600,5043=>600,5044=>600,5045=>600,5046=>600,5047=>600,5048=>600,5049=>600,5050=>600,5051=>600,5052=>600,5053=>600,5054=>600,5055=>600,5056=>600,5057=>600,5058=>600,5059=>600,5060=>600,5061=>600,5062=>600,5063=>600,5064=>600,5065=>600,5066=>600,5067=>600,5068=>600,5069=>600,5070=>600,5071=>600,5072=>600,5073=>600,5074=>600,5075=>600,5076=>600,5077=>600,5078=>600,5079=>600,5080=>600,5081=>600,5082=>600,5083=>600,5084=>600,5085=>600,5086=>600,5087=>600,5088=>600,5089=>600,5090=>600,5091=>600,5092=>600,5093=>600,5094=>600,5095=>600,5096=>600,5097=>600,5098=>600,5099=>600,5100=>600,5101=>600,5102=>600,5103=>600,5104=>600,5105=>600,5106=>600,5107=>600,5108=>600,5792=>600,5793=>600,5794=>600,5795=>600,5796=>600,5797=>600,5798=>600,5799=>600,5800=>600,5801=>600,5802=>600,5803=>600,5804=>600,5805=>600,5806=>600,5807=>600,5808=>600,5809=>600,5810=>600,5811=>600,5812=>600,5813=>600,5814=>600,5815=>600,5816=>600,5817=>600,5818=>600,5819=>600,5820=>600,5821=>600,5822=>600,5823=>600,5824=>600,5825=>600,5826=>600,5827=>600,5828=>600,5829=>600,5830=>600,5831=>600,5832=>600,5833=>600,5834=>600,5835=>600,5836=>600,5837=>600,5838=>600,5839=>600,5840=>600,5841=>600,5842=>600,5843=>600,5844=>600,5845=>600,5846=>600,5847=>600,5848=>600,5849=>600,5850=>600,5851=>600,5852=>600,5853=>600,5854=>600,5855=>600,5856=>600,5857=>600,5858=>600,5859=>600,5860=>600,5861=>600,5862=>600,5863=>600,5864=>600,5865=>600,5866=>600,5867=>600,5868=>600,5869=>600,5870=>600,5871=>600,5872=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,7722=>600,7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,7732=>600,7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,7742=>600,7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,7752=>600,7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,7762=>600,7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,7772=>600,7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,7782=>600,7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,7792=>600,7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,7936=>600,7937=>600,7938=>600,7939=>600,7940=>600,7941=>600,7942=>600,7943=>600,7944=>600,7945=>600,7946=>600,7947=>600,7948=>600,7949=>600,7950=>600,7951=>600,7952=>600,7953=>600,7954=>600,7955=>600,7956=>600,7957=>600,7960=>600,7961=>600,7962=>600,7963=>600,7964=>600,7965=>600,7968=>600,7969=>600,7970=>600,7971=>600,7972=>600,7973=>600,7974=>600,7975=>600,7976=>600,7977=>600,7978=>600,7979=>600,7980=>600,7981=>600,7982=>600,7983=>600,7984=>600,7985=>600,7986=>600,7987=>600,7988=>600,7989=>600,7990=>600,7991=>600,7992=>600,7993=>600,7994=>600,7995=>600,7996=>600,7997=>600,7998=>600,7999=>600,8000=>600,8001=>600,8002=>600,8003=>600,8004=>600,8005=>600,8008=>600,8009=>600,8010=>600,8011=>600,8012=>600,8013=>600,8016=>600,8017=>600,8018=>600,8019=>600,8020=>600,8021=>600,8022=>600,8023=>600,8025=>600,8027=>600,8029=>600,8031=>600,8032=>600,8033=>600,8034=>600,8035=>600,8036=>600,8037=>600,8038=>600,8039=>600,8040=>600,8041=>600,8042=>600,8043=>600,8044=>600,8045=>600,8046=>600,8047=>600,8048=>600,8049=>600,8050=>600,8051=>600,8052=>600,8053=>600,8054=>600,8055=>600,8056=>600,8057=>600,8058=>600,8059=>600,8060=>600,8061=>600,8064=>600,8065=>600,8066=>600,8067=>600,8068=>600,8069=>600,8070=>600,8071=>600,8072=>600,8073=>600,8074=>600,8075=>600,8076=>600,8077=>600,8078=>600,8079=>600,8080=>600,8081=>600,8082=>600,8083=>600,8084=>600,8085=>600,8086=>600,8087=>600,8088=>600,8089=>600,8090=>600,8091=>600,8092=>600,8093=>600,8094=>600,8095=>600,8096=>600,8097=>600,8098=>600,8099=>600,8100=>600,8101=>600,8102=>600,8103=>600,8104=>600,8105=>600,8106=>600,8107=>600,8108=>600,8109=>600,8110=>600,8111=>600,8112=>600,8113=>600,8114=>600,8115=>600,8116=>600,8118=>600,8119=>600,8120=>600,8121=>600,8122=>600,8123=>600,8124=>600,8125=>600,8126=>600,8127=>600,8128=>600,8129=>600,8130=>600,8131=>600,8132=>600,8134=>600,8135=>600,8136=>600,8137=>600,8138=>600,8139=>600,8140=>600,8141=>600,8142=>600,8143=>600,8144=>600,8145=>600,8146=>600,8147=>600,8150=>600,8151=>600,8152=>600,8153=>600,8154=>600,8155=>600,8157=>600,8158=>600,8159=>600,8160=>600,8161=>600,8162=>600,8163=>600,8164=>600,8165=>600,8166=>600,8167=>600,8168=>600,8169=>600,8170=>600,8171=>600,8172=>600,8173=>600,8174=>600,8175=>600,8178=>600,8179=>600,8180=>600,8182=>600,8183=>600,8184=>600,8185=>600,8186=>600,8187=>600,8188=>600,8189=>600,8190=>600,8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8211=>600,8212=>600,8213=>600,8214=>600,8215=>600,8216=>600,8217=>600,8218=>600,8219=>600,8220=>600,8221=>600,8222=>600,8223=>600,8224=>600,8225=>600,8226=>600,8227=>600,8228=>600,8229=>600,8230=>600,8231=>600,8232=>600,8233=>600,8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8240=>600,8241=>600,8242=>600,8243=>600,8244=>600,8245=>600,8246=>600,8247=>600,8248=>600,8249=>600,8250=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8353=>600,8354=>600,8355=>600,8356=>600,8357=>600,8358=>600,8359=>600,8360=>600,8361=>600,8362=>600,8363=>600,8364=>600,8365=>600,8366=>600,8368=>600,8369=>600,8370=>600,8371=>600,8372=>600,8373=>600,8400=>0,8401=>0,8402=>0,8406=>0,8407=>0,8411=>0,8412=>0,8413=>0,8414=>0,8415=>0,8416=>0,8417=>0,8418=>0,8419=>0,8421=>0,8422=>0,8424=>0,8426=>0,8427=>0,8428=>0,8429=>0,8430=>0,8431=>0,8448=>600,8449=>600,8450=>600,8451=>600,8452=>600,8453=>600,8454=>600,8455=>600,8456=>600,8457=>600,8461=>600,8462=>600,8463=>600,8464=>600,8465=>600,8466=>600,8467=>600,8468=>600,8469=>600,8470=>600,8471=>600,8472=>600,8473=>600,8474=>600,8476=>600,8477=>600,8478=>600,8480=>600,8481=>600,8482=>600,8484=>600,8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8494=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,8505=>600,8506=>600,8507=>600,8513=>600,8514=>600,8515=>600,8516=>600,8523=>600,8525=>600,8526=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8551=>600,8552=>600,8553=>600,8554=>600,8555=>600,8556=>600,8557=>600,8558=>600,8559=>600,8560=>600,8561=>600,8562=>600,8563=>600,8564=>600,8565=>600,8566=>600,8567=>600,8568=>600,8569=>600,8570=>600,8571=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8602=>600,8603=>600,8604=>600,8605=>600,8606=>600,8607=>600,8608=>600,8609=>600,8610=>600,8611=>600,8612=>600,8613=>600,8614=>600,8615=>600,8616=>600,8617=>600,8618=>600,8619=>600,8620=>600,8621=>600,8622=>600,8623=>600,8624=>600,8625=>600,8626=>600,8627=>600,8628=>600,8629=>600,8630=>600,8631=>600,8632=>600,8633=>600,8634=>600,8635=>600,8636=>600,8637=>600,8638=>600,8639=>600,8640=>600,8641=>600,8642=>600,8643=>600,8644=>600,8645=>600,8646=>600,8647=>600,8648=>600,8649=>600,8650=>600,8651=>600,8652=>600,8653=>600,8654=>600,8655=>600,8656=>600,8657=>600,8658=>600,8659=>600,8660=>600,8661=>600,8669=>600,8678=>600,8679=>600,8680=>600,8681=>600,8691=>600,8704=>600,8705=>600,8706=>600,8707=>600,8708=>600,8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8714=>600,8715=>600,8716=>600,8717=>600,8718=>600,8719=>600,8720=>600,8721=>600,8722=>600,8723=>600,8724=>600,8725=>600,8726=>600,8727=>600,8728=>600,8729=>600,8730=>600,8731=>600,8732=>600,8733=>600,8734=>600,8735=>600,8736=>600,8737=>600,8738=>600,8739=>600,8740=>600,8741=>600,8742=>600,8743=>600,8744=>600,8745=>600,8746=>600,8747=>600,8748=>600,8749=>600,8750=>600,8751=>600,8752=>600,8753=>600,8754=>600,8755=>600,8756=>600,8757=>600,8758=>600,8759=>600,8760=>600,8761=>600,8762=>600,8763=>600,8764=>600,8765=>600,8766=>600,8767=>600,8768=>600,8769=>600,8770=>600,8771=>600,8772=>600,8773=>600,8774=>600,8775=>600,8776=>600,8777=>600,8778=>600,8779=>600,8780=>600,8781=>600,8782=>600,8783=>600,8784=>600,8785=>600,8786=>600,8787=>600,8788=>600,8789=>600,8790=>600,8791=>600,8792=>600,8793=>600,8794=>600,8795=>600,8796=>600,8797=>600,8798=>600,8799=>600,8800=>600,8801=>600,8802=>600,8803=>600,8804=>600,8805=>600,8806=>600,8807=>600,8808=>600,8809=>600,8810=>600,8811=>600,8812=>600,8813=>600,8814=>600,8815=>600,8816=>600,8817=>600,8818=>600,8819=>600,8820=>600,8821=>600,8822=>600,8823=>600,8824=>600,8825=>600,8826=>600,8827=>600,8828=>600,8829=>600,8830=>600,8831=>600,8832=>600,8833=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,8839=>600,8840=>600,8841=>600,8842=>600,8843=>600,8844=>600,8845=>600,8846=>600,8847=>600,8848=>600,8849=>600,8850=>600,8851=>600,8852=>600,8853=>600,8854=>600,8855=>600,8856=>600,8857=>600,8858=>600,8859=>600,8860=>600,8861=>600,8862=>600,8863=>600,8864=>600,8865=>600,8866=>600,8867=>600,8868=>600,8869=>600,8870=>600,8871=>600,8872=>600,8873=>600,8874=>600,8875=>600,8876=>600,8877=>600,8878=>600,8879=>600,8880=>600,8881=>600,8882=>600,8883=>600,8884=>600,8885=>600,8886=>600,8887=>600,8888=>600,8889=>600,8890=>600,8891=>600,8892=>600,8893=>600,8894=>600,8895=>600,8896=>600,8897=>600,8898=>600,8899=>600,8900=>600,8901=>600,8902=>600,8903=>600,8904=>600,8905=>600,8906=>600,8907=>600,8908=>600,8909=>600,8910=>600,8911=>600,8912=>600,8913=>600,8914=>600,8915=>600,8916=>600,8917=>600,8918=>600,8919=>600,8920=>600,8921=>600,8922=>600,8923=>600,8924=>600,8925=>600,8926=>600,8927=>600,8928=>600,8929=>600,8930=>600,8931=>600,8932=>600,8933=>600,8934=>600,8935=>600,8936=>600,8937=>600,8938=>600,8939=>600,8940=>600,8941=>600,8942=>600,8943=>600,8944=>600,8945=>600,8960=>600,8962=>600,8963=>600,8964=>600,8965=>600,8966=>600,8968=>600,8969=>600,8970=>600,8971=>600,8972=>600,8973=>600,8974=>600,8975=>600,8976=>600,8978=>600,8980=>600,8981=>600,8984=>600,8985=>600,8988=>600,8989=>600,8990=>600,8991=>600,8992=>600,8993=>600,8994=>600,8995=>600,8996=>600,8997=>600,8998=>600,8999=>600,9001=>600,9002=>600,9003=>600,9004=>600,9014=>600,9015=>600,9016=>600,9017=>600,9018=>600,9019=>600,9020=>600,9021=>600,9022=>600,9023=>600,9024=>600,9025=>600,9026=>600,9027=>600,9028=>600,9029=>600,9030=>600,9031=>600,9032=>600,9033=>600,9034=>600,9035=>600,9036=>600,9037=>600,9038=>600,9039=>600,9040=>600,9041=>600,9042=>600,9043=>600,9044=>600,9045=>600,9046=>600,9047=>600,9048=>600,9049=>600,9050=>600,9051=>600,9052=>600,9053=>600,9054=>600,9055=>600,9056=>600,9057=>600,9058=>600,9059=>600,9060=>600,9061=>600,9062=>600,9063=>600,9064=>600,9065=>600,9066=>600,9067=>600,9068=>600,9069=>600,9070=>600,9071=>600,9072=>600,9073=>600,9074=>600,9075=>600,9076=>600,9077=>600,9078=>600,9079=>600,9080=>600,9081=>600,9082=>600,9084=>600,9085=>600,9086=>600,9087=>600,9088=>600,9089=>600,9090=>600,9091=>600,9092=>600,9093=>600,9094=>600,9095=>600,9096=>600,9097=>600,9098=>600,9099=>600,9100=>600,9101=>600,9102=>600,9103=>600,9104=>600,9105=>600,9106=>600,9107=>600,9108=>600,9109=>600,9110=>600,9111=>600,9112=>600,9113=>600,9114=>600,9115=>600,9116=>600,9117=>600,9118=>600,9119=>600,9120=>600,9121=>600,9122=>600,9123=>600,9124=>600,9125=>600,9126=>600,9127=>600,9128=>600,9129=>600,9130=>600,9131=>600,9132=>600,9133=>600,9134=>600,9135=>600,9136=>600,9137=>600,9138=>600,9139=>600,9140=>600,9141=>600,9142=>600,9143=>600,9146=>600,9147=>600,9148=>600,9149=>600,9150=>600,9151=>600,9152=>600,9153=>600,9154=>600,9155=>600,9156=>600,9157=>600,9158=>600,9159=>600,9160=>600,9161=>600,9162=>600,9163=>600,9164=>600,9165=>600,9166=>600,9167=>600,9178=>600,9179=>600,9182=>600,9183=>600,9186=>600,9187=>600,9188=>600,9189=>600,9190=>600,9216=>600,9217=>600,9218=>600,9219=>600,9220=>600,9221=>600,9222=>600,9223=>600,9224=>600,9225=>600,9226=>600,9227=>600,9228=>600,9229=>600,9230=>600,9231=>600,9232=>600,9233=>600,9234=>600,9235=>600,9236=>600,9237=>600,9238=>600,9239=>600,9240=>600,9241=>600,9242=>600,9243=>600,9244=>600,9245=>600,9246=>600,9247=>600,9248=>600,9249=>600,9251=>600,9252=>600,9280=>600,9281=>600,9282=>600,9283=>600,9284=>600,9285=>600,9286=>600,9287=>600,9288=>600,9289=>600,9290=>600,9312=>600,9313=>600,9314=>600,9315=>600,9316=>600,9317=>600,9318=>600,9319=>600,9320=>600,9321=>600,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600,9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600,9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9622=>600,9623=>600,9624=>600,9625=>600,9626=>600,9627=>600,9628=>600,9629=>600,9630=>600,9631=>600,9632=>600,9633=>600,9634=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,9673=>600,9674=>600,9675=>600,9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600,9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,9693=>600,9694=>600,9695=>600,9696=>600,9697=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9712=>600,9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,9718=>600,9719=>600,9720=>600,9721=>600,9722=>600,9723=>600,9724=>600,9725=>600,9726=>600,9727=>600,9728=>600,9729=>600,9730=>600,9731=>600,9733=>600,9734=>600,9735=>600,9736=>600,9737=>600,9744=>600,9745=>600,9746=>600,9754=>600,9755=>600,9756=>600,9757=>600,9758=>600,9759=>600,9766=>600,9768=>600,9769=>600,9774=>600,9775=>600,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,9788=>600,9789=>600,9790=>600,9791=>600,9792=>600,9793=>600,9794=>600,9795=>600,9796=>600,9797=>600,9798=>600,9799=>600,9800=>600,9801=>600,9802=>600,9803=>600,9804=>600,9805=>600,9806=>600,9807=>600,9808=>600,9809=>600,9810=>600,9811=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,9856=>600,9857=>600,9858=>600,9859=>600,9860=>600,9861=>600,10176=>600,10177=>600,10178=>600,10179=>600,10180=>600,10181=>600,10182=>600,10183=>600,10184=>600,10185=>600,10186=>600,10188=>600,10192=>600,10193=>600,10194=>600,10195=>600,10196=>600,10197=>600,10198=>600,10199=>600,10212=>600,10213=>600,10214=>600,10215=>600,10216=>600,10217=>600,10218=>600,10219=>600,10226=>600,10227=>600,10229=>600,10230=>600,10231=>600,10232=>600,10233=>600,10234=>600,10235=>600,10236=>600,10240=>600,10241=>600,10242=>600,10243=>600,10244=>600,10245=>600,10246=>600,10247=>600,10248=>600,10249=>600,10250=>600,10251=>600,10252=>600,10253=>600,10254=>600,10255=>600,10256=>600,10257=>600,10258=>600,10259=>600,10260=>600,10261=>600,10262=>600,10263=>600,10264=>600,10265=>600,10266=>600,10267=>600,10268=>600,10269=>600,10270=>600,10271=>600,10272=>600,10273=>600,10274=>600,10275=>600,10276=>600,10277=>600,10278=>600,10279=>600,10280=>600,10281=>600,10282=>600,10283=>600,10284=>600,10285=>600,10286=>600,10287=>600,10288=>600,10289=>600,10290=>600,10291=>600,10292=>600,10293=>600,10294=>600,10295=>600,10296=>600,10297=>600,10298=>600,10299=>600,10300=>600,10301=>600,10302=>600,10303=>600,10304=>600,10305=>600,10306=>600,10307=>600,10308=>600,10309=>600,10310=>600,10311=>600,10312=>600,10313=>600,10314=>600,10315=>600,10316=>600,10317=>600,10318=>600,10319=>600,10320=>600,10321=>600,10322=>600,10323=>600,10324=>600,10325=>600,10326=>600,10327=>600,10328=>600,10329=>600,10330=>600,10331=>600,10332=>600,10333=>600,10334=>600,10335=>600,10336=>600,10337=>600,10338=>600,10339=>600,10340=>600,10341=>600,10342=>600,10343=>600,10344=>600,10345=>600,10346=>600,10347=>600,10348=>600,10349=>600,10350=>600,10351=>600,10352=>600,10353=>600,10354=>600,10355=>600,10356=>600,10357=>600,10358=>600,10359=>600,10360=>600,10361=>600,10362=>600,10363=>600,10364=>600,10365=>600,10366=>600,10367=>600,10368=>600,10369=>600,10370=>600,10371=>600,10372=>600,10373=>600,10374=>600,10375=>600,10376=>600,10377=>600,10378=>600,10379=>600,10380=>600,10381=>600,10382=>600,10383=>600,10384=>600,10385=>600,10386=>600,10387=>600,10388=>600,10389=>600,10390=>600,10391=>600,10392=>600,10393=>600,10394=>600,10395=>600,10396=>600,10397=>600,10398=>600,10399=>600,10400=>600,10401=>600,10402=>600,10403=>600,10404=>600,10405=>600,10406=>600,10407=>600,10408=>600,10409=>600,10410=>600,10411=>600,10412=>600,10413=>600,10414=>600,10415=>600,10416=>600,10417=>600,10418=>600,10419=>600,10420=>600,10421=>600,10422=>600,10423=>600,10424=>600,10425=>600,10426=>600,10427=>600,10428=>600,10429=>600,10430=>600,10431=>600,10432=>600,10433=>600,10434=>600,10435=>600,10436=>600,10437=>600,10438=>600,10439=>600,10440=>600,10441=>600,10442=>600,10443=>600,10444=>600,10445=>600,10446=>600,10447=>600,10448=>600,10449=>600,10450=>600,10451=>600,10452=>600,10453=>600,10454=>600,10455=>600,10456=>600,10457=>600,10458=>600,10459=>600,10460=>600,10461=>600,10462=>600,10463=>600,10464=>600,10465=>600,10466=>600,10467=>600,10468=>600,10469=>600,10470=>600,10471=>600,10472=>600,10473=>600,10474=>600,10475=>600,10476=>600,10477=>600,10478=>600,10479=>600,10480=>600,10481=>600,10482=>600,10483=>600,10484=>600,10485=>600,10486=>600,10487=>600,10488=>600,10489=>600,10490=>600,10491=>600,10492=>600,10493=>600,10494=>600,10495=>600,10752=>600,10753=>600,10754=>600,10755=>600,10756=>600,10757=>600,10758=>600,10781=>600,10815=>600,11008=>600,11009=>600,11010=>600,11011=>600,11012=>600,11013=>600,11014=>600,11015=>600,11016=>600,11017=>600,11018=>600,11019=>600,11020=>600,11021=>600,11026=>600,11027=>600,11028=>600,11029=>600,11030=>600,11031=>600,11032=>600,11033=>600,11035=>600,11036=>600,11037=>600,11038=>600,11039=>600,11040=>600,11041=>600,11042=>600,11043=>600,11044=>600,11045=>600,11046=>600,11047=>600,11048=>600,11049=>600,11050=>600,11051=>600,11091=>600,11092=>600,11799=>600,42888=>600,42889=>600,42890=>600,42891=>600,42892=>600,43264=>600,43265=>600,43266=>600,43267=>600,43268=>600,43269=>600,43270=>600,43271=>600,43272=>600,43273=>600,43274=>600,43275=>600,43276=>600,43277=>600,43278=>600,43279=>600,43280=>600,43281=>600,43282=>600,43283=>600,43284=>600,43285=>600,43286=>600,43287=>600,43288=>600,43289=>600,43290=>600,43291=>600,43292=>600,43293=>600,43294=>600,43295=>600,43296=>600,43297=>600,43298=>600,43299=>600,43300=>600,43301=>600,43302=>0,43303=>0,43304=>0,43305=>0,43306=>0,43307=>0,43308=>0,43309=>0,43310=>600,43311=>600,64256=>600,64257=>600,64258=>600,64259=>600,64260=>600,64261=>600,64285=>600,64286=>600,64287=>600,64288=>600,64289=>600,64290=>600,64291=>600,64292=>600,64293=>600,64294=>600,64295=>600,64296=>600,64297=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,64329=>600,64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600,65535=>600);
 // --- EOF ---
index c7b4fca..dc56b7c 100644 (file)
Binary files a/lib/tcpdf/fonts/freemonob.ctg.z and b/lib/tcpdf/fonts/freemonob.ctg.z differ
index 9e36ea9..c66302d 100644 (file)
@@ -11,5 +11,5 @@ $enc='';
 $file='freemonob.z';
 $ctg='freemonob.ctg.z';
 $desc=array('Flags'=>33,'FontBBox'=>'[-600 -200 736 800]','ItalicAngle'=>0,'Ascent'=>800,'Descent'=>-200,'Leading'=>90,'CapHeight'=>583,'XHeight'=>437,'StemV'=>123,'StemH'=>53,'AvgWidth'=>600,'MaxWidth'=>600,'MissingWidth'=>600);
-$cw=array(0=>0,1=>600,2=>600,3=>600,4=>600,5=>600,6=>600,7=>600,8=>0,9=>600,10=>600,11=>600,12=>600,13=>600,14=>600,15=>600,16=>600,17=>600,18=>600,19=>600,20=>600,21=>600,22=>600,23=>600,24=>600,25=>600,26=>600,27=>600,28=>600,29=>0,30=>600,31=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,127=>600,128=>600,129=>600,130=>600,131=>600,132=>600,133=>600,134=>600,135=>600,136=>600,137=>600,138=>600,139=>600,140=>600,141=>600,142=>600,143=>600,144=>600,145=>600,146=>600,147=>600,148=>600,149=>600,150=>600,151=>600,152=>600,153=>600,154=>600,155=>600,156=>600,157=>600,158=>600,159=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,257=>600,258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,267=>600,268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,277=>600,278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,287=>600,288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,297=>600,298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=>600,305=>600,306=>600,307=>600,308=>600,309=>600,310=>600,311=>600,312=>600,313=>600,314=>600,315=>600,316=>600,317=>600,318=>600,319=>600,320=>600,321=>600,322=>600,323=>600,324=>600,325=>600,326=>600,327=>600,328=>600,329=>600,330=>600,331=>600,332=>600,333=>600,334=>600,335=>600,336=>600,337=>600,338=>600,339=>600,340=>600,341=>600,342=>600,343=>600,344=>600,345=>600,346=>600,347=>600,348=>600,349=>600,350=>600,351=>600,352=>600,353=>600,354=>600,355=>600,356=>600,357=>600,358=>600,359=>600,360=>600,361=>600,362=>600,363=>600,364=>600,365=>600,366=>600,367=>600,368=>600,369=>600,370=>600,371=>600,372=>600,373=>600,374=>600,375=>600,376=>600,377=>600,378=>600,379=>600,380=>600,381=>600,382=>600,383=>600,384=>600,385=>600,386=>600,387=>600,388=>600,389=>600,390=>600,391=>600,392=>600,393=>600,394=>600,395=>600,396=>600,397=>600,398=>600,399=>600,400=>600,401=>600,402=>600,403=>600,404=>600,405=>600,406=>600,407=>600,408=>600,409=>600,410=>600,411=>600,412=>600,413=>600,414=>600,415=>600,416=>600,417=>600,418=>600,419=>600,420=>600,421=>600,422=>600,423=>600,424=>600,425=>600,426=>600,427=>600,428=>600,429=>600,430=>600,431=>600,432=>600,433=>600,434=>600,435=>600,436=>600,437=>600,438=>600,439=>600,440=>600,441=>600,442=>600,443=>600,444=>600,445=>600,446=>600,447=>600,448=>600,449=>600,450=>600,451=>600,452=>600,453=>600,454=>600,455=>600,456=>600,457=>600,458=>600,459=>600,460=>600,461=>600,462=>600,463=>600,464=>600,465=>600,466=>600,467=>600,468=>600,469=>600,470=>600,471=>600,472=>600,473=>600,474=>600,475=>600,476=>600,477=>600,478=>600,479=>600,480=>600,481=>600,482=>600,483=>600,484=>600,485=>600,486=>600,487=>600,488=>600,489=>600,490=>600,491=>600,492=>600,493=>600,494=>600,495=>600,496=>600,497=>600,498=>600,499=>600,500=>600,501=>600,502=>600,503=>600,504=>600,505=>600,506=>600,507=>600,508=>600,509=>600,510=>600,511=>600,512=>600,513=>600,514=>600,515=>600,516=>600,517=>600,518=>600,519=>600,520=>600,521=>600,522=>600,523=>600,524=>600,525=>600,526=>600,527=>600,528=>600,529=>600,530=>600,531=>600,532=>600,533=>600,534=>600,535=>600,536=>600,537=>600,538=>600,539=>600,540=>600,541=>600,542=>600,543=>600,544=>600,548=>600,549=>600,550=>600,551=>600,552=>600,553=>600,554=>600,555=>600,556=>600,557=>600,558=>600,559=>600,560=>600,561=>600,562=>600,563=>600,567=>600,592=>600,593=>600,594=>600,595=>600,596=>600,598=>600,599=>600,600=>600,601=>600,603=>600,604=>600,607=>600,608=>600,609=>600,613=>600,614=>600,615=>600,616=>600,617=>600,618=>600,619=>600,621=>600,623=>600,624=>600,625=>600,626=>600,627=>600,628=>600,629=>600,633=>600,634=>600,635=>600,636=>600,637=>600,638=>600,639=>600,640=>600,641=>600,642=>600,643=>600,644=>600,645=>600,647=>600,648=>600,649=>600,652=>600,653=>600,654=>600,656=>600,657=>600,658=>600,659=>600,660=>600,661=>600,662=>600,663=>600,664=>600,665=>600,666=>600,667=>600,668=>600,669=>600,670=>600,671=>600,672=>600,673=>600,674=>600,688=>600,689=>600,690=>600,691=>600,692=>600,693=>600,694=>600,695=>600,696=>600,697=>600,698=>600,699=>600,700=>600,701=>600,702=>600,703=>600,704=>600,705=>600,706=>600,707=>600,708=>600,709=>600,710=>600,711=>600,712=>600,713=>600,714=>600,715=>600,716=>600,717=>600,718=>600,719=>600,720=>600,721=>600,722=>600,723=>600,724=>600,725=>600,726=>600,727=>600,728=>600,729=>600,730=>600,731=>600,732=>600,733=>600,734=>600,735=>600,736=>600,737=>600,738=>600,739=>600,740=>600,741=>600,742=>600,743=>600,744=>600,745=>600,746=>600,747=>600,748=>600,749=>600,750=>600,751=>600,752=>600,753=>600,754=>600,755=>600,756=>600,757=>600,758=>600,759=>600,760=>600,761=>600,762=>600,763=>600,764=>600,765=>600,766=>600,767=>600,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0,838=>0,839=>0,840=>0,841=>0,843=>0,844=>0,845=>0,848=>0,849=>0,850=>0,851=>0,852=>0,853=>0,854=>0,855=>0,856=>0,857=>0,858=>0,884=>600,885=>600,890=>600,894=>600,900=>600,901=>600,902=>600,903=>600,904=>600,905=>600,906=>600,908=>600,910=>600,911=>600,912=>600,913=>600,914=>600,915=>600,916=>600,917=>600,918=>600,919=>600,920=>600,921=>600,922=>600,923=>600,924=>600,925=>600,926=>600,927=>600,928=>600,929=>600,931=>600,932=>600,933=>600,934=>600,935=>600,936=>600,937=>600,938=>600,939=>600,940=>600,941=>600,942=>600,943=>600,944=>600,945=>600,946=>600,947=>600,948=>600,949=>600,950=>600,951=>600,952=>600,953=>600,954=>600,955=>600,956=>600,957=>600,958=>600,959=>600,960=>600,961=>600,962=>600,963=>600,964=>600,965=>600,966=>600,967=>600,968=>600,969=>600,970=>600,971=>600,972=>600,973=>600,974=>600,976=>600,977=>600,978=>600,979=>600,980=>600,981=>600,982=>600,986=>600,987=>600,988=>600,1008=>600,1009=>600,1012=>600,1013=>600,1024=>600,1025=>600,1026=>600,1027=>600,1028=>600,1029=>600,1030=>600,1031=>600,1032=>600,1033=>600,1034=>600,1035=>600,1036=>600,1037=>600,1038=>600,1039=>600,1040=>600,1041=>600,1042=>600,1043=>600,1044=>600,1045=>600,1046=>600,1047=>600,1048=>600,1049=>600,1050=>600,1051=>600,1052=>600,1053=>600,1054=>600,1055=>600,1056=>600,1057=>600,1058=>600,1059=>600,1060=>600,1061=>600,1062=>600,1063=>600,1064=>600,1065=>600,1066=>600,1067=>600,1068=>600,1069=>600,1070=>600,1071=>600,1072=>600,1073=>600,1074=>600,1075=>600,1076=>600,1077=>600,1078=>600,1079=>600,1080=>600,1081=>600,1082=>600,1083=>600,1084=>600,1085=>600,1086=>600,1087=>600,1088=>600,1089=>600,1090=>600,1091=>600,1092=>600,1093=>600,1094=>600,1095=>600,1096=>600,1097=>600,1098=>600,1099=>600,1100=>600,1101=>600,1102=>600,1103=>600,1104=>600,1105=>600,1106=>600,1107=>600,1108=>600,1109=>600,1110=>600,1111=>600,1112=>600,1113=>600,1114=>600,1115=>600,1116=>600,1117=>600,1118=>600,1119=>600,1136=>600,1137=>600,1138=>600,1156=>0,1157=>0,1158=>0,1162=>600,1163=>600,1164=>600,1165=>600,1166=>600,1167=>600,1168=>600,1169=>600,1170=>600,1171=>600,1172=>600,1173=>600,1174=>600,1175=>600,1176=>600,1177=>600,1178=>600,1179=>600,1180=>600,1181=>600,1182=>600,1183=>600,1184=>600,1185=>600,1186=>600,1187=>600,1188=>600,1189=>600,1190=>600,1191=>600,1192=>600,1193=>600,1194=>600,1195=>600,1196=>600,1197=>600,1198=>600,1199=>600,1200=>600,1201=>600,1202=>600,1203=>600,1204=>600,1205=>600,1206=>600,1207=>600,1208=>600,1209=>600,1210=>600,1211=>600,1212=>600,1213=>600,1214=>600,1215=>600,1216=>600,1217=>600,1218=>600,1219=>600,1220=>600,1221=>600,1222=>600,1223=>600,1224=>600,1225=>600,1226=>600,1227=>600,1228=>600,1229=>600,1230=>600,1231=>600,1232=>600,1233=>600,1234=>600,1235=>600,1236=>600,1237=>600,1238=>600,1239=>600,1240=>600,1241=>600,1242=>600,1243=>600,1244=>600,1245=>600,1246=>600,1247=>600,1248=>600,1249=>600,1250=>600,1251=>600,1252=>600,1253=>600,1254=>600,1255=>600,1256=>600,1257=>600,1258=>600,1259=>600,1260=>600,1261=>600,1262=>600,1263=>600,1264=>600,1265=>600,1266=>600,1267=>600,1268=>600,1269=>600,1270=>600,1271=>600,1272=>600,1273=>600,1296=>600,1297=>600,1298=>600,1299=>600,1306=>600,1307=>600,1308=>600,1309=>600,1310=>600,1311=>600,1456=>0,1457=>0,1458=>0,1459=>0,1460=>0,1461=>0,1462=>0,1463=>0,1464=>0,1465=>0,1467=>0,1468=>0,1469=>0,1470=>600,1471=>0,1472=>600,1473=>0,1474=>0,1475=>600,1476=>0,1488=>600,1489=>600,1490=>600,1491=>600,1492=>600,1493=>600,1494=>600,1495=>600,1496=>600,1497=>600,1498=>600,1499=>600,1500=>600,1501=>600,1502=>600,1503=>600,1504=>600,1505=>600,1506=>600,1507=>600,1508=>600,1509=>600,1510=>600,1511=>600,1512=>600,1513=>600,1514=>600,1520=>600,1521=>600,1522=>600,1523=>600,1524=>600,4304=>600,4305=>600,4306=>600,4307=>600,4308=>600,4309=>600,4310=>600,4311=>600,4312=>600,4313=>600,4314=>600,4315=>600,4316=>600,4317=>600,4318=>600,4319=>600,4320=>600,4321=>600,4322=>600,4323=>600,4324=>600,4325=>600,4326=>600,4327=>600,4328=>600,4329=>600,4330=>600,4331=>600,4332=>600,4333=>600,4334=>600,4335=>600,4336=>600,4337=>600,4338=>600,4339=>600,4340=>600,4341=>600,4345=>600,4347=>600,4348=>600,7680=>600,7681=>600,7682=>600,7683=>600,7684=>600,7685=>600,7686=>600,7687=>600,7688=>600,7689=>600,7690=>600,7691=>600,7692=>600,7693=>600,7694=>600,7695=>600,7696=>600,7697=>600,7698=>600,7699=>600,7700=>600,7701=>600,7702=>600,7703=>600,7704=>600,7705=>600,7706=>600,7707=>600,7708=>600,7709=>600,7710=>600,7711=>600,7712=>600,7713=>600,7714=>600,7715=>600,7716=>600,7717=>600,7718=>600,7719=>600,7720=>600,7721=>600,7722=>600,7723=>600,7724=>600,7725=>600,7726=>600,7727=>600,7728=>600,7729=>600,7730=>600,7731=>600,7732=>600,7733=>600,7734=>600,7735=>600,7736=>600,7737=>600,7738=>600,7739=>600,7740=>600,7741=>600,7742=>600,7743=>600,7744=>600,7745=>600,7746=>600,7747=>600,7748=>600,7749=>600,7750=>600,7751=>600,7752=>600,7753=>600,7754=>600,7755=>600,7756=>600,7757=>600,7758=>600,7759=>600,7760=>600,7761=>600,7762=>600,7763=>600,7764=>600,7765=>600,7766=>600,7767=>600,7768=>600,7769=>600,7770=>600,7771=>600,7772=>600,7773=>600,7774=>600,7775=>600,7776=>600,7777=>600,7778=>600,7779=>600,7780=>600,7781=>600,7782=>600,7783=>600,7784=>600,7785=>600,7786=>600,7787=>600,7788=>600,7789=>600,7790=>600,7791=>600,7792=>600,7793=>600,7794=>600,7795=>600,7796=>600,7797=>600,7798=>600,7799=>600,7800=>600,7801=>600,7802=>600,7803=>600,7804=>600,7805=>600,7806=>600,7807=>600,7808=>600,7809=>600,7810=>600,7811=>600,7812=>600,7813=>600,7814=>600,7815=>600,7816=>600,7817=>600,7818=>600,7819=>600,7820=>600,7821=>600,7822=>600,7823=>600,7824=>600,7825=>600,7826=>600,7827=>600,7828=>600,7829=>600,7830=>600,7831=>600,7832=>600,7833=>600,7834=>600,7835=>600,7840=>600,7841=>600,7842=>600,7843=>600,7844=>600,7845=>600,7846=>600,7847=>600,7848=>600,7849=>600,7850=>600,7851=>600,7852=>600,7853=>600,7854=>600,7855=>600,7856=>600,7857=>600,7858=>600,7859=>600,7860=>600,7861=>600,7862=>600,7863=>600,7864=>600,7865=>600,7866=>600,7867=>600,7868=>600,7869=>600,7870=>600,7871=>600,7872=>600,7873=>600,7874=>600,7875=>600,7876=>600,7877=>600,7878=>600,7879=>600,7880=>600,7881=>600,7882=>600,7883=>600,7884=>600,7885=>600,7886=>600,7887=>600,7888=>600,7889=>600,7890=>600,7891=>600,7892=>600,7893=>600,7894=>600,7895=>600,7896=>600,7897=>600,7898=>600,7899=>600,7900=>600,7901=>600,7902=>600,7903=>600,7904=>600,7905=>600,7906=>600,7907=>600,7908=>600,7909=>600,7910=>600,7911=>600,7912=>600,7913=>600,7914=>600,7915=>600,7916=>600,7917=>600,7918=>600,7919=>600,7920=>600,7921=>600,7922=>600,7923=>600,7924=>600,7925=>600,7926=>600,7927=>600,7928=>600,7929=>600,8192=>600,8193=>600,8194=>600,8195=>600,8196=>600,8197=>600,8198=>600,8199=>600,8200=>600,8201=>600,8202=>600,8203=>600,8204=>0,8205=>0,8206=>0,8207=>0,8208=>600,8209=>600,8210=>600,8211=>600,8212=>600,8213=>600,8214=>600,8215=>600,8216=>600,8217=>600,8218=>600,8219=>600,8220=>600,8221=>600,8222=>600,8223=>600,8224=>600,8225=>600,8226=>600,8227=>600,8228=>600,8229=>600,8230=>600,8231=>600,8232=>600,8233=>600,8234=>600,8235=>600,8236=>600,8237=>600,8238=>600,8239=>600,8240=>600,8241=>600,8242=>600,8243=>600,8244=>600,8245=>600,8246=>600,8247=>600,8248=>600,8249=>600,8250=>600,8251=>600,8252=>600,8253=>600,8254=>600,8255=>600,8256=>600,8257=>600,8258=>600,8259=>600,8260=>600,8261=>600,8262=>600,8263=>600,8264=>600,8265=>600,8266=>600,8267=>600,8268=>600,8269=>600,8270=>600,8271=>600,8272=>600,8273=>600,8274=>600,8275=>600,8276=>600,8277=>600,8278=>600,8279=>600,8280=>600,8281=>600,8282=>600,8283=>600,8284=>600,8285=>600,8286=>600,8287=>600,8288=>600,8289=>600,8290=>600,8291=>600,8292=>600,8304=>600,8305=>600,8308=>600,8309=>600,8310=>600,8311=>600,8312=>600,8313=>600,8314=>600,8315=>600,8316=>600,8317=>600,8318=>600,8319=>600,8320=>600,8321=>600,8322=>600,8323=>600,8324=>600,8325=>600,8326=>600,8327=>600,8328=>600,8329=>600,8330=>600,8331=>600,8332=>600,8333=>600,8334=>600,8336=>600,8337=>600,8338=>600,8339=>600,8340=>600,8355=>600,8356=>600,8362=>600,8364=>600,8373=>600,8448=>600,8449=>600,8451=>600,8453=>600,8454=>600,8455=>600,8457=>600,8462=>600,8465=>600,8466=>600,8467=>600,8470=>600,8472=>600,8476=>600,8480=>600,8481=>600,8482=>600,8486=>600,8487=>600,8489=>600,8490=>600,8491=>600,8494=>600,8498=>600,8501=>600,8502=>600,8503=>600,8504=>600,8506=>600,8507=>600,8513=>600,8514=>600,8515=>600,8516=>600,8523=>600,8525=>600,8526=>600,8531=>600,8532=>600,8533=>600,8534=>600,8535=>600,8536=>600,8537=>600,8538=>600,8539=>600,8540=>600,8541=>600,8542=>600,8543=>600,8544=>600,8545=>600,8546=>600,8547=>600,8548=>600,8549=>600,8550=>600,8553=>600,8556=>600,8557=>600,8558=>600,8559=>600,8560=>600,8564=>600,8569=>600,8572=>600,8573=>600,8574=>600,8575=>600,8592=>600,8593=>600,8594=>600,8595=>600,8596=>600,8597=>600,8598=>600,8599=>600,8600=>600,8601=>600,8612=>600,8613=>600,8614=>600,8615=>600,8633=>600,8636=>600,8637=>600,8638=>600,8639=>600,8640=>600,8641=>600,8642=>600,8643=>600,8644=>600,8645=>600,8646=>600,8647=>600,8648=>600,8649=>600,8650=>600,8651=>600,8652=>600,8704=>600,8706=>600,8707=>600,8709=>600,8710=>600,8711=>600,8712=>600,8713=>600,8714=>600,8715=>600,8716=>600,8717=>600,8719=>600,8720=>600,8721=>600,8722=>600,8723=>600,8725=>600,8727=>600,8729=>600,8730=>600,8731=>600,8732=>600,8733=>600,8734=>600,8735=>600,8756=>600,8800=>600,8801=>600,8804=>600,8805=>600,8834=>600,8835=>600,8836=>600,8837=>600,8838=>600,8839=>600,8869=>600,8976=>600,9001=>600,9002=>600,9251=>600,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600,9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600,9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600,9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,9527=>600,9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600,9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600,9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600,9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600,9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,9607=>600,9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9632=>600,9633=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600,9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600,9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9673=>600,9674=>600,9675=>600,9677=>600,9679=>600,9680=>600,9681=>600,9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9712=>600,9713=>600,9714=>600,9715=>600,9716=>600,9717=>600,9718=>600,9719=>600,9735=>600,9736=>600,9737=>600,9776=>600,9777=>600,9778=>600,9779=>600,9780=>600,9781=>600,9782=>600,9783=>600,9785=>600,9786=>600,9787=>600,9824=>600,9825=>600,9826=>600,9827=>600,9828=>600,9829=>600,9830=>600,9831=>600,9833=>600,9834=>600,9835=>600,9836=>600,9837=>600,9838=>600,9839=>600,11799=>600,42888=>600,42889=>600,42890=>600,42891=>600,42892=>600,64256=>600,64257=>600,64258=>600,64285=>600,64287=>600,64288=>600,64298=>600,64299=>600,64300=>600,64301=>600,64302=>600,64303=>600,64304=>600,64305=>600,64306=>600,64307=>600,64308=>600,64309=>600,64310=>600,64312=>600,64313=>600,64314=>600,64315=>600,64316=>600,64318=>600,64320=>600,64321=>600,64323=>600,64324=>600,64326=>600,64327=>600,64328=>600,64329=>600,64330=>600,64331=>600,64332=>600,64333=>600,64334=>600,64335=>600,65533=>600,65535=>600);
+$cw=array(0=>600,32=>600,33=>600,34=>600,35=>600,36=>600,37=>600,38=>600,39=>600,40=>600,41=>600,42=>600,43=>600,44=>600,45=>600,46=>600,47=>600,48=>600,49=>600,50=>600,51=>600,52=>600,53=>600,54=>600,55=>600,56=>600,57=>600,58=>600,59=>600,60=>600,61=>600,62=>600,63=>600,64=>600,65=>600,66=>600,67=>600,68=>600,69=>600,70=>600,71=>600,72=>600,73=>600,74=>600,75=>600,76=>600,77=>600,78=>600,79=>600,80=>600,81=>600,82=>600,83=>600,84=>600,85=>600,86=>600,87=>600,88=>600,89=>600,90=>600,91=>600,92=>600,93=>600,94=>600,95=>600,96=>600,97=>600,98=>600,99=>600,100=>600,101=>600,102=>600,103=>600,104=>600,105=>600,106=>600,107=>600,108=>600,109=>600,110=>600,111=>600,112=>600,113=>600,114=>600,115=>600,116=>600,117=>600,118=>600,119=>600,120=>600,121=>600,122=>600,123=>600,124=>600,125=>600,126=>600,160=>600,161=>600,162=>600,163=>600,164=>600,165=>600,166=>600,167=>600,168=>600,169=>600,170=>600,171=>600,172=>600,173=>600,174=>600,175=>600,176=>600,177=>600,178=>600,179=>600,180=>600,181=>600,182=>600,183=>600,184=>600,185=>600,186=>600,187=>600,188=>600,189=>600,190=>600,191=>600,192=>600,193=>600,194=>600,195=>600,196=>600,197=>600,198=>600,199=>600,200=>600,201=>600,202=>600,203=>600,204=>600,205=>600,206=>600,207=>600,208=>600,209=>600,210=>600,211=>600,212=>600,213=>600,214=>600,215=>600,216=>600,217=>600,218=>600,219=>600,220=>600,221=>600,222=>600,223=>600,224=>600,225=>600,226=>600,227=>600,228=>600,229=>600,230=>600,231=>600,232=>600,233=>600,234=>600,235=>600,236=>600,237=>600,238=>600,239=>600,240=>600,241=>600,242=>600,243=>600,244=>600,245=>600,246=>600,247=>600,248=>600,249=>600,250=>600,251=>600,252=>600,253=>600,254=>600,255=>600,256=>600,257=>600,258=>600,259=>600,260=>600,261=>600,262=>600,263=>600,264=>600,265=>600,266=>600,267=>600,268=>600,269=>600,270=>600,271=>600,272=>600,273=>600,274=>600,275=>600,276=>600,277=>600,278=>600,279=>600,280=>600,281=>600,282=>600,283=>600,284=>600,285=>600,286=>600,287=>600,288=>600,289=>600,290=>600,291=>600,292=>600,293=>600,294=>600,295=>600,296=>600,297=>600,298=>600,299=>600,300=>600,301=>600,302=>600,303=>600,304=&