Download all as ZIP, adjust layout on resize
This commit is contained in:
1 parent
1600506545
commit
3aa5f98b64
7 files changed
+335
-25
No files matched your search
@@ -10,10 +10,10 @@
|
||||
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
|
||||
#define BOARD_SETHI 20 // Sethi 3D_1
|
||||
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
|
||||
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
|
||||
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
|
||||
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
|
||||
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
|
||||
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Extruder, Fan, Bed)
|
||||
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Bed)
|
||||
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Extruder, Fan, Fan)
|
||||
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Extruder0, Extruder1, Fan)
|
||||
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
|
||||
#define BOARD_GEN6 5 // Gen6
|
||||
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
|
||||
@@ -28,8 +28,8 @@
|
||||
#define BOARD_ULTIMAKER 7 // Ultimaker
|
||||
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
|
||||
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
|
||||
#define BOARD_3DRAG 77 // 3Drag Controller
|
||||
#define BOARD_K8200 78 // Vellemann K8200 Controller (derived from 3Drag Controller)
|
||||
#define BOARD_3DRAG 77 // 3Drag
|
||||
#define BOARD_K8200 78 // Vellemann K8200 (derived from 3Drag)
|
||||
#define BOARD_TEENSYLU 8 // Teensylu
|
||||
#define BOARD_RUMBA 80 // Rumba
|
||||
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
#ifndef LANGUAGE_H
|
||||
#define LANGUAGE_H
|
||||
|
||||
#include "Configuration.h"
|
||||
|
||||
#define LANGUAGE_CONCAT(M) #M
|
||||
#define GENERATE_LANGUAGE_INCLUDE(M) LANGUAGE_CONCAT(language_##M.h)
|
||||
|
||||
|
||||
// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
|
||||
//
|
||||
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h"
|
||||
// ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
|
||||
|
||||
// Languages
|
||||
// en English
|
||||
// pl Polish
|
||||
// fr French
|
||||
// de German
|
||||
// es Spanish
|
||||
// ru Russian
|
||||
// it Italian
|
||||
// pt Portuguese
|
||||
// pt-br Portuguese (Brazil)
|
||||
// fi Finnish
|
||||
// an Aragonese
|
||||
// nl Dutch
|
||||
// ca Catalan
|
||||
// eu Basque-Euskera
|
||||
|
||||
#ifndef LANGUAGE_INCLUDE
|
||||
// pick your language from the list above
|
||||
#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
|
||||
#endif
|
||||
|
||||
#define PROTOCOL_VERSION "1.0"
|
||||
#define FIRMWARE_URL "https://github.com/MarlinFirmware/Marlin"
|
||||
|
||||
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
|
||||
#define MACHINE_NAME "Ultimaker"
|
||||
#define FIRMWARE_URL "http://firmware.ultimaker.com"
|
||||
#elif MB(RUMBA)
|
||||
#define MACHINE_NAME "Rumba"
|
||||
#elif MB(3DRAG)
|
||||
#define MACHINE_NAME "3Drag"
|
||||
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
|
||||
#elif MB(K8200)
|
||||
#define MACHINE_NAME "K8200"
|
||||
#elif MB(5DPRINT)
|
||||
#define MACHINE_NAME "Makibox"
|
||||
#elif MB(SAV_MKI)
|
||||
#define MACHINE_NAME "SAV MkI"
|
||||
#define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
|
||||
#elif MB(WITBOX)
|
||||
#define MACHINE_NAME "WITBOX"
|
||||
#define FIRMWARE_URL "http://www.bq.com/gb/downloads-witbox.html"
|
||||
#elif MB(HEPHESTOS)
|
||||
#define MACHINE_NAME "HEPHESTOS"
|
||||
#define FIRMWARE_URL "http://www.bq.com/gb/downloads-prusa-i3-hephestos.html"
|
||||
#else // Default firmware set to Mendel
|
||||
#define MACHINE_NAME "Mendel"
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOM_MENDEL_NAME
|
||||
#define MACHINE_NAME CUSTOM_MENDEL_NAME
|
||||
#endif
|
||||
|
||||
#ifndef MACHINE_UUID
|
||||
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
|
||||
#endif
|
||||
|
||||
|
||||
#define STRINGIFY_(n) #n
|
||||
#define STRINGIFY(n) STRINGIFY_(n)
|
||||
|
||||
|
||||
// Common LCD messages
|
||||
|
||||
/* nothing here yet */
|
||||
|
||||
// Common serial messages
|
||||
#define MSG_MARLIN "Marlin"
|
||||
|
||||
// Serial Console Messages (do not translate those!)
|
||||
|
||||
#define MSG_Enqueing "enqueing \""
|
||||
#define MSG_POWERUP "PowerUp"
|
||||
#define MSG_EXTERNAL_RESET " External Reset"
|
||||
#define MSG_BROWNOUT_RESET " Brown out Reset"
|
||||
#define MSG_WATCHDOG_RESET " Watchdog Reset"
|
||||
#define MSG_SOFTWARE_RESET " Software Reset"
|
||||
#define MSG_AUTHOR " | Author: "
|
||||
#define MSG_CONFIGURATION_VER " Last Updated: "
|
||||
#define MSG_FREE_MEMORY " Free Memory: "
|
||||
#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
#define MSG_OK "ok"
|
||||
#define MSG_FILE_SAVED "Done saving file."
|
||||
#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
|
||||
#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
|
||||
#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
|
||||
#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line: "
|
||||
#define MSG_FILE_PRINTED "Done printing file"
|
||||
#define MSG_BEGIN_FILE_LIST "Begin file list"
|
||||
#define MSG_END_FILE_LIST "End file list"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
|
||||
#define MSG_M200_INVALID_EXTRUDER "M200 Invalid extruder "
|
||||
#define MSG_M218_INVALID_EXTRUDER "M218 Invalid extruder "
|
||||
#define MSG_M221_INVALID_EXTRUDER "M221 Invalid extruder "
|
||||
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
|
||||
#define MSG_HEATING "Heating..."
|
||||
#define MSG_HEATING_COMPLETE "Heating done."
|
||||
#define MSG_BED_HEATING "Bed Heating."
|
||||
#define MSG_BED_DONE "Bed done."
|
||||
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
|
||||
#define MSG_COUNT_X " Count X: "
|
||||
#define MSG_ERR_KILLED "Printer halted. kill() called!"
|
||||
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
|
||||
#define MSG_RESEND "Resend: "
|
||||
#define MSG_UNKNOWN_COMMAND "Unknown command: \""
|
||||
#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_X_MIN "x_min: "
|
||||
#define MSG_X_MAX "x_max: "
|
||||
#define MSG_Y_MIN "y_min: "
|
||||
#define MSG_Y_MAX "y_max: "
|
||||
#define MSG_Z_MIN "z_min: "
|
||||
#define MSG_Z_MAX "z_max: "
|
||||
#define MSG_M119_REPORT "Reporting endstop status"
|
||||
#define MSG_ENDSTOP_HIT "TRIGGERED"
|
||||
#define MSG_ENDSTOP_OPEN "open"
|
||||
#define MSG_HOTEND_OFFSET "Hotend offsets:"
|
||||
|
||||
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
|
||||
#define MSG_SD_INIT_FAIL "SD init fail"
|
||||
#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
|
||||
#define MSG_SD_OPENROOT_FAIL "openRoot failed"
|
||||
#define MSG_SD_CARD_OK "SD card ok"
|
||||
#define MSG_SD_WORKDIR_FAIL "workDir open failed"
|
||||
#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
|
||||
#define MSG_SD_FILE_OPENED "File opened: "
|
||||
#define MSG_SD_SIZE " Size: "
|
||||
#define MSG_SD_FILE_SELECTED "File selected"
|
||||
#define MSG_SD_WRITE_TO_FILE "Writing to file: "
|
||||
#define MSG_SD_PRINTING_BYTE "SD printing byte "
|
||||
#define MSG_SD_NOT_PRINTING "Not SD printing"
|
||||
#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
|
||||
#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
|
||||
|
||||
#define MSG_STEPPER_TOO_HIGH "Steprate too high: "
|
||||
#define MSG_ENDSTOPS_HIT "endstops hit: "
|
||||
#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
|
||||
#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
|
||||
#define MSG_BABYSTEPPING_X "Babystepping X"
|
||||
#define MSG_BABYSTEPPING_Y "Babystepping Y"
|
||||
#define MSG_BABYSTEPPING_Z "Babystepping Z"
|
||||
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Error in menu structure"
|
||||
|
||||
#define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
|
||||
|
||||
// LCD Menu Messages
|
||||
|
||||
// Add your own character. Reference: https://github.com/MarlinFirmware/Marlin/pull/1434 photos
|
||||
// and https://www.sparkfun.com/datasheets/LCD/HD44780.pdf page 17-18
|
||||
#ifdef DOGLCD
|
||||
#define STR_Ae "\304" // 'Ä' U8glib
|
||||
#define STR_ae "\344" // 'ä'
|
||||
#define STR_Oe "\326" // 'Ö'
|
||||
#define STR_oe STR_Oe // 'ö'
|
||||
#define STR_Ue "\334" // 'Ü'
|
||||
#define STR_ue STR_Ue // 'ü'
|
||||
#define STR_sz "\337" // 'ß'
|
||||
#define STR_h2 "\262" // '²'
|
||||
#define STR_h3 "\263" // '³'
|
||||
#define STR_Deg "\260" // '°'
|
||||
#define STR_THERMOMETER "\377"
|
||||
#else
|
||||
#ifdef DISPLAY_CHARSET_HD44780_JAPAN // HD44780 ROM Code: A00 (Japan)
|
||||
#define STR_ae "\xe1"
|
||||
#define STR_Ae STR_ae
|
||||
#define STR_oe "\357"
|
||||
#define STR_Oe STR_oe
|
||||
#define STR_ue "\365"
|
||||
#define STR_Ue STR_ue
|
||||
#define STR_sz "\342"
|
||||
#define STR_h2 "2"
|
||||
#define STR_h3 "3"
|
||||
#define STR_Deg "\271"
|
||||
#define STR_THERMOMETER "\002"
|
||||
#endif
|
||||
#ifdef DISPLAY_CHARSET_HD44780_WESTERN // HD44780 ROM Code: A02 (Western)
|
||||
#define STR_Ae "\216"
|
||||
#define STR_ae "\204"
|
||||
#define STR_Oe "\211"
|
||||
#define STR_oe "\204"
|
||||
#define STR_Ue "\212"
|
||||
#define STR_ue "\201"
|
||||
#define STR_sz "\160"
|
||||
#define STR_h2 "\262"
|
||||
#define STR_h3 "\263"
|
||||
#define STR_Deg "\337"
|
||||
#define STR_THERMOMETER "\002"
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
#define TESTSTRING000 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
|
||||
#define TESTSTRING020 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
|
||||
#define TESTSTRING040 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
|
||||
#define TESTSTRING060 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
|
||||
#define TESTSTRING100 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
|
||||
#define TESTSTRING120 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
|
||||
#define TESTSTRING140 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
|
||||
#define TESTSTRING160 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
|
||||
#define TESTSTRING200 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
|
||||
#define TESTSTRING220 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
|
||||
#define TESTSTRING240 "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
|
||||
#define TESTSTRING260 "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
|
||||
#define TESTSTRING300 "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
|
||||
#define TESTSTRING320 "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
|
||||
#define TESTSTRING340 "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
|
||||
#define TESTSTRING360 "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
|
||||
*/
|
||||
|
||||
#include LANGUAGE_INCLUDE
|
||||
#include "language_en.h"
|
||||
|
||||
#endif //__LANGUAGE_H
|
||||
@@ -23,8 +23,8 @@ pre {
|
||||
|
||||
body { margin: 0; padding: 0; background: #56A; color: #000; font-family: monospace; }
|
||||
#main {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
max-width: 1100px;
|
||||
margin: 0 auto 10px;
|
||||
padding: 0 2%; width: 96%;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,10 @@ h1, h2, h3, h4, h5, h6 { clear: both; }
|
||||
|
||||
h1, p.info { font-family: sans-serif; }
|
||||
h1 {
|
||||
background: transparent url(logo.png) right top no-repeat;
|
||||
height: 38px;
|
||||
margin-bottom: -30px;
|
||||
color: #FFF;
|
||||
background: transparent url(logo.png) right top no-repeat;
|
||||
}
|
||||
p.info { padding: 0; color: #000; }
|
||||
p.info span { color: #800; }
|
||||
@@ -72,7 +73,8 @@ img { display: none; }
|
||||
padding: 6px 20px 20px;
|
||||
color: #000;
|
||||
position: relative;
|
||||
border-top-right-radius: 1.5em;
|
||||
border-radius: 1.5em;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
fieldset {
|
||||
height: 16.1em;
|
||||
@@ -235,7 +237,7 @@ h2 {
|
||||
|
||||
/* Disclosure Widget */
|
||||
|
||||
span.disclose, a.download {︎
|
||||
span.disclose, a.download, a.download-all {︎
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 12px;
|
||||
@@ -278,7 +280,7 @@ span.disclose.closed.almost {
|
||||
|
||||
/* Download Button */
|
||||
|
||||
a.download {
|
||||
a.download, a.download-all {
|
||||
visibility: hidden;
|
||||
padding: 2px;
|
||||
border: 1px solid #494;
|
||||
@@ -291,8 +293,9 @@ a.download {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.download-all { margin: 9px 2em 0; color: #449; border-color: #449; }
|
||||
|
||||
@media all and (min-width: 1100px) {
|
||||
@media all and (min-width: 1140px) {
|
||||
|
||||
#main { max-width: 10000px; }
|
||||
|
||||
@@ -301,4 +304,7 @@ a.download {
|
||||
#config_text, #config_adv_text { float: right; clear: right; width: 45%; }
|
||||
|
||||
pre.config { height: 20em; }
|
||||
|
||||
.disclose { display: none; }
|
||||
|
||||
}
|
||||
@@ -7,6 +7,8 @@
|
||||
<script src="js/jquery-2.1.3.min.js"></script>
|
||||
<script src="js/binarystring.js"></script>
|
||||
<script src="js/binaryfileuploader.js"></script>
|
||||
<script src="js/FileSaver.min.js"></script>
|
||||
<script src="js/jszip.min.js"></script>
|
||||
<script src="js/jcanvas.js"></script>
|
||||
<script src="js/jstepper.js"></script>
|
||||
<script src="js/configurator.js"></script>
|
||||
@@ -26,7 +28,7 @@
|
||||
|
||||
<label>Drop Files Here:</label><input type="file" id="file-upload" />
|
||||
<label id="tipson"><input type="checkbox" checked /> ?</label>
|
||||
<br class="clear" />
|
||||
<a href="" class="download-all">Download Zip</a>
|
||||
|
||||
<fieldset id="machine">
|
||||
<legend>Machine</legend>
|
||||
@@ -89,6 +91,10 @@
|
||||
<legend>Extras</legend>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="info">
|
||||
<legend>Info</legend>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="more">
|
||||
<legend>More…</legend>
|
||||
</fieldset>
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
||||
var saveAs=saveAs||typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(view){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=doc.createEvent("MouseEvents");event.initMouseEvent("click",true,false,view,0,0,0,0,0,false,false,false,false,0,null);node.dispatchEvent(event)},webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){if(typeof file==="string"){get_URL().revokeObjectURL(file)}else{file.remove()}};if(view.chrome){revoker()}else{setTimeout(revoker,arbitrary_revoke_timeout)}},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);var i=event_types.length;while(i--){var listener=filesaver["on"+event_types[i]];if(typeof listener==="function"){try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}}},FileSaver=function(blob,name){var filesaver=this,type=blob.type,blob_changed=false,object_url,target_view,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(blob_changed||!object_url){object_url=get_URL().createObjectURL(blob)}if(target_view){target_view.location.href=object_url}else{var new_tab=view.open(object_url,"_blank");if(new_tab==undefined&&typeof safari!=="undefined"){view.location.href=object_url}}filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE){return func.apply(this,arguments)}}},create_if_not_found={create:true,exclusive:false},slice;filesaver.readyState=filesaver.INIT;if(!name){name="download"}if(can_use_save_link){object_url=get_URL().createObjectURL(blob);save_link.href=object_url;save_link.download=name;click(save_link);filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url);return}if(view.chrome&&type&&type!==force_saveable_type){slice=blob.slice||blob.webkitSlice;blob=slice.call(blob,0,blob.size,force_saveable_type);blob_changed=true}if(webkit_req_fs&&name!=="download"){name+=".download"}if(type===force_saveable_type||webkit_req_fs){target_view=view}if(!req_fs){fs_error();return}fs_min_size+=blob.size;req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL();filesaver.readyState=filesaver.DONE;dispatch(filesaver,"writeend",event);revoke(file)};writer.onerror=function(){var error=writer.error;if(error.code!==error.ABORT_ERR){fs_error()}};"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]});writer.write(blob);filesaver.abort=function(){writer.abort();filesaver.readyState=filesaver.DONE};filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:false},abortable(function(file){file.remove();save()}),abortable(function(ex){if(ex.code===ex.NOT_FOUND_ERR){save()}else{fs_error()}}))}),fs_error)}),fs_error)},FS_proto=FileSaver.prototype,saveAs=function(blob,name){return new FileSaver(blob,name)};FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE;dispatch(filesaver,"abort")};FS_proto.readyState=FS_proto.INIT=0;FS_proto.WRITING=1;FS_proto.DONE=2;FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null;return saveAs}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})}
|
||||
@@ -140,8 +140,8 @@ var configuratorApp = (function(){
|
||||
$msgbox = $('#message'),
|
||||
$form = $('#config_form'),
|
||||
$tooltip = $('#tooltip'),
|
||||
$config = $('#config_text pre'),
|
||||
$config_adv = $('#config_adv_text pre'),
|
||||
$cfg = $('#config_text'), $adv = $('#config_adv_text'),
|
||||
$config = $cfg.find('pre'), $config_adv = $adv.find('pre'),
|
||||
define_list = [[],[]],
|
||||
define_section = {},
|
||||
boards_list = {},
|
||||
@@ -186,11 +186,8 @@ var configuratorApp = (function(){
|
||||
: $pre.slideUp(200, didAnim);
|
||||
});
|
||||
|
||||
// Fix the config boxes on the screen (in wide style)
|
||||
$(window).bind('scroll resize', function(){
|
||||
var $cfg = $('#config_text'), wtop = $(window).scrollTop(), ctop = $cfg.offset().top;
|
||||
$cfg.css({ paddingTop: ctop < $form.offset().top+100 && wtop > ctop ? wtop-ctop : 0 });
|
||||
});
|
||||
// Adjust the form layout for the window size
|
||||
$(window).bind('scroll resize', this.adjustFormLayout).trigger('resize');
|
||||
|
||||
// Read boards.h, Configuration.h, Configuration_adv.h
|
||||
var ajax_count = 0, success_count = 0;
|
||||
@@ -286,6 +283,28 @@ var configuratorApp = (function(){
|
||||
.css({visibility:'visible'});
|
||||
},
|
||||
|
||||
/**
|
||||
* Make the download-all link visible and active
|
||||
*/
|
||||
activateDownloadAllLink: function() {
|
||||
$('.download-all')
|
||||
.unbind('mouseover click')
|
||||
.mouseover(function() {
|
||||
var d = new Date(), fn = d.fileStamp('MarlinConfig.zip');
|
||||
$(this).attr({ download:fn, href:'download:'+fn, title:'download:'+fn });
|
||||
})
|
||||
.click(function(){
|
||||
var $button = $(this);
|
||||
var zip = new JSZip();
|
||||
zip.file(config_file, $config.text());
|
||||
zip.file(config_adv_file, $config_adv.text());
|
||||
var zipped = zip.generate({type:'blob'});
|
||||
saveAs(zipped, $button.attr('download'));
|
||||
return false;
|
||||
})
|
||||
.css({visibility:'visible'});
|
||||
},
|
||||
|
||||
/**
|
||||
* Init the boards array from a boards.h file
|
||||
*/
|
||||
@@ -316,8 +335,8 @@ var configuratorApp = (function(){
|
||||
* Get all the unique define names
|
||||
*/
|
||||
updateDefinesFromText: function(index, txt) {
|
||||
var section = 'machine',
|
||||
leave_out_defines = ['CONFIGURATION_H', 'CONFIGURATION_ADV_H', 'STRING_VERSION', 'STRING_URL', 'STRING_VERSION_CONFIG_H', 'STRING_CONFIG_H_AUTHOR', 'STRING_SPLASH_LINE1', 'STRING_SPLASH_LINE2'],
|
||||
var section = 'hidden',
|
||||
leave_out_defines = ['CONFIGURATION_H', 'CONFIGURATION_ADV_H'],
|
||||
define_sect = {},
|
||||
r, findDef = new RegExp('(@section|#define)[ \\t]+(\\w+)', 'gm');
|
||||
while((r = findDef.exec(txt)) !== null) {
|
||||
@@ -426,6 +445,8 @@ var configuratorApp = (function(){
|
||||
// this.initThermistorsFromText(txt);
|
||||
init_index = 0;
|
||||
has_config = true;
|
||||
if (has_config_adv)
|
||||
this.activateDownloadAllLink();
|
||||
}
|
||||
else {
|
||||
err = boards_file;
|
||||
@@ -437,6 +458,8 @@ var configuratorApp = (function(){
|
||||
total_config_adv_lines = txt.lineCount();
|
||||
init_index = 1;
|
||||
has_config_adv = true;
|
||||
if (has_config)
|
||||
this.activateDownloadAllLink();
|
||||
}
|
||||
else {
|
||||
err = config_file;
|
||||
@@ -448,8 +471,14 @@ var configuratorApp = (function(){
|
||||
var adv = init_index == 1;
|
||||
this.purgeAddedFields(init_index);
|
||||
this.updateDefinesFromText(init_index, txt);
|
||||
// TODO: Find sequential names and group them
|
||||
// Allows related settings to occupy one line in the form
|
||||
// this.refreshSequentialDefines();
|
||||
// TODO: Get dependent groups (#ifdef's) from text
|
||||
// Allows parent to hide/show or disable/enable dependent fields!
|
||||
// this.refreshDependentGroups(); // (from all config text)
|
||||
this.createFieldsForDefines(adv);
|
||||
this.refreshConfigForm(init_index);
|
||||
this.refreshConfigForm(init_index); // TODO: <-- hide dependent fields
|
||||
this.activateDownloadLink(adv);
|
||||
}
|
||||
this.setMessage(err
|
||||
@@ -1019,7 +1048,11 @@ var configuratorApp = (function(){
|
||||
clearInterval(err.pulser);
|
||||
}
|
||||
}, 50);
|
||||
$err.click(function(e) { $(this).remove(); return false; }).css({cursor:'pointer'});
|
||||
$err.click(function(e) {
|
||||
$(this).remove();
|
||||
self.adjustFormLayout();
|
||||
return false;
|
||||
}).css({cursor:'pointer'});
|
||||
}
|
||||
else {
|
||||
$msgbox.find('p.error, p.warning').each(function() {
|
||||
@@ -1028,6 +1061,27 @@ var configuratorApp = (function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
self.adjustFormLayout();
|
||||
},
|
||||
|
||||
adjustFormLayout: function() {
|
||||
var wtop = $(window).scrollTop(),
|
||||
ctop = $cfg.offset().top,
|
||||
thresh = $form.offset().top+100;
|
||||
if (ctop < thresh) {
|
||||
var maxhi = $form.height(); // pad plus heights of config boxes can't be more than this
|
||||
var pad = wtop > ctop ? wtop-ctop : 0; // pad the top box to stay in view
|
||||
var innerpad = Math.ceil($cfg.height() - $cfg.find('pre').height());
|
||||
// height to use for the inner boxes
|
||||
var hi = ($(window).height() - ($cfg.offset().top - pad) + wtop - innerpad)/2;
|
||||
if (hi < 200) hi = 200;
|
||||
$cfg.css({ paddingTop: pad });
|
||||
var $pre = $('pre.config');
|
||||
$pre.css({ height: Math.floor(hi) - $pre.position().top });
|
||||
}
|
||||
else {
|
||||
$cfg.css({ paddingTop: wtop > ctop ? wtop-ctop : 0, height: '' });
|
||||
}
|
||||
},
|
||||
|
||||
setRequestError: function(stat, path) {
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
/*!
|
||||
|
||||
JSZip - A Javascript class for generating and reading zip files
|
||||
<http://stuartk.com/jszip>
|
||||
|
||||
(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
|
||||
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
|
||||
|
||||
JSZip uses the library pako released under the MIT license :
|
||||
https://github.com/nodeca/pako/blob/master/LICENSE
|
||||
*/
|
||||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use
Line truncated
|
||||
};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320Line truncated
|
||||
if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.hLine truncated
|
||||
Reference in new issue
Block a user