├── .gitignore ├── .mbed ├── LICENSE ├── README.md ├── build-demos.bat ├── build-demos.sh ├── build-tools ├── build-application.js ├── build-libmbed.js └── helpers.js ├── cli.js ├── demos ├── bd │ └── main.cpp ├── blinky │ └── main.cpp ├── busout │ └── main.cpp ├── coap │ └── main.cpp ├── events │ └── main.cpp ├── http │ └── main.cpp ├── https │ └── main.cpp ├── interrupts │ └── main.cpp ├── lcd │ ├── main.cpp │ └── simconfig.json ├── lorawan-abp │ ├── main.cpp │ └── simconfig.json ├── lorawan │ ├── main.cpp │ └── simconfig.json ├── ntp │ └── main.cpp ├── peliondm │ ├── .gitignore │ ├── main.cpp │ └── update_default_resources.c ├── pwmout │ ├── main.cpp │ └── simconfig.json ├── tcpsocket-async │ └── main.cpp ├── tcpsocket │ └── main.cpp ├── temperature │ ├── main.cpp │ └── simconfig.json ├── tlssocket │ └── main.cpp ├── touchscreen │ ├── main.cpp │ └── simconfig.json └── trace │ └── main.cpp ├── docs ├── architecture.md ├── debugging.md ├── fs.md ├── pelion.md ├── peripherals.md └── simconfig.md ├── img ├── chrome1.png ├── firefox1.png └── simulator.png ├── mbed-simulator-hal ├── .simignore ├── MQTT.lib ├── MQTTNetwork │ └── MQTTNetwork.h ├── easy-connect │ ├── EthInterface.cpp │ ├── EthernetInterface.cpp │ ├── EthernetInterface.h │ ├── easy-connect.cpp │ └── easy-connect.h ├── lora-radio-drv │ ├── SX1272_LoRaRadio.h │ ├── SX1276_LoRaRadio.cpp │ └── SX1276_LoRaRadio.h ├── mbed-http.lib ├── mbed-os.lib ├── mcc │ └── mbed_shared_queues.cpp ├── pelion-dm │ ├── arm_hal_timer.cpp │ ├── mbed_cloud_client_user_config.h │ ├── pal_plat_fileSystem.c │ ├── pal_plat_rtos.cpp │ └── storage_helper │ │ ├── storage_helper.cpp │ │ └── storage_helper.h ├── peripherals │ ├── BSP_DISCO_F413ZH │ │ ├── Drivers │ │ │ └── BSP │ │ │ │ ├── Components │ │ │ │ ├── Common │ │ │ │ │ ├── accelero.h │ │ │ │ │ ├── audio.h │ │ │ │ │ ├── camera.h │ │ │ │ │ ├── epd.h │ │ │ │ │ ├── gyro.h │ │ │ │ │ ├── idd.h │ │ │ │ │ ├── io.h │ │ │ │ │ ├── lcd.h │ │ │ │ │ ├── magneto.h │ │ │ │ │ ├── ts.h │ │ │ │ │ └── tsensor.h │ │ │ │ ├── ft6x06 │ │ │ │ │ ├── ft6x06.c │ │ │ │ │ └── ft6x06.h │ │ │ │ ├── n25q128a │ │ │ │ │ └── n25q128a.h │ │ │ │ ├── st7789h2 │ │ │ │ │ ├── st7789h2.c │ │ │ │ │ └── st7789h2.h │ │ │ │ └── wm8994 │ │ │ │ │ ├── wm8994.c │ │ │ │ │ └── wm8994.h │ │ │ │ └── STM32F413H-Discovery │ │ │ │ ├── stm32f413h_discovery.c │ │ │ │ ├── stm32f413h_discovery.h │ │ │ │ ├── stm32f413h_discovery_lcd.c │ │ │ │ ├── stm32f413h_discovery_lcd.h │ │ │ │ ├── stm32f413h_discovery_ts.c │ │ │ │ └── stm32f413h_discovery_ts.h │ │ ├── Utilities │ │ │ └── Fonts │ │ │ │ ├── font12.c │ │ │ │ ├── font16.c │ │ │ │ ├── font20.c │ │ │ │ ├── font24.c │ │ │ │ ├── font8.c │ │ │ │ └── fonts.h │ │ ├── js-hal │ │ │ └── st7789h2_ft6x06.js │ │ └── js-ui │ │ │ └── st7789h2_ft6x06.js │ ├── C12832 │ │ ├── C12832.cpp │ │ ├── C12832.h │ │ ├── GraphicsDisplay.cpp │ │ ├── GraphicsDisplay.h │ │ ├── Small_7.h │ │ ├── TextDisplay.cpp │ │ ├── TextDisplay.h │ │ ├── js-hal │ │ │ └── C12832.js │ │ └── js-ui │ │ │ └── C12832.js │ └── Sht31 │ │ ├── Sht31.cpp │ │ ├── Sht31.h │ │ ├── js-hal │ │ └── sht31.js │ │ └── js-ui │ │ └── sht31.js ├── simblockdevice │ ├── SimulatorBlockDevice.cpp │ └── SimulatorBlockDevice.h ├── simple-mbed-cloud-client.lib └── simulator_mbedtls_config.h ├── out └── placeholder ├── package.json ├── server.js ├── server ├── compile.js ├── get_ips.js └── launch-server.js └── viewer ├── ace ├── ace.js ├── ext-beautify.js ├── ext-chromevox.js ├── ext-elastic_tabstops_lite.js ├── ext-emmet.js ├── ext-error_marker.js ├── ext-keybinding_menu.js ├── ext-language_tools.js ├── ext-linking.js ├── ext-modelist.js ├── ext-old_ie.js ├── ext-searchbox.js ├── ext-settings_menu.js ├── ext-spellcheck.js ├── ext-split.js ├── ext-static_highlight.js ├── ext-statusbar.js ├── ext-textarea.js ├── ext-themelist.js ├── ext-whitespace.js ├── keybinding-emacs.js ├── keybinding-vim.js ├── mode-abap.js ├── mode-abc.js ├── mode-actionscript.js ├── mode-ada.js ├── mode-apache_conf.js ├── mode-applescript.js ├── mode-asciidoc.js ├── mode-assembly_x86.js ├── mode-autohotkey.js ├── mode-batchfile.js ├── mode-bro.js ├── mode-c9search.js ├── mode-c_cpp.js ├── mode-cirru.js ├── mode-clojure.js ├── mode-cobol.js ├── mode-coffee.js ├── mode-coldfusion.js ├── mode-csharp.js ├── mode-csound_document.js ├── mode-csound_orchestra.js ├── mode-csound_score.js ├── mode-css.js ├── mode-curly.js ├── mode-d.js ├── mode-dart.js ├── mode-diff.js ├── mode-django.js ├── mode-dockerfile.js ├── mode-dot.js ├── mode-drools.js ├── mode-eiffel.js ├── mode-ejs.js ├── mode-elixir.js ├── mode-elm.js ├── mode-erlang.js ├── mode-forth.js ├── mode-fortran.js ├── mode-ftl.js ├── mode-gcode.js ├── mode-gherkin.js ├── mode-gitignore.js ├── mode-glsl.js ├── mode-gobstones.js ├── mode-golang.js ├── mode-graphqlschema.js ├── mode-groovy.js ├── mode-haml.js ├── mode-handlebars.js ├── mode-haskell.js ├── mode-haskell_cabal.js ├── mode-haxe.js ├── mode-hjson.js ├── mode-html.js ├── mode-html_elixir.js ├── mode-html_ruby.js ├── mode-ini.js ├── mode-io.js ├── mode-jack.js ├── mode-jade.js ├── mode-java.js ├── mode-javascript.js ├── mode-json.js ├── mode-jsoniq.js ├── mode-jsp.js ├── mode-jssm.js ├── mode-jsx.js ├── mode-julia.js ├── mode-kotlin.js ├── mode-latex.js ├── mode-lean.js ├── mode-less.js ├── mode-liquid.js ├── mode-lisp.js ├── mode-live_script.js ├── mode-livescript.js ├── mode-logiql.js ├── mode-lsl.js ├── mode-lua.js ├── mode-luapage.js ├── mode-lucene.js ├── mode-makefile.js ├── mode-markdown.js ├── mode-mask.js ├── mode-matlab.js ├── mode-maze.js ├── mode-mel.js ├── mode-mips_assembler.js ├── mode-mipsassembler.js ├── mode-mushcode.js ├── mode-mysql.js ├── mode-nix.js ├── mode-nsis.js ├── mode-objectivec.js ├── mode-ocaml.js ├── mode-pascal.js ├── mode-perl.js ├── mode-pgsql.js ├── mode-php.js ├── mode-pig.js ├── mode-plain_text.js ├── mode-powershell.js ├── mode-praat.js ├── mode-prolog.js ├── mode-properties.js ├── mode-protobuf.js ├── mode-python.js ├── mode-r.js ├── mode-razor.js ├── mode-rdoc.js ├── mode-red.js ├── mode-rhtml.js ├── mode-rst.js ├── mode-ruby.js ├── mode-rust.js ├── mode-sass.js ├── mode-scad.js ├── mode-scala.js ├── mode-scheme.js ├── mode-scss.js ├── mode-sh.js ├── mode-sjs.js ├── mode-smarty.js ├── mode-snippets.js ├── mode-soy_template.js ├── mode-space.js ├── mode-sparql.js ├── mode-sql.js ├── mode-sqlserver.js ├── mode-stylus.js ├── mode-svg.js ├── mode-swift.js ├── mode-swig.js ├── mode-tcl.js ├── mode-tex.js ├── mode-text.js ├── mode-textile.js ├── mode-toml.js ├── mode-tsx.js ├── mode-turtle.js ├── mode-twig.js ├── mode-typescript.js ├── mode-vala.js ├── mode-vbscript.js ├── mode-velocity.js ├── mode-verilog.js ├── mode-vhdl.js ├── mode-wollok.js ├── mode-xml.js ├── mode-xquery.js ├── mode-yaml.js ├── snippets │ ├── abap.js │ ├── abc.js │ ├── actionscript.js │ ├── ada.js │ ├── apache_conf.js │ ├── applescript.js │ ├── asciidoc.js │ ├── assembly_x86.js │ ├── autohotkey.js │ ├── batchfile.js │ ├── bro.js │ ├── c9search.js │ ├── c_cpp.js │ ├── cirru.js │ ├── clojure.js │ ├── cobol.js │ ├── coffee.js │ ├── coldfusion.js │ ├── csharp.js │ ├── csound_document.js │ ├── csound_orchestra.js │ ├── csound_score.js │ ├── css.js │ ├── curly.js │ ├── d.js │ ├── dart.js │ ├── diff.js │ ├── django.js │ ├── dockerfile.js │ ├── dot.js │ ├── drools.js │ ├── eiffel.js │ ├── ejs.js │ ├── elixir.js │ ├── elm.js │ ├── erlang.js │ ├── forth.js │ ├── fortran.js │ ├── ftl.js │ ├── gcode.js │ ├── gherkin.js │ ├── gitignore.js │ ├── glsl.js │ ├── gobstones.js │ ├── golang.js │ ├── graphqlschema.js │ ├── groovy.js │ ├── haml.js │ ├── handlebars.js │ ├── haskell.js │ ├── haskell_cabal.js │ ├── haxe.js │ ├── hjson.js │ ├── html.js │ ├── html_elixir.js │ ├── html_ruby.js │ ├── ini.js │ ├── io.js │ ├── jack.js │ ├── jade.js │ ├── java.js │ ├── javascript.js │ ├── json.js │ ├── jsoniq.js │ ├── jsp.js │ ├── jssm.js │ ├── jsx.js │ ├── julia.js │ ├── kotlin.js │ ├── latex.js │ ├── lean.js │ ├── less.js │ ├── liquid.js │ ├── lisp.js │ ├── live_script.js │ ├── livescript.js │ ├── logiql.js │ ├── lsl.js │ ├── lua.js │ ├── luapage.js │ ├── lucene.js │ ├── makefile.js │ ├── markdown.js │ ├── mask.js │ ├── matlab.js │ ├── maze.js │ ├── mel.js │ ├── mips_assembler.js │ ├── mipsassembler.js │ ├── mushcode.js │ ├── mysql.js │ ├── nix.js │ ├── nsis.js │ ├── objectivec.js │ ├── ocaml.js │ ├── pascal.js │ ├── perl.js │ ├── pgsql.js │ ├── php.js │ ├── pig.js │ ├── plain_text.js │ ├── powershell.js │ ├── praat.js │ ├── prolog.js │ ├── properties.js │ ├── protobuf.js │ ├── python.js │ ├── r.js │ ├── razor.js │ ├── rdoc.js │ ├── red.js │ ├── rhtml.js │ ├── rst.js │ ├── ruby.js │ ├── rust.js │ ├── sass.js │ ├── scad.js │ ├── scala.js │ ├── scheme.js │ ├── scss.js │ ├── sh.js │ ├── sjs.js │ ├── smarty.js │ ├── snippets.js │ ├── soy_template.js │ ├── space.js │ ├── sparql.js │ ├── sql.js │ ├── sqlserver.js │ ├── stylus.js │ ├── svg.js │ ├── swift.js │ ├── swig.js │ ├── tcl.js │ ├── tex.js │ ├── text.js │ ├── textile.js │ ├── toml.js │ ├── tsx.js │ ├── turtle.js │ ├── twig.js │ ├── typescript.js │ ├── vala.js │ ├── vbscript.js │ ├── velocity.js │ ├── verilog.js │ ├── vhdl.js │ ├── wollok.js │ ├── xml.js │ ├── xquery.js │ └── yaml.js ├── theme-ambiance.js ├── theme-chaos.js ├── theme-chrome.js ├── theme-clouds.js ├── theme-clouds_midnight.js ├── theme-cobalt.js ├── theme-crimson_editor.js ├── theme-dawn.js ├── theme-dracula.js ├── theme-dreamweaver.js ├── theme-eclipse.js ├── theme-github.js ├── theme-gob.js ├── theme-gruvbox.js ├── theme-idle_fingers.js ├── theme-iplastic.js ├── theme-katzenmilch.js ├── theme-kr_theme.js ├── theme-kuroir.js ├── theme-merbivore.js ├── theme-merbivore_soft.js ├── theme-mono_industrial.js ├── theme-monokai.js ├── theme-pastel_on_dark.js ├── theme-solarized_dark.js ├── theme-solarized_light.js ├── theme-sqlserver.js ├── theme-terminal.js ├── theme-textmate.js ├── theme-tomorrow.js ├── theme-tomorrow_night.js ├── theme-tomorrow_night_blue.js ├── theme-tomorrow_night_bright.js ├── theme-tomorrow_night_eighties.js ├── theme-twilight.js ├── theme-vibrant_ink.js ├── theme-xcode.js ├── worker-coffee.js ├── worker-css.js ├── worker-html.js ├── worker-javascript.js ├── worker-json.js ├── worker-lua.js ├── worker-php.js ├── worker-xml.js └── worker-xquery.js ├── img ├── ArmMbedLogo.svg ├── controller_mbed.svg ├── led_blue.png ├── led_red.png ├── led_white.png └── led_yellow.png ├── js-hal ├── EventEmitter.js ├── blockdevice.js ├── gpio.js ├── lora.js ├── network.js ├── pinnames.js ├── sleep.js └── timers.js ├── js-ui ├── board.js ├── components │ ├── base_component.js │ ├── led.js │ └── thermistor.js ├── editor.js ├── ga.js ├── init.js └── viewer.js ├── simulator.html ├── style └── simulator.css ├── viewer.html └── xterm ├── xterm.css ├── xterm.js └── xterm.js.map /.gitignore: -------------------------------------------------------------------------------- 1 | out/*.* 2 | node_modules/ 3 | demos/mbed-cloud-client/ 4 | demos/lorawan-classc/ 5 | *.bc 6 | mbed-simulator-hal/mbed-http/ 7 | demos/*/out 8 | mbed-simulator-hal/MQTT/ 9 | mbed-simulator-hal/mbed-os/ 10 | mbed-simulator-hal/*.cache 11 | mbed-simulator-hal/simple-mbed-cloud-client/ 12 | -------------------------------------------------------------------------------- /.mbed: -------------------------------------------------------------------------------- 1 | ROOT=. 2 | -------------------------------------------------------------------------------- /build-demos.bat: -------------------------------------------------------------------------------- 1 | for /D %%s in (demos/*) do @echo Building demos/%%s... && node cli.js -i demos/%%s -o out/ --compiler-opts "-Os" 2 | -------------------------------------------------------------------------------- /build-demos.sh: -------------------------------------------------------------------------------- 1 | for dir in demos/*/ 2 | do 3 | echo "Building ${dir}..." 4 | node cli.js -i ${dir} -o out/ --compiler-opts "-Os" 5 | done 6 | -------------------------------------------------------------------------------- /demos/bd/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "mbed_events.h" 3 | #include "SimulatorBlockDevice.h" 4 | 5 | #define BD_PAGE_SIZE 512 6 | 7 | // Initialize a persistent block device with 512 bytes block size, and 128 blocks (64K of storage) 8 | SimulatorBlockDevice bd("myblockdevice", 128 * BD_PAGE_SIZE, BD_PAGE_SIZE); 9 | 10 | // buffer to store the counter 11 | uint32_t *page_buffer; 12 | 13 | EventQueue queue; 14 | InterruptIn btn(BUTTON1); 15 | 16 | void btn_fall() { 17 | // up the counter 18 | page_buffer[0]++; 19 | 20 | // store the page 21 | bd.program(page_buffer, 0x0, BD_PAGE_SIZE); 22 | 23 | printf("Counter is now %d\n", page_buffer[0]); 24 | } 25 | 26 | int main() { 27 | printf("The Simulator contains a persistent block device implementation\n"); 28 | printf("Data is stored between page refreshes in the browser's local storage\n"); 29 | 30 | printf("\nPress the button to increase the counter\nRefresh the page to see that data is persistent\n\n"); 31 | 32 | if (bd.init() != 0) { 33 | printf("Blockdevice initialization failed!\n"); 34 | return 1; 35 | } 36 | 37 | // initialize memory for the page buffer 38 | page_buffer = (uint32_t*)malloc(BD_PAGE_SIZE); 39 | 40 | // read the data back from the block device 41 | bd.read(page_buffer, 0x0, BD_PAGE_SIZE); 42 | 43 | printf("Counter initial value is %d\n", page_buffer[0]); 44 | 45 | // button fall IRQ handler 46 | btn.fall(queue.event(&btn_fall)); 47 | 48 | queue.dispatch_forever(); 49 | } 50 | -------------------------------------------------------------------------------- /demos/blinky/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | 3 | DigitalOut led(LED1); 4 | 5 | int main() { 6 | while (1) { 7 | led = !led; 8 | printf("Blink! LED is now %d\n", led.read()); 9 | 10 | wait_ms(500); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /demos/busout/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | 3 | BusOut myleds(LED1, LED2, LED3, LED4); 4 | 5 | int main() { 6 | while(1) { 7 | for(int i = 0; i < 16; i++) { 8 | myleds = i; 9 | wait(0.25); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /demos/events/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "mbed_events.h" 3 | 4 | // An EventQueue is a very useful construct in Mbed OS, it allows you to schedule events 5 | // and to defer from one context to another (e.g. from ISR to normal thread) without 6 | // writing your own state machines, and while maintaining context. 7 | // https://os.mbed.com/docs/v5.6/tutorials/the-eventqueue-api.html 8 | EventQueue queue; 9 | 10 | DigitalOut led1(LED1); 11 | DigitalOut led2(LED2); 12 | 13 | InterruptIn btn(BUTTON1); 14 | 15 | void blink_led() { 16 | printf("blink_led invoked\n"); 17 | led1 = !led1; 18 | } 19 | 20 | // This does not run in an ISR, so it's safe to use `printf` or other blocking calls 21 | void btn_fall() { 22 | printf("btn_fall invoked\n"); 23 | led2 = !led2; 24 | } 25 | 26 | int main() { 27 | // Schedule an event to run every second 28 | queue.call_every(1000, &blink_led); 29 | 30 | // Normally code in the `fall` handler runs in an ISR, 31 | // but you can directly defer it to the thread that runs the queue 32 | btn.fall(queue.event(&btn_fall)); 33 | 34 | // Because the simulator does not support multiple threads, 35 | // we have to call dispatch_forever from the main thread. 36 | // Typically you'd run this on a separate thread within Mbed's RTOS. 37 | queue.dispatch_forever(); 38 | } 39 | -------------------------------------------------------------------------------- /demos/http/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "NetworkInterface.h" 3 | #include "http_request.h" 4 | 5 | void dump_response(HttpResponse* res) { 6 | printf("Status: %d - %s\n", res->get_status_code(), res->get_status_message().c_str()); 7 | 8 | printf("Headers:\n"); 9 | for (size_t ix = 0; ix < res->get_headers_length(); ix++) { 10 | printf("\t%s: %s\n", res->get_headers_fields()[ix]->c_str(), res->get_headers_values()[ix]->c_str()); 11 | } 12 | printf("\nBody (%d bytes):\n\n%s\n", res->get_body_length(), res->get_body_as_string().c_str()); 13 | } 14 | 15 | int main() { 16 | NetworkInterface *network = NetworkInterface::get_default_instance(); 17 | if (network->connect() != 0) { 18 | printf("Cannot connect to the network, see serial output"); 19 | return 1; 20 | } 21 | 22 | // Do a GET request to httpbin.org 23 | { 24 | // By default the body is automatically parsed and stored in a buffer, this is memory heavy. 25 | // To receive chunked response, pass in a callback as last parameter to the constructor. 26 | HttpRequest* get_req = new HttpRequest(network, HTTP_GET, "http://httpbin.org/status/418"); 27 | 28 | HttpResponse* get_res = get_req->send(); 29 | if (!get_res) { 30 | printf("HttpRequest failed (error code %d)\n", get_req->get_error()); 31 | return 1; 32 | } 33 | 34 | printf("\n----- HTTP GET response -----\n"); 35 | dump_response(get_res); 36 | 37 | delete get_req; 38 | } 39 | 40 | // POST request to httpbin.org 41 | { 42 | HttpRequest* post_req = new HttpRequest(network, HTTP_POST, "http://httpbin.org/post"); 43 | post_req->set_header("Content-Type", "application/json"); 44 | 45 | const char body[] = "{\"hello\":\"world\"}"; 46 | 47 | HttpResponse* post_res = post_req->send(body, strlen(body)); 48 | if (!post_res) { 49 | printf("HttpRequest failed (error code %d)\n", post_req->get_error()); 50 | return 1; 51 | } 52 | 53 | printf("\n----- HTTP POST response -----\n"); 54 | dump_response(post_res); 55 | 56 | delete post_req; 57 | } 58 | 59 | wait(osWaitForever); 60 | } 61 | -------------------------------------------------------------------------------- /demos/interrupts/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | 3 | DigitalOut led1(LED1); 4 | DigitalOut led2(LED2); 5 | DigitalOut led3(LED3); 6 | 7 | Ticker t1; 8 | Timeout t2; 9 | InterruptIn btn(BUTTON1); 10 | 11 | void blink_led1() { 12 | printf("Ticker fired\n"); 13 | led1 = !led1; 14 | } 15 | 16 | void toggle_led2() { 17 | printf("BUTTON1 fall invoked\n"); 18 | led2 = !led2; 19 | } 20 | 21 | void turn_led3_on() { 22 | printf("Timeout fired\n"); 23 | led3 = 1; 24 | } 25 | 26 | int main() { 27 | printf("Hello world!\n"); 28 | printf("LED1 will blink every second, LED3 will toggle after 2.5 seconds, LED2 can be toggled through BUTTON1.\n"); 29 | printf("-----------------------------------\n\n"); 30 | 31 | t1.attach(callback(&blink_led1), 1.0f); 32 | t2.attach(callback(&turn_led3_on), 2.5f); 33 | btn.fall(callback(&toggle_led2)); 34 | 35 | wait_ms(osWaitForever); 36 | } 37 | -------------------------------------------------------------------------------- /demos/lcd/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [{ 3 | "component": "C12832", 4 | "args": { 5 | "MOSI": "PinNames.SPI_MOSI", 6 | "MISO": "PinNames.SPI_MISO", 7 | "SCK": "PinNames.SPI_SCK" 8 | } 9 | }] 10 | } 11 | -------------------------------------------------------------------------------- /demos/lorawan-abp/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [ 3 | { "component": "sht31", "args": { "SDA": "PinNames.I2C_SDA", "SCL": "PinNames.I2C_SCL" } } 4 | ] 5 | } -------------------------------------------------------------------------------- /demos/lorawan/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [ 3 | { "component": "sht31", "args": { "SDA": "PinNames.I2C_SDA", "SCL": "PinNames.I2C_SCL" } } 4 | ] 5 | } -------------------------------------------------------------------------------- /demos/ntp/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "NetworkInterface.h" 3 | #include "UDPSocket.h" 4 | 5 | uint32_t ntohl(uint32_t const net) { 6 | uint8_t data[4] = {}; 7 | memcpy(&data, &net, sizeof(data)); 8 | 9 | return ((uint32_t) data[3] << 0) 10 | | ((uint32_t) data[2] << 8) 11 | | ((uint32_t) data[1] << 16) 12 | | ((uint32_t) data[0] << 24); 13 | } 14 | 15 | int main() { 16 | printf("Time protocol example\n"); 17 | 18 | NetworkInterface *net = NetworkInterface::get_default_instance(); 19 | if(net->connect() != NSAPI_ERROR_OK) { 20 | printf("Error connecting\n"); 21 | return -1; 22 | } 23 | 24 | // Show the network address 25 | const char *ip = net->get_ip_address(); 26 | printf("IP address is: %s\n", ip ? ip : "No IP"); 27 | 28 | while (1) { 29 | UDPSocket sock(net); 30 | 31 | nsapi_size_or_error_t n; 32 | 33 | char send_buffer[] = "time"; 34 | if((n = sock.sendto("time.nist.gov", 37, send_buffer, sizeof(send_buffer))) < NSAPI_ERROR_OK) { 35 | printf("Error sending data (%d)\n", n); 36 | wait_ms(10000); continue; 37 | } 38 | 39 | uint32_t recv_buffer; 40 | n = sock.recvfrom(NULL, &recv_buffer, sizeof(recv_buffer)); 41 | if (n != sizeof(recv_buffer)) { 42 | printf("recvfrom failed (%d)\n", n); 43 | wait_ms(10000); continue; 44 | } 45 | 46 | unsigned long epoch = ntohl(recv_buffer) - 2208988800ull; // 1900-1970 47 | printf("\nCurrent time: %s", ctime(( const time_t* )&epoch)); 48 | 49 | sock.close(); 50 | 51 | wait_ms(10000); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /demos/peliondm/.gitignore: -------------------------------------------------------------------------------- 1 | mbed_cloud_dev_credentials.c 2 | -------------------------------------------------------------------------------- /demos/peliondm/update_default_resources.c: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // Copyright 2016-2017 ARM Ltd. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | // ---------------------------------------------------------------------------- 18 | 19 | #ifdef MBED_CLOUD_CLIENT_USER_CONFIG_FILE 20 | #include MBED_CLOUD_CLIENT_USER_CONFIG_FILE 21 | #endif 22 | 23 | #include 24 | 25 | #ifdef MBED_CLOUD_DEV_UPDATE_ID 26 | const uint8_t arm_uc_vendor_id[16] = { "dev_manufacturer" }; 27 | const uint16_t arm_uc_vendor_id_size = sizeof(arm_uc_vendor_id); 28 | 29 | const uint8_t arm_uc_class_id[16] = { "dev_model_number" }; 30 | const uint16_t arm_uc_class_id_size = sizeof(arm_uc_class_id); 31 | #endif 32 | 33 | #ifdef MBED_CLOUD_DEV_UPDATE_CERT 34 | const uint8_t arm_uc_default_fingerprint[32] = { 0 }; 35 | const uint16_t arm_uc_default_fingerprint_size = 36 | sizeof(arm_uc_default_fingerprint); 37 | 38 | const uint8_t arm_uc_default_certificate[1] = { 0 }; 39 | const uint16_t arm_uc_default_certificate_size = 40 | sizeof(arm_uc_default_certificate); 41 | #endif 42 | -------------------------------------------------------------------------------- /demos/pwmout/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | 3 | PwmOut led(p5); 4 | 5 | int main() { 6 | while(1) { 7 | led = led + 0.10; 8 | printf("LED is now %.2f\n", led.read()); 9 | wait(0.2); 10 | 11 | if(led == 1.0) { 12 | led = 0; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /demos/pwmout/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [ 3 | { "component": "LedRed", "args": { "LED" : "PinNames.p5" } } 4 | ] 5 | } -------------------------------------------------------------------------------- /demos/tcpsocket-async/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "mbed_shared_queues.h" 3 | #include "NetworkInterface.h" 4 | #include "TCPSocket.h" 5 | 6 | static TCPSocket socket; 7 | static char rx_buffer[256] = { 0 }; 8 | 9 | nsapi_size_or_error_t send_query() { 10 | const char *query = "GET / HTTP/1.1\r\nHost: api.ipify.org\r\n\r\n"; 11 | 12 | return socket.send(query, strlen(query)); 13 | } 14 | 15 | nsapi_size_or_error_t receive_data() { 16 | return socket.recv(rx_buffer, sizeof(rx_buffer)); 17 | } 18 | 19 | void handle_socket_sigio() 20 | { 21 | static enum { 22 | CONNECTING, 23 | SEND, 24 | RECEIVE, 25 | CLOSE, 26 | NONE 27 | } next_state = CONNECTING; 28 | 29 | printf("socket sigio, next_state=%d\n", next_state); 30 | 31 | switch (next_state) { 32 | case CONNECTING: 33 | switch(socket.connect("api.ipify.org", 80)) { 34 | case NSAPI_ERROR_IN_PROGRESS: 35 | // Connecting to server 36 | printf("Connecting to server\n"); 37 | break; 38 | case NSAPI_ERROR_ALREADY: 39 | case NSAPI_ERROR_OK: 40 | // Now connected to server 41 | next_state = SEND; 42 | printf("Connected to server\n"); 43 | break; 44 | default: 45 | // Error in connection phase 46 | printf("Error in connection phase\n"); 47 | next_state = CLOSE; 48 | } 49 | case SEND: 50 | printf("Sending...\n"); 51 | if (send_query() > 0) 52 | next_state = RECEIVE; 53 | else 54 | next_state = CLOSE; // Error 55 | break; 56 | case RECEIVE: 57 | if (receive_data() == NSAPI_ERROR_WOULD_BLOCK) 58 | break; 59 | 60 | printf("\nReceived:\n\n%s\n\n", rx_buffer); 61 | next_state = CLOSE; 62 | case CLOSE: 63 | printf("Socket close\n"); 64 | next_state = NONE; 65 | socket.close(); 66 | break; 67 | } 68 | } 69 | 70 | int main() { 71 | NetworkInterface *net = NetworkInterface::get_default_instance(); 72 | net->connect(); 73 | 74 | socket.open(net); 75 | 76 | socket.set_blocking(false); 77 | socket.sigio(&handle_socket_sigio); 78 | handle_socket_sigio(); // Kick the state machine to start connecting 79 | 80 | wait(osWaitForever); 81 | } 82 | -------------------------------------------------------------------------------- /demos/tcpsocket/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "NetworkInterface.h" 3 | #include "TCPSocket.h" 4 | 5 | // Get access to the network interface 6 | NetworkInterface *net = NetworkInterface::get_default_instance(); 7 | 8 | // Socket demo 9 | int main() { 10 | printf("Socket example - resolves the public IP for the simulator\n"); 11 | net->connect(); 12 | 13 | // Show the network address 14 | const char *ip = net->get_ip_address(); 15 | const char *mac = net->get_mac_address(); 16 | const char *gateway = net->get_gateway(); 17 | printf("IP address: %s\n", ip ? ip : "None"); 18 | printf("MAC address: %s\n", mac ? mac : "None"); 19 | printf("Gateway: %s\n", gateway ? gateway : "None"); 20 | 21 | TCPSocket socket; 22 | socket.open(net); 23 | socket.connect("api.ipify.org", 80); 24 | 25 | char *buffer = new char[256]; 26 | 27 | // Send an HTTP request 28 | strcpy(buffer, "GET / HTTP/1.1\r\nHost: api.ipify.org\r\n\r\n"); 29 | int scount = socket.send(buffer, strlen(buffer)); 30 | printf("sent %d [%.*s]\n", scount, (int)(strstr(buffer, "\r\n")-buffer), buffer); 31 | 32 | wait_ms(100); 33 | 34 | // Recieve an HTTP response and print out the response line 35 | int rcount = socket.recv(buffer, 256); 36 | printf("recv %d [%.*s]\n", rcount, (int)(strstr(buffer, "\r\n")-buffer), buffer); 37 | 38 | // The api.ipify.org service also gives us the device's external IP address 39 | const char *payload = strstr(buffer, "\r\n\r\n")+4; 40 | printf("External IP address: %.*s\n", (int)(rcount-(payload-buffer)), payload); 41 | 42 | // Close the socket to return its memory and bring down the network interface 43 | socket.close(); 44 | delete[] buffer; 45 | 46 | // Bring down the network interface 47 | net->disconnect(); 48 | printf("Done\n"); 49 | } 50 | -------------------------------------------------------------------------------- /demos/temperature/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mbed.h" 2 | #include "C12832.h" 3 | #include "Sht31.h" 4 | 5 | C12832 lcd(SPI_MOSI, SPI_SCK, SPI_MISO, p8, p11); 6 | Sht31 sht31(I2C_SDA, I2C_SCL); 7 | DigitalOut led(LED1); 8 | 9 | int main() { 10 | printf("Set the temperature above 25 degrees to trigger the warning LED\n"); 11 | 12 | while (1) { 13 | lcd.cls(); 14 | 15 | float temp = sht31.readTemperature(); 16 | float humidity = sht31.readHumidity(); 17 | 18 | lcd.locate(3, 3); 19 | lcd.printf("Temperature: %.2f C", temp); 20 | lcd.locate(3, 13); 21 | lcd.printf("Humidity: %.2f %%", humidity); 22 | 23 | // turn on LED if the temperature is above 25 degrees 24 | led = temp > 25.0f; 25 | 26 | wait(0.5f); 27 | } 28 | } -------------------------------------------------------------------------------- /demos/temperature/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [ 3 | { "component": "C12832", "args": { "MOSI": "PinNames.SPI_MOSI", "MISO": "PinNames.SPI_MISO", "SCK": "PinNames.SPI_SCK" } }, 4 | { "component": "sht31", "args": { "SDA": "PinNames.I2C_SDA", "SCL": "PinNames.I2C_SCL" } } 5 | ] 6 | } -------------------------------------------------------------------------------- /demos/touchscreen/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a demo which uses the ST DISCO_F413ZH LCD and touch screen 3 | * Contains a FRIDA FRD154BP2901 LCD display 4 | * Code from https://os.mbed.com/teams/ST/code/DISCO_F413ZH-touch-screen-demo/?platform=ST-Discovery-F413H 5 | */ 6 | 7 | #include "mbed.h" 8 | #include "stm32f413h_discovery_ts.h" 9 | #include "stm32f413h_discovery_lcd.h" 10 | 11 | TS_StateTypeDef TS_State = { 0 }; 12 | 13 | int main() { 14 | printf("Draw on the screen!\n"); 15 | 16 | BSP_LCD_Init(); 17 | 18 | /* Touchscreen initialization */ 19 | if (BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize()) == TS_ERROR) { 20 | printf("BSP_TS_Init error\n"); 21 | } 22 | 23 | /* Clear the LCD */ 24 | BSP_LCD_Clear(LCD_COLOR_WHITE); 25 | 26 | /* Set Touchscreen Demo1 description */ 27 | BSP_LCD_SetTextColor(LCD_COLOR_GREEN); 28 | BSP_LCD_FillRect(0, 0, BSP_LCD_GetXSize(), 40); 29 | BSP_LCD_SetTextColor(LCD_COLOR_BLACK); 30 | BSP_LCD_SetBackColor(LCD_COLOR_GREEN); 31 | BSP_LCD_SetFont(&Font16); 32 | BSP_LCD_DisplayStringAt(0, 15, (uint8_t *)"Touch the screen", CENTER_MODE); 33 | 34 | while (1) { 35 | BSP_TS_GetState(&TS_State); 36 | if(TS_State.touchDetected) { 37 | /* One or dual touch have been detected */ 38 | 39 | /* Get X and Y position of the first touch post calibrated */ 40 | uint16_t x1 = TS_State.touchX[0]; 41 | uint16_t y1 = TS_State.touchY[0]; 42 | 43 | BSP_LCD_SetTextColor(LCD_COLOR_RED); 44 | BSP_LCD_FillCircle(x1, y1, 5); 45 | 46 | wait_ms(10); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /demos/touchscreen/simconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "peripherals": [ 3 | { "component": "ST7789H2", "args": {} } 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /demos/trace/main.cpp: -------------------------------------------------------------------------------- 1 | #define MBED_CONF_MBED_TRACE_ENABLE 1 2 | 3 | #include "mbed-trace/mbed_trace.h" 4 | #define TRACE_GROUP "main" 5 | 6 | int main() { 7 | mbed_trace_init(); // initialize the trace library 8 | 9 | tr_debug("this is debug msg"); //-> "[DBG ][main]: this is a debug msg" 10 | tr_info("this is info msg"); //-> "[INFO][main]: this is an info msg" 11 | tr_warn("this is warning msg"); //-> "[WARN][main]: this is a warning msg" 12 | tr_err("this is error msg"); //-> "[ERR ][main]: this is an error msg" 13 | 14 | const char arr[] = { 30, 31, 32 }; 15 | tr_debug("printing array: %s", mbed_trace_array((const uint8_t*)arr, 3)); //-> "[DBG ][main]: printing array: 01:02:03" 16 | 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /docs/architecture.md: -------------------------------------------------------------------------------- 1 | # Architecture 2 | 3 | Large parts of the Mbed OS API are generic between targets. This includes the GPIO layers, IP4/IPV6 networking stacks, and communication libraries like CoAP or LoRaWAN. Target-specific code, such as which registers to write to when toggling a GPIO pin, are implemented using the Mbed C HAL. The simulator uses the same approach, implementing a new target (`TARGET_SIMULATOR`) that implements the Mbed C HAL which passes events through to a JavaScript HAL. Then the UI subscribes to these events, and updates the simulator accordingly. 4 | 5 | If you take a `DigitalOut` element, the flow goes like this: 6 | 7 | ``` 8 | User App -> DigitalOut.cpp (C++ API) -> gpio_api.c (C HAL) -> gpio.js (JS HAL) -> led.js (JS UI) 9 | ``` 10 | 11 | The C/C++ parts are in `mbed-simulator-hal`. This uses a fork of Mbed OS 5.10.2 (living here: [#mbed-os-5.10-simulator](https://github.com/janjongboom/mbed-os/tree/mbed-os-5.10-simulator)), where a new target was added (`TARGET_SIMULATOR`). In the long run this should be main-lined into core Mbed OS. 12 | 13 | The JS HAL lives in `viewer/js-hal`, and dispatches events around between JS UI components and C++ HAL. It implements an event bus to let the UI subscribe to events from C++. For instance, see `js-hal/gpio.js` for GPIO and IRQ handling. 14 | 15 | UI lives in `viewer/js-ui`, and handles UI events, and only communicates with JS HAL. 16 | 17 | Device features need to be enabled in `targets/TARGET_SIMULATOR/device.h`. 18 | 19 | ## Network proxy 20 | 21 | The simulator implements two features which cannot be simulated by the browser alone: 22 | 23 | * The `NetworkInterface` API, the generic IP networking interface for Mbed OS. This allows opening UDP and TCP sockets, which is not allowed in the browser. 24 | * The LoRaWAN API. Messages from the LoRaWAN stack are sent to a network server using the Semtech UDP protocol, which is not allowed from the browser. 25 | 26 | For these usecases a network proxy is implemented in `server/launch-server.js`. This network proxy allows opening raw UDP and TCP sockets, and relaying LoRaWAN messages. The proxy can be accessed over HTTP and through Web Sockets. See `viewer/js-hal/network.js` and `viewer/js-hal/lora.js` for the JS HAL, and `mbed-simulator-hal/easy-connect` `mbed-simulator-hal/lora-radio-drv` for the C++ HAL. 27 | -------------------------------------------------------------------------------- /docs/debugging.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | 3 | Simulator applications can be debugged using your browser's debugger, because they contain source maps. To debug an application: 4 | 5 | **Chrome** 6 | 7 | ![Debugging in Chrome](../img/chrome1.png) 8 | 9 | 1. Open the Developer Tools via **View > Developer > Developer Tools**. 10 | 1. Click **Sources**. 11 | 1. Under 'Network', select the name of the application (see the browser hash). 12 | 1. Now locate `main.cpp`. 13 | * On a pre-built demo, go to the `out` folder, select the name of the demo (e.g. `blinky`) and select `main.cpp`. 14 | * On a user-compiled app, go to the *orange* folder, go to the `out` folder, and select `main.cpp`. 15 | 1. Click in the gutter to add a breakpoint. 16 | 1. Click the **↻** icon in the simulator to restart the debug session. 17 | 18 | **Firefox** 19 | 20 | ![Debugging in Firefox](../img/firefox1.png) 21 | 22 | 1. Open the Developer Tools via **Tools > Web Developer > Toggle Tools**. 23 | 1. Click **Debugger**. 24 | 1. Now locate `main.cpp`. 25 | * On a pre-built demo, go to the `out` folder, select the name of the demo (e.g. `demos/blinky`) and select `main.cpp`. 26 | * On a user-compiled app, go to the folder that starts with `/home/ubuntu`, go to the `out` folder, and select `user_XXX.cpp`. 27 | 1. Click in the gutter to add a breakpoint. 28 | 1. Click the **↻** icon in the simulator to restart the debug session. -------------------------------------------------------------------------------- /docs/peripherals.md: -------------------------------------------------------------------------------- 1 | # Peripherals 2 | 3 | ## Loading peripherals 4 | 5 | The simulator comes with peripherals (such as LCD displays, LEDs, etc.). To load these for your project add a `peripherals` section to your [simconfig](simconfig.md) file. You can pass in the pin names via `"PinNames.p5"`, these will be automatically resolved on startup. Note that you can change the peripheral config at runtime by clicking **Add component**. This is then cached by the browser. To clean the cache run `sessionStorage.removeItem('model-dirty')` from your browsers console. 6 | 7 | ## Adding new peripherals 8 | 9 | For an example of how a peripheral looks like, see `mbed-simulator-hal/peripherals/Sht31`. 10 | 11 | A peripheral consists of a C++ implementation, a JS HAL file and a JS UI file. Peripherals in the `mbed-simulator-hal/peripherals` folder are automatically picked up at compile time. In your own project you can add a section to [simconfig](simconfig.md): 12 | 13 | ```json 14 | "components": { 15 | "jshal": [ 16 | "./ui/js-hal.js" 17 | ], 18 | "jsui": [ 19 | "./ui/js-ui.js" 20 | ] 21 | } 22 | ``` 23 | 24 | The C++ component is automatically picked up. The JS files are loaded when you run the project. Note that all `jshal` and `jsui` files will be copied to the BUILD directory, so to change things on the fly, edit those files (or create a symlink). 25 | 26 | You can communicate between C++ and JS through `ES_ASM` macros (C++ -> JS), or via `ccall` (JS -> C++). See the components that ship with the simulator for examples. 27 | -------------------------------------------------------------------------------- /docs/simconfig.md: -------------------------------------------------------------------------------- 1 | # Configuration and compiler options 2 | 3 | ## Simconfig 4 | 5 | You can specify simulator options via a `simconfig.json` object, this is useful because you can check it in. In here you can specify compiler options and ignore paths. Just create the file in your project folder according to the following structure: 6 | 7 | ```json 8 | { 9 | "compiler-args": [ 10 | "-std=c++11", 11 | "--preload-file", "sdcard@/fs" 12 | ], 13 | "emterpretify": true, 14 | "ignore": [ 15 | "./BSP_DISCO_F413ZH", 16 | "./F413ZH_SD_BlockDevice" 17 | ], 18 | "peripherals": [ 19 | { "component": "ST7789H2", "args": {} } 20 | ], 21 | "components": { 22 | "jshal": [ 23 | "./ui/js-hal.js" 24 | ], 25 | "jsui": [ 26 | "./ui/js-ui.js" 27 | ] 28 | }, 29 | "disableTlsNullEntropy": true 30 | } 31 | ``` 32 | 33 | It will automatically be picked up by the simulator CLI. 34 | 35 | ## Compiler options 36 | 37 | **C++11** 38 | 39 | To use C++11 (or a different version), pass in `-c "-std=c++11"`. 40 | 41 | **Emterpretify** 42 | 43 | If you see that compilation hangs this might be due to a bug in asyncify. To switch to Emterpretify for async operations, pass in `--emterpretify`. This is f.e. used for uTensor. Note thet emterpretify is not fully supported. 44 | 45 | **Null entropy** 46 | 47 | By default no entropy sources are defined. If you see an error by the build process about this (e.g. `#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites"`), you can add `"disableTlsNullEntropy": true` to your simconfig. 48 | 49 | ## mbed_app.json 50 | 51 | Configuration options and macros are automatically picked up from your mbed_app.json file. To specify options that are only loaded for the simulator, use the `target_overrides` section: 52 | 53 | ```json 54 | { 55 | "target_overrides": { 56 | "SIMULATOR": { 57 | "some-config-option": 12 58 | } 59 | } 60 | } 61 | ``` 62 | -------------------------------------------------------------------------------- /img/chrome1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/img/chrome1.png -------------------------------------------------------------------------------- /img/firefox1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/img/firefox1.png -------------------------------------------------------------------------------- /img/simulator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/img/simulator.png -------------------------------------------------------------------------------- /mbed-simulator-hal/MQTT.lib: -------------------------------------------------------------------------------- 1 | https://mbed.org/teams/mqtt/code/MQTT/#9cff7b6bbd01 2 | -------------------------------------------------------------------------------- /mbed-simulator-hal/MQTTNetwork/MQTTNetwork.h: -------------------------------------------------------------------------------- 1 | #ifndef _MQTTNETWORK_H_ 2 | #define _MQTTNETWORK_H_ 3 | 4 | #include "mbed.h" 5 | #include "NetworkInterface.h" 6 | 7 | class MQTTNetwork { 8 | public: 9 | MQTTNetwork(NetworkInterface* aNetwork) : network(aNetwork) { 10 | socket = new TCPSocket(); 11 | } 12 | 13 | ~MQTTNetwork() { 14 | delete socket; 15 | } 16 | 17 | int read(unsigned char* buffer, int len, int timeout) { 18 | return socket->recv(buffer, len); 19 | } 20 | 21 | int write(unsigned char* buffer, int len, int timeout) { 22 | return socket->send(buffer, len); 23 | } 24 | 25 | int connect(const char* hostname, int port) { 26 | socket->open(network); 27 | return socket->connect(hostname, port); 28 | } 29 | 30 | int disconnect() { 31 | return socket->close(); 32 | } 33 | 34 | private: 35 | NetworkInterface* network; 36 | TCPSocket* socket; 37 | }; 38 | 39 | #endif // _MQTTNETWORK_H_ 40 | -------------------------------------------------------------------------------- /mbed-simulator-hal/easy-connect/EthInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "EthInterface.h" 2 | #include "EthernetInterface.h" 3 | 4 | EthInterface* EthInterface::get_target_default_instance() { 5 | static EthernetInterface ethernet; 6 | return ðernet; 7 | } 8 | -------------------------------------------------------------------------------- /mbed-simulator-hal/easy-connect/easy-connect.cpp: -------------------------------------------------------------------------------- 1 | #include "easy-connect.h" 2 | 3 | void print_MAC(NetworkInterface* network_interface, bool log_messages) { 4 | #if MBED_CONF_APP_NETWORK_INTERFACE != CELLULAR_ONBOARD 5 | const char *mac_addr = network_interface->get_mac_address(); 6 | if (mac_addr == NULL) { 7 | if (log_messages) { 8 | printf("[EasyConnect] ERROR - No MAC address\n"); 9 | } 10 | return; 11 | } 12 | if (log_messages) { 13 | printf("[EasyConnect] MAC address %s\n", mac_addr); 14 | } 15 | #endif 16 | } 17 | 18 | NetworkInterface* easy_connect(bool log_messages) { 19 | NetworkInterface *network_interface = new EthernetInterface(); 20 | 21 | int connect_success = network_interface->connect(); 22 | 23 | if(connect_success == 0) { 24 | if (log_messages) { 25 | printf("[EasyConnect] Connected to Network successfully\n"); 26 | print_MAC(network_interface, log_messages); 27 | } 28 | } else { 29 | if (log_messages) { 30 | print_MAC(network_interface, log_messages); 31 | printf("[EasyConnect] Connection to Network Failed %d!\n", connect_success); 32 | } 33 | return NULL; 34 | } 35 | const char *ip_addr = network_interface->get_ip_address(); 36 | if (ip_addr == NULL) { 37 | if (log_messages) { 38 | printf("[EasyConnect] ERROR - No IP address\n"); 39 | } 40 | return NULL; 41 | } 42 | 43 | if (log_messages) { 44 | printf("[EasyConnect] IP address %s\n", ip_addr); 45 | } 46 | 47 | return network_interface; 48 | } 49 | -------------------------------------------------------------------------------- /mbed-simulator-hal/easy-connect/easy-connect.h: -------------------------------------------------------------------------------- 1 | #ifndef __EASY_CONNECT_H__ 2 | #define __EASY_CONNECT_H__ 3 | 4 | #include "mbed.h" 5 | #include "EthernetInterface.h" 6 | 7 | /* \brief print_MAC - print_MAC - helper function to print out MAC address 8 | * in: network_interface - pointer to network i/f 9 | * bool log-messages print out logs or not 10 | * MAC address is print, if it can be acquired & log_messages is true. 11 | * 12 | */ 13 | void print_MAC(NetworkInterface* network_interface, bool log_messages); 14 | 15 | /* \brief easy_connect - easy_connect function to connect the pre-defined network bearer, 16 | * config done via mbed_app.json (see README.md for details). 17 | * IN: bool log_messages print out diagnostics or not. 18 | * 19 | */ 20 | NetworkInterface* easy_connect(bool log_messages = false); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /mbed-simulator-hal/lora-radio-drv/SX1272_LoRaRadio.h: -------------------------------------------------------------------------------- 1 | // empty on purpose -------------------------------------------------------------------------------- /mbed-simulator-hal/mbed-http.lib: -------------------------------------------------------------------------------- 1 | https://os.mbed.com/teams/sandbox/code/mbed-http/#fa4d71265625 2 | -------------------------------------------------------------------------------- /mbed-simulator-hal/mbed-os.lib: -------------------------------------------------------------------------------- 1 | https://github.com/janjongboom/mbed-os/#3b71b16e10c6e74f63b1c118cd4a10039f4362bd 2 | -------------------------------------------------------------------------------- /mbed-simulator-hal/mcc/mbed_shared_queues.cpp: -------------------------------------------------------------------------------- 1 | /* events 2 | * Copyright (c) 2017 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "events/mbed_shared_queues.h" 18 | #include "mbed.h" 19 | 20 | using namespace events; 21 | 22 | namespace mbed { 23 | 24 | /* Only create the EventQueue, but no dispatching thread */ 25 | static unsigned char queue_buffer[4096]; 26 | static EventQueue queue(4096, queue_buffer); 27 | 28 | EventQueue *mbed_event_queue() 29 | { 30 | return &queue; 31 | } 32 | 33 | EventQueue *mbed_highprio_event_queue() 34 | { 35 | return &queue; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /mbed-simulator-hal/pelion-dm/mbed_cloud_client_user_config.h: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // Copyright 2016-2017 ARM Ltd. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | // ---------------------------------------------------------------------------- 18 | 19 | // This file is a template and it's intented to be copied to the application 20 | // Enable this configuration 21 | 22 | #ifndef MBED_CLOUD_CLIENT_USER_CONFIG_H 23 | #define MBED_CLOUD_CLIENT_USER_CONFIG_H 24 | 25 | #ifdef MBED_CONF_APP_ENDPOINT_TYPE 26 | #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE MBED_CONF_APP_ENDPOINT_TYPE 27 | #else 28 | #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default" 29 | #endif 30 | 31 | // Enable either TCP or UDP, but no both 32 | #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP 33 | // MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP 34 | 35 | #define MBED_CLOUD_CLIENT_LIFETIME 3600 36 | 37 | // #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE 38 | #define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024 39 | 40 | // set flag to enable update support in mbed Cloud client 41 | #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE 42 | 43 | // set download buffer size in bytes (min. 1024 bytes) 44 | 45 | // Use larger buffers in Linux // 46 | #ifdef __linux__ 47 | #define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024) 48 | #else 49 | #define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048 50 | #endif 51 | 52 | // Developer flags for Update feature 53 | #if MBED_CONF_APP_DEVELOPER_MODE == 1 54 | #define MBED_CLOUD_DEV_UPDATE_CERT 55 | #define MBED_CLOUD_DEV_UPDATE_ID 56 | #endif // MBED_CONF_APP_DEVELOPER_MODE 57 | 58 | #endif // MBED_CLOUD_CLIENT_USER_CONFIG_H 59 | 60 | -------------------------------------------------------------------------------- /mbed-simulator-hal/pelion-dm/storage_helper/storage_helper.h: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // Copyright 2016-2018 ARM Ltd. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | // Licensed under the Apache License, Version 2.0 (the "License"); 7 | // you may not use this file except in compliance with the License. 8 | // You may obtain a copy of the License at 9 | // 10 | // http://www.apache.org/licenses/LICENSE-2.0 11 | // 12 | // Unless required by applicable law or agreed to in writing, software 13 | // distributed under the License is distributed on an "AS IS" BASIS, 14 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | // See the License for the specific language governing permissions and 16 | // limitations under the License. 17 | // ---------------------------------------------------------------------------- 18 | 19 | #ifndef SIMPLEMBEDCLOUDCLIENT_STORAGEHELPER_H_ 20 | #define SIMPLEMBEDCLOUDCLIENT_STORAGEHELPER_H_ 21 | 22 | #include "mbed.h" 23 | #include "BlockDevice.h" 24 | #include "factory_configurator_client.h" 25 | 26 | // This is for single or dual partition mode. This is supposed to be used with storage for data e.g. SD card. 27 | // Enable by 1/disable by 0. 28 | #ifndef MCC_PLATFORM_PARTITION_MODE 29 | #define MCC_PLATFORM_PARTITION_MODE 0 30 | #endif 31 | 32 | #include "pal.h" 33 | 34 | // Include this only for Developer mode and device which doesn't have in-built TRNG support 35 | #if MBED_CONF_APP_DEVELOPER_MODE == 1 36 | #ifdef PAL_USER_DEFINED_CONFIGURATION 37 | #define FCC_ROT_SIZE 16 38 | const uint8_t MBED_CLOUD_DEV_ROT[FCC_ROT_SIZE] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }; 39 | #if !PAL_USE_HW_TRNG 40 | #define FCC_ENTROPY_SIZE 48 41 | const uint8_t MBED_CLOUD_DEV_ENTROPY[FCC_ENTROPY_SIZE] = { 0xf6, 0xd6, 0xc0, 0x09, 0x9e, 0x6e, 0xf2, 0x37, 0xdc, 0x29, 0x88, 0xf1, 0x57, 0x32, 0x7d, 0xde, 0xac, 0xb3, 0x99, 0x8c, 0xb9, 0x11, 0x35, 0x18, 0xeb, 0x48, 0x29, 0x03, 0x6a, 0x94, 0x6d, 0xe8, 0x40, 0xc0, 0x28, 0xcc, 0xe4, 0x04, 0xc3, 0x1f, 0x4b, 0xc2, 0xe0, 0x68, 0xa0, 0x93, 0xe6, 0x3a }; 42 | #endif // PAL_USE_HW_TRNG = 0 43 | #endif // PAL_USER_DEFINED_CONFIGURATION 44 | #endif // #if MBED_CONF_APP_DEVELOPER_MODE == 1 45 | 46 | class StorageHelper { 47 | public: 48 | StorageHelper(); 49 | 50 | int init(); 51 | int sotp_init(); 52 | int reformat_storage(void); 53 | }; 54 | 55 | #endif // SIMPLEMBEDCLOUDCLIENT_STORAGEHELPER_H_ 56 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/BSP_DISCO_F413ZH/Drivers/BSP/STM32F413H-Discovery/stm32f413h_discovery.c: -------------------------------------------------------------------------------- 1 | #include "stm32f413h_discovery.h" 2 | 3 | void LCD_IO_Init(void) { 4 | EM_ASM({ 5 | window.MbedJSHal.ST7789H2.init(); 6 | }); 7 | } 8 | 9 | void LCD_IO_Delay(uint32_t delay) { 10 | // noop 11 | } 12 | 13 | void LCD_IO_WriteReg(uint8_t Reg) { 14 | EM_ASM_({ 15 | window.MbedJSHal.ST7789H2.writeReg($0); 16 | }, Reg); 17 | } 18 | 19 | void LCD_IO_WriteData(uint16_t RegValue) { 20 | EM_ASM_({ 21 | window.MbedJSHal.ST7789H2.writeData($0); 22 | }, RegValue); 23 | } 24 | 25 | uint16_t LCD_IO_ReadData(void) { 26 | return (uint16_t)(EM_ASM_INT({ 27 | window.MbedJSHal.ST7789H2.readData(); 28 | })); 29 | } 30 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/BSP_DISCO_F413ZH/Drivers/BSP/STM32F413H-Discovery/stm32f413h_discovery.h: -------------------------------------------------------------------------------- 1 | #ifndef _STM32F413H_DISCOVERY_H_ 2 | #define _STM32F413H_DISCOVERY_H_ 3 | 4 | #include 5 | #include "emscripten.h" 6 | 7 | #define __IO volatile 8 | #define __weak __attribute__((weak)) 9 | 10 | void LCD_IO_Init(void); 11 | void LCD_IO_Delay(uint32_t delay); 12 | void LCD_IO_WriteReg(uint8_t Reg); 13 | void LCD_IO_WriteData(uint16_t RegValue); 14 | uint16_t LCD_IO_ReadData(void); 15 | 16 | #endif // _STM32F413H_DISCOVERY_H_ 17 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/C12832/GraphicsDisplay.h: -------------------------------------------------------------------------------- 1 | /* mbed GraphicsDisplay Display Library Base Class 2 | * Copyright (c) 2007-2009 sford 3 | * Released under the MIT License: http://mbed.org/license/mit 4 | * 5 | * A library for providing a common base class for Graphics displays 6 | * To port a new display, derive from this class and implement 7 | * the constructor (setup the display), pixel (put a pixel 8 | * at a location), width and height functions. Everything else 9 | * (locate, printf, putc, cls, window, putp, fill, blit, blitbit) 10 | * will come for free. You can also provide a specialised implementation 11 | * of window and putp to speed up the results 12 | */ 13 | 14 | #ifndef MBED_GRAPHICSDISPLAY_H 15 | #define MBED_GRAPHICSDISPLAY_H 16 | 17 | #include "TextDisplay.h" 18 | 19 | class GraphicsDisplay : public TextDisplay { 20 | 21 | public: 22 | 23 | GraphicsDisplay(const char* name); 24 | 25 | virtual void pixel(int x, int y, int colour) = 0; 26 | virtual int width() = 0; 27 | virtual int height() = 0; 28 | 29 | virtual void window(int x, int y, int w, int h); 30 | virtual void putp(int colour); 31 | 32 | virtual void cls(); 33 | virtual void fill(int x, int y, int w, int h, int colour); 34 | virtual void blit(int x, int y, int w, int h, const int *colour); 35 | virtual void blitbit(int x, int y, int w, int h, const char* colour); 36 | 37 | virtual void character(int column, int row, int value); 38 | virtual int columns(); 39 | virtual int rows(); 40 | 41 | protected: 42 | 43 | // pixel location 44 | short _x; 45 | short _y; 46 | 47 | // window location 48 | short _x1; 49 | short _x2; 50 | short _y1; 51 | short _y2; 52 | 53 | }; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/C12832/TextDisplay.cpp: -------------------------------------------------------------------------------- 1 | /* mbed TextDisplay Display Library Base Class 2 | * Copyright (c) 2007-2009 sford 3 | * Released under the MIT License: http://mbed.org/license/mit 4 | */ 5 | 6 | #include "TextDisplay.h" 7 | #include "emscripten.h" 8 | 9 | TextDisplay::TextDisplay(const char *name) : Stream(name) { 10 | _row = 0; 11 | _column = 0; 12 | if (name == NULL) { 13 | _path = NULL; 14 | } else { 15 | _path = new char[strlen(name) + 2]; 16 | sprintf(_path, "/%s", name); 17 | } 18 | } 19 | 20 | int TextDisplay::_putc(int value) { 21 | EM_ASM_({ console.log("TextDisplay putc", $0); }, value); 22 | if(value == '\n') { 23 | _column = 0; 24 | _row++; 25 | if(_row >= rows()) { 26 | _row = 0; 27 | } 28 | } else { 29 | character(_column, _row, value); 30 | _column++; 31 | if(_column >= columns()) { 32 | _column = 0; 33 | _row++; 34 | if(_row >= rows()) { 35 | _row = 0; 36 | } 37 | } 38 | } 39 | return value; 40 | } 41 | 42 | // crude cls implementation, should generally be overwritten in derived class 43 | void TextDisplay::cls() { 44 | locate(0, 0); 45 | for(int i=0; i https://www.adafruit.com/products/2857 6 | 7 | These displays use I2C to communicate, 2 pins are required to 8 | interface 9 | Adafruit invests time and resources providing this open source code, 10 | please support Adafruit and open-source hardware by purchasing 11 | products from Adafruit! 12 | 13 | Written by Limor Fried/Ladyada for Adafruit Industries. 14 | BSD license, all text above must be included in any redistribution 15 | ****************************************************/ 16 | 17 | #include "Sht31.h" 18 | #include "mbed.h" 19 | #include "emscripten.h" 20 | 21 | Sht31::Sht31(PinName sda, PinName scl) { 22 | EM_ASM_({ 23 | window.MbedJSHal.sht31.init($0, $1, $2); 24 | }, this, sda, scl); 25 | } 26 | 27 | float Sht31::readTemperature(void) { 28 | int temp = EM_ASM_INT({ 29 | return window.MbedJSHal.sht31.read_temperature($0); 30 | }, this); 31 | return ((float)temp) / 100.0f; 32 | } 33 | 34 | float Sht31::readHumidity(void) { 35 | int humidity = EM_ASM_INT({ 36 | return window.MbedJSHal.sht31.read_humidity($0); 37 | }, this); 38 | return ((float)humidity) / 100.0f; 39 | } 40 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/Sht31/Sht31.h: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | This is a library for the SHT31 Digital Humidity & Temp Sht31 3 | 4 | Designed specifically to work with the SHT31 Digital Sht31 from Adafruit 5 | ----> https://www.adafruit.com/products/2857 6 | 7 | These displays use I2C to communicate, 2 pins are required to 8 | interface 9 | Adafruit invests time and resources providing this open source code, 10 | please support Adafruit and open-source hardware by purchasing 11 | products from Adafruit! 12 | 13 | Written by Limor Fried/Ladyada for Adafruit Industries. 14 | BSD license, all text above must be included in any redistribution 15 | ****************************************************/ 16 | 17 | #ifndef Sht31_H 18 | #define Sht31_H 19 | 20 | #include "mbed.h" 21 | 22 | #define SHT31_DEFAULT_ADDR 0x44 23 | #define SHT31_MEAS_HIGHREP_STRETCH 0x2C06 24 | #define SHT31_MEAS_MEDREP_STRETCH 0x2C0D 25 | #define SHT31_MEAS_LOWREP_STRETCH 0x2C10 26 | #define SHT31_MEAS_HIGHREP 0x2400 27 | #define SHT31_MEAS_MEDREP 0x240B 28 | #define SHT31_MEAS_LOWREP 0x2416 29 | #define SHT31_READSTATUS 0xF32D 30 | #define SHT31_CLEARSTATUS 0x3041 31 | #define SHT31_SOFTRESET 0x30A2 32 | #define SHT31_HEATEREN 0x306D 33 | #define SHT31_HEATERDIS 0x3066 34 | 35 | class Sht31 { 36 | public: 37 | Sht31(PinName sda, PinName scl); 38 | float readTemperature(void); 39 | float readHumidity(void); 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /mbed-simulator-hal/peripherals/Sht31/js-hal/sht31.js: -------------------------------------------------------------------------------- 1 | window.MbedJSHal.sht31 = (function() { 2 | var sensors = {}; 3 | 4 | var obj = {}; 5 | 6 | var values = {}; 7 | 8 | obj.init = function(id, sda, scl) { 9 | sensors[id] = { 10 | sda: sda, 11 | scl: scl 12 | }; 13 | }; 14 | 15 | obj.read_temperature = function(id) { 16 | if (!(id in sensors)) return 0; 17 | var key = sensors[id].sda + '_' + sensors[id].scl; 18 | 19 | return (values[key] || { temp: 0 }).temp; 20 | }; 21 | 22 | obj.read_humidity = function(id) { 23 | if (!(id in sensors)) return 0; 24 | var key = sensors[id].sda + '_' + sensors[id].scl; 25 | 26 | return (values[key] || { humidity: 0 }).humidity; 27 | }; 28 | 29 | obj.update_temperature = function(sda, scl, temp) { 30 | var key = sda + '_' + scl; 31 | values[key] = values[key] || { 32 | temp: 0, 33 | humidity: 0 34 | }; 35 | 36 | values[key].temp = temp; 37 | }; 38 | 39 | obj.update_humidity = function(sda, scl, humidity) { 40 | var key = sda + '_' + scl; 41 | values[key] = values[key] || { 42 | temp: 0, 43 | humidity: 0 44 | }; 45 | 46 | values[key].humidity = humidity; 47 | }; 48 | 49 | return obj; 50 | })(); 51 | -------------------------------------------------------------------------------- /mbed-simulator-hal/simple-mbed-cloud-client.lib: -------------------------------------------------------------------------------- 1 | https://github.com/armmbed/simple-mbed-cloud-client/#09555bae4fbead97d25ec364719e11a3f04240eb 2 | -------------------------------------------------------------------------------- /out/placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/out/placeholder -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mbed-simulator", 3 | "version": "1.9.7", 4 | "description": "Mbed OS 5 simulator", 5 | "preferGlobal": true, 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "bin": { 10 | "mbed-simulator": "./cli.js" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/janjongboom/mbed-simulator.git" 15 | }, 16 | "keywords": [ 17 | "mbed", 18 | "simulator" 19 | ], 20 | "author": "Jan Jongboom ", 21 | "license": "Apache-2.0", 22 | "bugs": { 23 | "url": "https://github.com/janjongboom/mbed-simulator/issues" 24 | }, 25 | "homepage": "https://github.com/janjongboom/mbed-simulator#readme", 26 | "dependencies": { 27 | "body-parser": "^1.18.2", 28 | "command-exists": "^1.2.2", 29 | "commander": "^2.15.1", 30 | "compression": "^1.7.3", 31 | "es6-promisify": "^6.0.0", 32 | "express": "^4.16.2", 33 | "getmac": "^1.4.1", 34 | "hbs": "^4.0.1", 35 | "opn": "^5.3.0", 36 | "puppeteer": "^1.11.0", 37 | "socket.io": "^2.1.0", 38 | "timesync": "^1.0.2", 39 | "xterm": "^3.3.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const launchServer = require('./server/launch-server'); 2 | const Path = require('path'); 3 | 4 | launchServer(Path.join(__dirname, 'out'), process.env.PORT || 7829, 3600000 /*1hour cache*/, true /*runtime logs*/, function(err) { 5 | if (err) return console.error(err); 6 | 7 | // noop 8 | }); 9 | -------------------------------------------------------------------------------- /server/compile.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const Path = require('path'); 3 | const application = require('../build-tools/build-application'); 4 | const promisify = require('es6-promisify').promisify; 5 | 6 | module.exports = async function(content, outFolder) { 7 | let name = 'user_' + Date.now(); 8 | let inputFile = Path.join(outFolder, name + '.cpp'); 9 | let outputFile = Path.join(outFolder, name + '.js'); 10 | 11 | await promisify(fs.writeFile)(inputFile, content, 'utf-8'); 12 | 13 | try { 14 | await application.buildFile(inputFile, outputFile, [ 15 | '-O2' 16 | ], false, false); 17 | } 18 | catch (ex) { 19 | // remove path info 20 | let basename = Path.resolve(Path.join(__dirname, '..')); 21 | console.error('buildFile failed', ex); 22 | 23 | if (typeof ex === 'string') { 24 | while (ex.indexOf(basename) > -1) { 25 | ex = ex.replace(basename, ''); 26 | } 27 | } 28 | throw ex; 29 | } 30 | 31 | return name; 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /server/get_ips.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var os = require('os'); 4 | 5 | module.exports = function () { 6 | var ifaces = os.networkInterfaces(); 7 | 8 | var ret = []; 9 | 10 | Object.keys(ifaces).forEach(function (ifname) { 11 | var alias = 0; 12 | 13 | ifaces[ifname].forEach(function (iface) { 14 | if ('IPv4' !== iface.family || iface.internal !== false) { 15 | // skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses 16 | return; 17 | } 18 | 19 | if (alias >= 1) { 20 | // this single interface has multiple ipv4 addresses 21 | ret.push({ name: ifname + ':' + alias, iface: iface }); 22 | } else { 23 | // this interface has only one ipv4 adress 24 | ret.push({ name: ifname, iface: iface }); 25 | } 26 | ++alias; 27 | }); 28 | }); 29 | 30 | return ret; 31 | }; 32 | -------------------------------------------------------------------------------- /viewer/ace/ext-error_marker.js: -------------------------------------------------------------------------------- 1 | ; 2 | (function() { 3 | window.require(["ace/ext/error_marker"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /viewer/ace/ext-linking.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); 2 | (function() { 3 | window.require(["ace/ext/linking"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /viewer/ace/ext-spellcheck.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); 2 | (function() { 3 | window.require(["ace/ext/spellcheck"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /viewer/ace/ext-statusbar.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); 2 | (function() { 3 | window.require(["ace/ext/statusbar"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /viewer/ace/ext-themelist.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); 2 | (function() { 3 | window.require(["ace/ext/themelist"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /viewer/ace/mode-ada.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-cobol.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-diff.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n]+>"},{token:"comment",regex:"\\|(?=.)",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"comment",regex:/$/,next:"start"},{token:"comment",regex:/\|/},{token:"string",regex:/\\./},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(o,i),t.GherkinHighlightRules=o}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=" ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return console.log(e),t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-gitignore.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-haskell_cabal.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"^\\s*--.*$"},{token:["keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:"constant.numeric",regex:/[\d_]+(?:(?:[\.\d_]*)?)/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"markup.heading",regex:/^(\w.*)$/}]}};r.inherits(s,i),t.CabalHighlightRules=s}),define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.isHeading=function(e,t){var n="markup.heading",r=e.getTokens(t)[0];return t==0||r&&r.type.lastIndexOf(n,0)===0},this.getFoldWidget=function(e,t,n){if(this.isHeading(e,n))return"start";if(t==="markbeginend"&&!/^\s*$/.test(e.getLine(n))){var r=e.getLength();while(++nu)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var f=e.getLine(a).length;return new s(u,i,a,f)}}else if(this.getFoldWidget(e,t,n)==="end"){var a=n,f=e.getLine(a).length;while(--n>=0)if(this.isHeading(e,n))break;var r=e.getLine(n),i=r.length;return new s(n,i,a,f)}}}.call(o.prototype)}),define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_cabal_highlight_rules").CabalHighlightRules,o=e("./folding/haskell_cabal").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell_cabal"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /viewer/ace/mode-lisp.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-lucene.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"constant.character.negation",regex:"[\\-]"},{token:"constant.character.interro",regex:"[\\?]"},{token:"constant.character.asterisk",regex:"[\\*]"},{token:"constant.character.proximity",regex:"~[0-9]+\\b"},{token:"keyword.operator",regex:"(?:AND|OR|NOT)\\b"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"keyword",regex:"[\\S]+:"},{token:"string",regex:'".*?"'},{token:"text",regex:"\\s+"}]}};r.inherits(o,s),t.LuceneHighlightRules=o}),define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lucene_highlight_rules").LuceneHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/lucene"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-plain_text.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /viewer/ace/mode-properties.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-space.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/mode-text.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/viewer/ace/mode-text.js -------------------------------------------------------------------------------- /viewer/ace/mode-textile.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:function(e){return e.charAt(0)=="h"?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};r.inherits(s,i),t.TextileHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./textile_highlight_rules").TextileHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return e=="intag"?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /viewer/ace/mode-toml.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language.boolean":"true|false"},"identifier"),t="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";this.$rules={start:[{token:"comment.toml",regex:/#.*$/},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[([^\\]]+)\\])"},{token:e,regex:t},{token:"support.date.toml",regex:"\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"},{token:"constant.numeric.toml",regex:"-?\\d+(\\.?\\d+)?"}],qqstring:[{token:"string",regex:"\\\\$",next:"qqstring"},{token:"constant.language.escape",regex:'\\\\[0tnr"\\\\]'},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.TomlHighlightRules=s}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./toml_highlight_rules").TomlHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /viewer/ace/mode-vhdl.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|shared|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|severity|signal|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /viewer/ace/snippets/abap.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/abap",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="abap"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/abc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/abc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet zupfnoter.print\n %%%%hn.print {"startpos": ${1:pos_y}, "t":"${2:title}", "v":[${3:voices}], "s":[[${4:syncvoices}1,2]], "f":[${5:flowlines}], "sf":[${6:subflowlines}], "j":[${7:jumplines}]}\n\nsnippet zupfnoter.note\n %%%%hn.note {"pos": [${1:pos_x},${2:pos_y}], "text": "${3:text}", "style": "${4:style}"}\n\nsnippet zupfnoter.annotation\n %%%%hn.annotation {"id": "${1:id}", "pos": [${2:pos}], "text": "${3:text}"}\n\nsnippet zupfnoter.lyrics\n %%%%hn.lyrics {"pos": [${1:x_pos},${2:y_pos}]}\n\nsnippet zupfnoter.legend\n %%%%hn.legend {"pos": [${1:x_pos},${2:y_pos}]}\n\n\n\nsnippet zupfnoter.target\n "^:${1:target}"\n\nsnippet zupfnoter.goto\n "^@${1:target}@${2:distance}"\n\nsnippet zupfnoter.annotationref\n "^#${1:target}"\n\nsnippet zupfnoter.annotation\n "^!${1:text}@${2:x_offset},${3:y_offset}"\n\n\n',t.scope="abc"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/ada.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ada",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ada"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/apache_conf.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/apache_conf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="apache_conf"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/applescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/applescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="applescript"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/asciidoc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/asciidoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="asciidoc"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/assembly_x86.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/assembly_x86",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="assembly_x86"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/autohotkey.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/autohotkey",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="autohotkey"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/batchfile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/batchfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="batchfile"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/bro.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/bro",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/c9search.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/c9search",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="c9search"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/c_cpp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/c_cpp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="## STL Collections\n# std::array\nsnippet array\n std::array<${1:T}, ${2:N}> ${3};${4}\n# std::vector\nsnippet vector\n std::vector<${1:T}> ${2};${3}\n# std::deque\nsnippet deque\n std::deque<${1:T}> ${2};${3}\n# std::forward_list\nsnippet flist\n std::forward_list<${1:T}> ${2};${3}\n# std::list\nsnippet list\n std::list<${1:T}> ${2};${3}\n# std::set\nsnippet set\n std::set<${1:T}> ${2};${3}\n# std::map\nsnippet map\n std::map<${1:Key}, ${2:T}> ${3};${4}\n# std::multiset\nsnippet mset\n std::multiset<${1:T}> ${2};${3}\n# std::multimap\nsnippet mmap\n std::multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_set\nsnippet uset\n std::unordered_set<${1:T}> ${2};${3}\n# std::unordered_map\nsnippet umap\n std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_multiset\nsnippet umset\n std::unordered_multiset<${1:T}> ${2};${3}\n# std::unordered_multimap\nsnippet ummap\n std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::stack\nsnippet stack\n std::stack<${1:T}> ${2};${3}\n# std::queue\nsnippet queue\n std::queue<${1:T}> ${2};${3}\n# std::priority_queue\nsnippet pqueue\n std::priority_queue<${1:T}> ${2};${3}\n##\n## Access Modifiers\n# private\nsnippet pri\n private\n# protected\nsnippet pro\n protected\n# public\nsnippet pub\n public\n# friend\nsnippet fr\n friend\n# mutable\nsnippet mu\n mutable\n## \n## Class\n# class\nsnippet cl\n class ${1:`Filename('$1', 'name')`} \n {\n public:\n $1(${2});\n ~$1();\n\n private:\n ${3:/* data */}\n };\n# member function implementation\nsnippet mfun\n ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n ${5:/* code */}\n }\n# namespace\nsnippet ns\n namespace ${1:`Filename('', 'my')`} {\n ${2}\n } /* namespace $1 */\n##\n## Input/Output\n# std::cout\nsnippet cout\n std::cout << ${1} << std::endl;${2}\n# std::cin\nsnippet cin\n std::cin >> ${1};${2}\n##\n## Iteration\n# for i \nsnippet fori\n for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }${5}\n\n# foreach\nsnippet fore\n for (${1:auto} ${2:i} : ${3:container}) {\n ${4:/* code */}\n }${5}\n# iterator\nsnippet iter\n for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n ${6}\n }${7}\n\n# auto iterator\nsnippet itera\n for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n ${2:std::cout << *$1 << std::endl;}\n }${3}\n##\n## Lambdas\n# lamda (one line)\nsnippet ld\n [${1}](${2}){${3:/* code */}}${4}\n# lambda (multi-line)\nsnippet lld\n [${1}](${2}){\n ${3:/* code */}\n }${4}\n",t.scope="c_cpp"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/cirru.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/cirru",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cirru"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/clojure.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/clojure",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet comm\n (comment\n ${1}\n )\nsnippet condp\n (condp ${1:pred} ${2:expr}\n ${3})\nsnippet def\n (def ${1})\nsnippet defm\n (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n ${5})\nsnippet defmm\n (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n (defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n ${4})\nsnippet defp\n (defprotocol ${1:name}\n ${2})\nsnippet defr\n (defrecord ${1:name} [${2:fields}]\n ${3:protocol}\n ${4})\nsnippet deft\n (deftest ${1:name}\n (is (= ${2:assertion})))\n ${3})\nsnippet is\n (is (= ${1} ${2}))\nsnippet defty\n (deftype ${1:Name} [${2:fields}]\n ${3:Protocol}\n ${4})\nsnippet doseq\n (doseq [${1:elem} ${2:coll}]\n ${3})\nsnippet fn\n (fn [${1:arg-list}] ${2})\nsnippet if\n (if ${1:test-expr}\n ${2:then-expr}\n ${3:else-expr})\nsnippet if-let \n (if-let [${1:result} ${2:test-expr}]\n (${3:then-expr} $1)\n (${4:else-expr}))\nsnippet imp\n (:import [${1:package}])\n & {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n (let [${1:name} ${2:expr}]\n ${3})\nsnippet letfn\n (letfn [(${1:name) [${2:args}]\n ${3})])\nsnippet map\n (map ${1:func} ${2:coll})\nsnippet mapl\n (map #(${1:lambda}) ${2:coll})\nsnippet met\n (${1:name} [${2:this} ${3:args}]\n ${4})\nsnippet ns\n (ns ${1:name}\n ${2})\nsnippet dotimes\n (dotimes [_ 10]\n (time\n (dotimes [_ ${1:times}]\n ${2})))\nsnippet pmethod\n (${1:name} [${2:this} ${3:args}])\nsnippet refer\n (:refer-clojure :exclude [${1}])\nsnippet require\n (:require [${1:namespace} :as [${2}]])\nsnippet use\n (:use [${1:namespace} :only [${2}]])\nsnippet print\n (println ${1})\nsnippet reduce\n (reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n (when ${1:test} ${2:body})\nsnippet when-let\n (when-let [${1:result} ${2:test}]\n ${3:body})\n',t.scope="clojure"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/cobol.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/cobol",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cobol"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/coffee.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/coffee",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Closure loop\nsnippet forindo\n for ${1:name} in ${2:array}\n do ($1) ->\n ${3:// body}\n# Array comprehension\nsnippet fora\n for ${1:name} in ${2:array}\n ${3:// body...}\n# Object comprehension\nsnippet foro\n for ${1:key}, ${2:value} of ${3:object}\n ${4:// body...}\n# Range comprehension (inclusive)\nsnippet forr\n for ${1:name} in [${2:start}..${3:finish}]\n ${4:// body...}\nsnippet forrb\n for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n ${5:// body...}\n# Range comprehension (exclusive)\nsnippet forrex\n for ${1:name} in [${2:start}...${3:finish}]\n ${4:// body...}\nsnippet forrexb\n for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n ${5:// body...}\n# Function\nsnippet fun\n (${1:args}) ->\n ${2:// body...}\n# Function (bound)\nsnippet bfun\n (${1:args}) =>\n ${2:// body...}\n# Class\nsnippet cla class ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n ${2}\nsnippet cla class .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n constructor: (${2:args}) ->\n ${3}\n\n ${4}\nsnippet cla class .. extends ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n ${3}\nsnippet cla class .. extends .. constructor: ..\n class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n constructor: (${3:args}) ->\n ${4}\n\n ${5}\n# If\nsnippet if\n if ${1:condition}\n ${2:// body...}\n# If __ Else\nsnippet ife\n if ${1:condition}\n ${2:// body...}\n else\n ${3:// body...}\n# Else if\nsnippet elif\n else if ${1:condition}\n ${2:// body...}\n# Ternary If\nsnippet ifte\n if ${1:condition} then ${2:value} else ${3:other}\n# Unless\nsnippet unl\n ${1:action} unless ${2:condition}\n# Switch\nsnippet swi\n switch ${1:object}\n when ${2:value}\n ${3:// body...}\n\n# Log\nsnippet log\n console.log ${1}\n# Try __ Catch\nsnippet try\n try\n ${1}\n catch ${2:error}\n ${3}\n# Require\nsnippet req\n ${2:$1} = require '${1:sys}'${3}\n# Export\nsnippet exp\n ${1:root} = exports ? this\n",t.scope="coffee"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/coldfusion.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/coldfusion",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="coldfusion"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/csharp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csharp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="csharp"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/csound_document.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csound_document",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# \nsnippet synth\n \n \n ${1}\n \n \n e\n \n \n",t.scope="csound_document"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/csound_orchestra.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csound_orchestra",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# else\nsnippet else\n else\n ${1:/* statements */}\n# elseif\nsnippet elseif\n elseif ${1:/* condition */} then\n ${2:/* statements */}\n# if\nsnippet if\n if ${1:/* condition */} then\n ${2:/* statements */}\n endif\n# instrument block\nsnippet instr\n instr ${1:name}\n ${2:/* statements */}\n endin\n# i-time while loop\nsnippet iwhile\n i${1:Index} = ${2:0}\n while i${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n i${1:Index} += 1\n od\n# k-rate while loop\nsnippet kwhile\n k${1:Index} = ${2:0}\n while k${1:Index} < ${3:/* count */} do\n ${4:/* statements */}\n k${1:Index} += 1\n od\n# opcode\nsnippet opcode\n opcode ${1:name}, ${2:/* output types */ 0}, ${3:/* input types */ 0}\n ${4:/* statements */}\n endop\n# until loop\nsnippet until\n until ${1:/* condition */} do\n ${2:/* statements */}\n od\n# while loop\nsnippet while\n while ${1:/* condition */} do\n ${2:/* statements */}\n od\n",t.scope="csound_orchestra"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/csound_score.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csound_score",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="csound_score"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/curly.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/curly",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="curly"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/d.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/d",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="d"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/dart.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dart",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lib\n library ${1};\n ${2}\nsnippet im\n import '${1}';\n ${2}\nsnippet pa\n part '${1}';\n ${2}\nsnippet pao\n part of ${1};\n ${2}\nsnippet main\n void main() {\n ${1:/* code */}\n }\nsnippet st\n static ${1}\nsnippet fi\n final ${1}\nsnippet re\n return ${1}\nsnippet br\n break;\nsnippet th\n throw ${1}\nsnippet cl\n class ${1:`Filename(\"\", \"untitled\")`} ${2}\nsnippet imp\n implements ${1}\nsnippet ext\n extends ${1}\nsnippet if\n if (${1:true}) {\n ${2}\n }\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${3}\n }\nsnippet el\n else\nsnippet sw\n switch (${1}) {\n ${2}\n }\nsnippet cs\n case ${1}:\n ${2}\nsnippet de\n default:\n ${1}\nsnippet for\n for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n ${4:$1[$2]}\n }\nsnippet fore\n for (final ${2:item} in ${1:itemList}) {\n ${3:/* code */}\n }\nsnippet wh\n while (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet dowh\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\nsnippet as\n assert(${1:/* condition */});\nsnippet try\n try {\n ${2}\n } catch (${1:Exception e}) {\n }\nsnippet tryf\n try {\n ${2}\n } catch (${1:Exception e}) {\n } finally {\n }\n",t.scope="dart"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/diff.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/diff",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\nsnippet header DEP-3 style header\n Description: ${1}\n Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n Bug: ${4:url in upstream bugtracker}\n Forwarded: ${5:no|not-needed|url}\n Author: ${6:`g:snips_author`}\n Reviewed-by: ${7:name and email}\n Last-Update: ${8:`strftime("%Y-%m-%d")`}\n Applied-Upstream: ${9:upstream version|url|commit}\n\n',t.scope="diff"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/dockerfile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dockerfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dockerfile"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/dot.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dot",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dot"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/drools.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/drools",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet rule\n rule "${1?:rule_name}"\n when\n ${2:// when...} \n then\n ${3:// then...}\n end\n\nsnippet query\n query ${1?:query_name}\n ${2:// find} \n end\n \nsnippet declare\n declare ${1?:type_name}\n ${2:// attributes} \n end\n\n',t.scope="drools"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/eiffel.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/eiffel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="eiffel"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/ejs.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ejs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ejs"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/elixir.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/elm.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/elm",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="elm"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/forth.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/forth",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="forth"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/fortran.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/fortran",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="fortran"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/ftl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ftl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ftl"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/gcode.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gcode"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/gherkin.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gherkin",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gherkin"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/gitignore.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gitignore",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gitignore"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/glsl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/glsl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="glsl"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/gobstones.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gobstones",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Procedure\nsnippet proc\n procedure ${1?:name}(${2:argument}) {\n ${3:// body...}\n }\n\n# Function\nsnippet fun\n function ${1?:name}(${2:argument}) {\n return ${3:// body...}\n }\n\n# Repeat\nsnippet rep\n repeat ${1?:times} {\n ${2:// body...}\n }\n\n# For\nsnippet for\n foreach ${1?:e} in ${2?:list} {\n ${3:// body...} \n }\n\n# If\nsnippet if\n if (${1?:condition}) {\n ${3:// body...} \n }\n\n# While\n while (${1?:condition}) {\n ${2:// body...} \n }\n",t.scope="gobstones"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/golang.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/golang",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="golang"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/graphqlschema.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/graphqlschema",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Type Snippet\ntrigger type\nsnippet type\n type ${1:type_name} {\n ${2:type_siblings}\n }\n\n# Input Snippet\ntrigger input\nsnippet input\n input ${1:input_name} {\n ${2:input_siblings}\n }\n\n# Interface Snippet\ntrigger interface\nsnippet interface\n interface ${1:interface_name} {\n ${2:interface_siblings}\n }\n\n# Interface Snippet\ntrigger union\nsnippet union\n union ${1:union_name} = ${2:type} | ${3: type}\n\n# Enum Snippet\ntrigger enum\nsnippet enum\n enum ${1:enum_name} {\n ${2:enum_siblings}\n }\n",t.scope="graphqlschema"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/groovy.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/groovy",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="groovy"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/haml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n",t.scope="haml"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/handlebars.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/haskell.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haskell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lang\n {-# LANGUAGE ${1:OverloadedStrings} #-}\nsnippet info\n -- |\n -- Module : ${1:Module.Namespace}\n -- Copyright : ${2:Author} ${3:2011-2012}\n -- License : ${4:BSD3}\n --\n -- Maintainer : ${5:email@something.com}\n -- Stability : ${6:experimental}\n -- Portability : ${7:unknown}\n --\n -- ${8:Description}\n --\nsnippet import\n import ${1:Data.Text}\nsnippet import2\n import ${1:Data.Text} (${2:head})\nsnippet importq\n import qualified ${1:Data.Text} as ${2:T}\nsnippet inst\n instance ${1:Monoid} ${2:Type} where\n ${3}\nsnippet type\n type ${1:Type} = ${2:Type}\nsnippet data\n data ${1:Type} = ${2:$1} ${3:Int}\nsnippet newtype\n newtype ${1:Type} = ${2:$1} ${3:Int}\nsnippet class\n class ${1:Class} a where\n ${2}\nsnippet module\n module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n ) where\n `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\nsnippet const\n ${1:name} :: ${2:a}\n $1 = ${3:undefined}\nsnippet fn\n ${1:fn} :: ${2:a} -> ${3:a}\n $1 ${4} = ${5:undefined}\nsnippet fn2\n ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n $1 ${5} = ${6:undefined}\nsnippet ap\n ${1:map} ${2:fn} ${3:list}\nsnippet do\n do\n \nsnippet \u03bb\n \\${1:x} -> ${2}\nsnippet \\\n \\${1:x} -> ${2}\nsnippet <-\n ${1:a} <- ${2:m a}\nsnippet \u2190\n ${1:a} <- ${2:m a}\nsnippet ->\n ${1:m a} -> ${2:a}\nsnippet \u2192\n ${1:m a} -> ${2:a}\nsnippet tup\n (${1:a}, ${2:b})\nsnippet tup2\n (${1:a}, ${2:b}, ${3:c})\nsnippet tup3\n (${1:a}, ${2:b}, ${3:c}, ${4:d})\nsnippet rec\n ${1:Record} { ${2:recFieldA} = ${3:undefined}\n , ${4:recFieldB} = ${5:undefined}\n }\nsnippet case\n case ${1:something} of\n ${2} -> ${3}\nsnippet let\n let ${1} = ${2}\n in ${3}\nsnippet where\n where\n ${1:fn} = ${2:undefined}\n",t.scope="haskell"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/haskell_cabal.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haskell_cabal",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="haskell_cabal"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/haxe.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haxe",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="haxe"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/hjson.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/hjson",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/html_elixir.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/html_elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_elixir"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/html_ruby.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/html_ruby",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_ruby"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/ini.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ini",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ini"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/io.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/io",["require","exports","module"],function(e,t,n){"use strict";t.snippets=[{content:"assertEquals(${1:expected}, ${2:expr})",name:"assertEquals",scope:"io",tabTrigger:"ae"},{content:"${1:${2:newValue} := ${3:Object} }clone do(\n $0\n)",name:"clone do",scope:"io",tabTrigger:"cdo"},{content:'docSlot("${1:slotName}", "${2:documentation}")',name:"docSlot",scope:"io",tabTrigger:"ds"},{content:"(${1:header,}\n ${2:body}\n)$0",keyEquivalent:"@(",name:"Indented Bracketed Line",scope:"io",tabTrigger:"("},{content:"\n $0\n",keyEquivalent:"\r",name:"Special: Return Inside Empty Parenthesis",scope:"io meta.empty-parenthesis.io, io meta.comma-parenthesis.io"},{content:"${1:methodName} := method(${2:args,}\n $0\n)",name:"method",scope:"io",tabTrigger:"m"},{content:'newSlot("${1:slotName}", ${2:defaultValue}, "${3:docString}")$0',name:"newSlot",scope:"io",tabTrigger:"ns"},{content:"${1:name} := Object clone do(\n $0\n)",name:"Object clone do",scope:"io",tabTrigger:"ocdo"},{content:"test${1:SomeFeature} := method(\n $0\n)",name:"testMethod",scope:"io",tabTrigger:"ts"},{content:"${1:Something}Test := ${2:UnitTest} clone do(\n $0\n)",name:"UnitTest",scope:"io",tabTrigger:"ut"}],t.scope="io"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/jack.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jack",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jack"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/jade.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jade",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jade"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/jsoniq.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsoniq",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="jsoniq"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/jssm.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jssm",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/jsx.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jsx"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/julia.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/julia",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="julia"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/kotlin.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/kotlin",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/latex.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/latex",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="latex"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/lean.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lean",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lean"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/less.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/less",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="less"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/liquid.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/liquid",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="liquid"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/lisp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lisp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lisp"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/live_script.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/live_script",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/livescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/livescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="livescript"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/logiql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/logiql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="logiql"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/lua.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lua",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet #!\n #!/usr/bin/env lua\n $1\nsnippet local\n local ${1:x} = ${2:1}\nsnippet fun\n function ${1:fname}(${2:...})\n ${3:-- body}\n end\nsnippet for\n for ${1:i}=${2:1},${3:10} do\n ${4:print(i)}\n end\nsnippet forp\n for ${1:i},${2:v} in pairs(${3:table_name}) do\n ${4:-- body}\n end\nsnippet fori\n for ${1:i},${2:v} in ipairs(${3:table_name}) do\n ${4:-- body}\n end\n",t.scope="lua"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/luapage.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/luapage",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="luapage"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/lucene.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lucene",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lucene"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/makefile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/makefile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet ifeq\n ifeq (${1:cond0},${2:cond1})\n ${3:code}\n endif\n",t.scope="makefile"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mask.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mask",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mask"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/matlab.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/matlab",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="matlab"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/maze.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/maze",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet >\ndescription assignment\nscope maze\n -> ${1}= ${2}\n\nsnippet >\ndescription if\nscope maze\n -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n",t.scope="maze"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mel.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mel"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mips_assembler.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mips_assembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mips_assembler"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mipsassembler.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mipsassembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mushcode.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mushcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mushcode"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/mysql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mysql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mysql"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/nix.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/nix",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="nix"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/nsis.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/nsis",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/objectivec.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/objectivec",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="objectivec"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/ocaml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ocaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ocaml"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/pascal.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/pascal",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pascal"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/pgsql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/pgsql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pgsql"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/pig.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/pig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pig"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/plain_text.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="plain_text"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/powershell.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/powershell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="powershell"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/praat.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/praat",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="praat"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/prolog.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/prolog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="prolog"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/protobuf.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/protobuf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="protobuf"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/r.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/r",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet #!\n #!/usr/bin/env Rscript\n\n# includes\nsnippet lib\n library(${1:package})\nsnippet req\n require(${1:package})\nsnippet source\n source(\'${1:file}\')\n\n# conditionals\nsnippet if\n if (${1:condition}) {\n ${2:code}\n }\nsnippet el\n else {\n ${1:code}\n }\nsnippet ei\n else if (${1:condition}) {\n ${2:code}\n }\n\n# functions\nsnippet fun\n ${1:name} = function (${2:variables}) {\n ${3:code}\n }\nsnippet ret\n return(${1:code})\n\n# dataframes, lists, etc\nsnippet df\n ${1:name}[${2:rows}, ${3:cols}]\nsnippet c\n c(${1:items})\nsnippet li\n list(${1:items})\nsnippet mat\n matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\n# apply functions\nsnippet apply\n apply(${1:array}, ${2:margin}, ${3:function})\nsnippet lapply\n lapply(${1:list}, ${2:function})\nsnippet sapply\n sapply(${1:list}, ${2:function})\nsnippet vapply\n vapply(${1:list}, ${2:function}, ${3:type})\nsnippet mapply\n mapply(${1:function}, ${2:...})\nsnippet tapply\n tapply(${1:vector}, ${2:index}, ${3:function})\nsnippet rapply\n rapply(${1:list}, ${2:function})\n\n# plyr functions\nsnippet dd\n ddply(${1:frame}, ${2:variables}, ${3:function})\nsnippet dl\n dlply(${1:frame}, ${2:variables}, ${3:function})\nsnippet da\n daply(${1:frame}, ${2:variables}, ${3:function})\nsnippet d_\n d_ply(${1:frame}, ${2:variables}, ${3:function})\n\nsnippet ad\n adply(${1:array}, ${2:margin}, ${3:function})\nsnippet al\n alply(${1:array}, ${2:margin}, ${3:function})\nsnippet aa\n aaply(${1:array}, ${2:margin}, ${3:function})\nsnippet a_\n a_ply(${1:array}, ${2:margin}, ${3:function})\n\nsnippet ld\n ldply(${1:list}, ${2:function})\nsnippet ll\n llply(${1:list}, ${2:function})\nsnippet la\n laply(${1:list}, ${2:function})\nsnippet l_\n l_ply(${1:list}, ${2:function})\n\nsnippet md\n mdply(${1:matrix}, ${2:function})\nsnippet ml\n mlply(${1:matrix}, ${2:function})\nsnippet ma\n maply(${1:matrix}, ${2:function})\nsnippet m_\n m_ply(${1:matrix}, ${2:function})\n\n# plot functions\nsnippet pl\n plot(${1:x}, ${2:y})\nsnippet ggp\n ggplot(${1:data}, aes(${2:aesthetics}))\nsnippet img\n ${1:(jpeg,bmp,png,tiff)}(filename="${2:filename}", width=${3}, height=${4}, unit="${5}")\n ${6:plot}\n dev.off()\n\n# statistical test functions\nsnippet fis\n fisher.test(${1:x}, ${2:y})\nsnippet chi\n chisq.test(${1:x}, ${2:y})\nsnippet tt\n t.test(${1:x}, ${2:y})\nsnippet wil\n wilcox.test(${1:x}, ${2:y})\nsnippet cor\n cor.test(${1:x}, ${2:y})\nsnippet fte\n var.test(${1:x}, ${2:y})\nsnippet kvt \n kv.test(${1:x}, ${2:y})\n',t.scope="r"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/razor.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/razor",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet if\n(${1} == ${2}) {\n ${3}\n}",t.scope="razor"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/rdoc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rdoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rdoc"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/red.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/red",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=" ",t.scope="red"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/rhtml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rhtml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rhtml"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/rst.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rst",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# rst\n\nsnippet :\n :${1:field name}: ${2:field body}\nsnippet *\n *${1:Emphasis}*\nsnippet **\n **${1:Strong emphasis}**\nsnippet _\n \\`${1:hyperlink-name}\\`_\n .. _\\`$1\\`: ${2:link-block}\nsnippet =\n ${1:Title}\n =====${2:=}\n ${3}\nsnippet -\n ${1:Title}\n -----${2:-}\n ${3}\nsnippet cont:\n .. contents::\n \n",t.scope="rst"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/rust.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rust",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rust"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sass.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sass",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sass"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/scad.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scad",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scad"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/scala.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scala",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scala"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/scheme.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scheme",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scheme"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/scss.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scss",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scss"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sh.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sh",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\nsnippet #!\n #!/usr/bin/env bash\n \nsnippet if\n if [[ ${1:condition} ]]; then\n ${2:#statements}\n fi\nsnippet elif\n elif [[ ${1:condition} ]]; then\n ${2:#statements}\nsnippet for\n for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n ${3:#statements}\n done\nsnippet fori\n for ${1:needle} in ${2:haystack} ; do\n ${3:#statements}\n done\nsnippet wh\n while [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet until\n until [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet case\n case ${1:word} in\n ${2:pattern})\n ${3};;\n esac\nsnippet go \n while getopts \'${1:o}\' ${2:opts} \n do \n case $$2 in\n ${3:o0})\n ${4:#staments};;\n esac\n done\n# Set SCRIPT_DIR variable to directory script is located.\nsnippet sdir\n SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"\n# getopt\nsnippet getopt\n __ScriptVersion="${1:version}"\n\n #=== FUNCTION ================================================================\n # NAME: usage\n # DESCRIPTION: Display usage information.\n #===============================================================================\n function usage ()\n {\n cat <<- EOT\n\n Usage : $${0:0} [options] [--] \n\n Options: \n -h|help Display this message\n -v|version Display script version\n\n EOT\n } # ---------- end of function usage ----------\n\n #-----------------------------------------------------------------------\n # Handle command line arguments\n #-----------------------------------------------------------------------\n\n while getopts ":hv" opt\n do\n case $opt in\n\n h|help ) usage; exit 0 ;;\n\n v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;;\n\n \\? ) echo -e "\\n Option does not exist : $OPTARG\\n"\n usage; exit 1 ;;\n\n esac # --- end of case ---\n done\n shift $(($OPTIND-1))\n\n',t.scope="sh"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sjs.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sjs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sjs"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/smarty.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/smarty",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="smarty"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# snippets for making snippets :)\nsnippet snip\n snippet ${1:trigger}\n ${2}\nsnippet msnip\n snippet ${1:trigger} ${2:description}\n ${3}\nsnippet v\n {VISUAL}\n",t.scope="snippets"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/soy_template.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/soy_template",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="soy_template"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/space.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/space",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="space"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sparql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sparql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/sqlserver.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sqlserver",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# ISNULL\nsnippet isnull\n ISNULL(${1:check_expression}, ${2:replacement_value})\n# FORMAT\nsnippet format\n FORMAT(${1:value}, ${2:format})\n# CAST\nsnippet cast\n CAST(${1:expression} AS ${2:data_type})\n# CONVERT\nsnippet convert\n CONVERT(${1:data_type}, ${2:expression})\n# DATEPART\nsnippet datepart\n DATEPART(${1:datepart}, ${2:date})\n# DATEDIFF\nsnippet datediff\n DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n# DATEADD\nsnippet dateadd\n DATEADD(${1:datepart}, ${2:number}, ${3:date})\n# DATEFROMPARTS \nsnippet datefromparts\n DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n# OBJECT_DEFINITION\nsnippet objectdef\n SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n# STUFF XML\nsnippet stuffxml\n STUFF((SELECT ', ' + ${1:ColumnName}\n FROM ${2:TableName}\n WHERE ${3:WhereClause}\n FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n# Create Procedure\nsnippet createproc\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE PROCEDURE ${4:Procedure_Name}\n ${5:/*Add the parameters for the stored procedure here*/}\n AS\n BEGIN\n -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n SET NOCOUNT ON;\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO\n# Create Scalar Function\nsnippet createfn\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE FUNCTION ${4:Scalar_Function_Name}\n -- Add the parameters for the function here\n RETURNS ${5:Function_Data_Type}\n AS\n BEGIN\n DECLARE @Result ${5:Function_Data_Type}\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO",t.scope="sqlserver"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/stylus.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/stylus",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="stylus"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/svg.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/svg",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="svg"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/swift.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/swig.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/swig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swig"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/tcl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/tcl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# #!/usr/bin/env tclsh\nsnippet #!\n #!/usr/bin/env tclsh\n \n# Process\nsnippet pro\n proc ${1:function_name} {${2:args}} {\n ${3:#body ...}\n }\n#xif\nsnippet xif\n ${1:expr}? ${2:true} : ${3:false}\n# Conditional\nsnippet if\n if {${1}} {\n ${2:# body...}\n }\n# Conditional if..else\nsnippet ife\n if {${1}} {\n ${2:# body...}\n } else {\n ${3:# else...}\n }\n# Conditional if..elsif..else\nsnippet ifee\n if {${1}} {\n ${2:# body...}\n } elseif {${3}} {\n ${4:# elsif...}\n } else {\n ${5:# else...}\n }\n# If catch then\nsnippet ifc\n if { [catch {${1:#do something...}} ${2:err}] } {\n ${3:# handle failure...}\n }\n# Catch\nsnippet catch\n catch {${1}} ${2:err} ${3:options}\n# While Loop\nsnippet wh\n while {${1}} {\n ${2:# body...}\n }\n# For Loop\nsnippet for\n for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n ${4:# body...}\n }\n# Foreach Loop\nsnippet fore\n foreach ${1:x} {${2:#list}} {\n ${3:# body...}\n }\n# after ms script...\nsnippet af\n after ${1:ms} ${2:#do something}\n# after cancel id\nsnippet afc\n after cancel ${1:id or script}\n# after idle\nsnippet afi\n after idle ${1:script}\n# after info id\nsnippet afin\n after info ${1:id}\n# Expr\nsnippet exp\n expr {${1:#expression here}}\n# Switch\nsnippet sw\n switch ${1:var} {\n ${3:pattern 1} {\n ${4:#do something}\n }\n default {\n ${2:#do something}\n }\n }\n# Case\nsnippet ca\n ${1:pattern} {\n ${2:#do something}\n }${3}\n# Namespace eval\nsnippet ns\n namespace eval ${1:path} {${2:#script...}}\n# Namespace current\nsnippet nsc\n namespace current\n",t.scope="tcl"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/textile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/textile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Jekyll post header\nsnippet header\n ---\n title: ${1:title}\n layout: post\n date: ${2:date} ${3:hour:minute:second} -05:00\n ---\n\n# Image\nsnippet img\n !${1:url}(${2:title}):${3:link}!\n\n# Table\nsnippet |\n |${1}|${2}\n\n# Link\nsnippet link\n "${1:link text}":${2:url}\n\n# Acronym\nsnippet (\n (${1:Expand acronym})${2}\n\n# Footnote\nsnippet fn\n [${1:ref number}] ${3}\n\n fn$1. ${2:footnote}\n \n',t.scope="textile"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/toml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/toml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="toml"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/tsx.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/tsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="tsx"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/turtle.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/turtle",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /viewer/ace/snippets/twig.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/twig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="twig"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/typescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/typescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="typescript"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/vbscript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/vbscript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vbscript"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/velocity.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/velocity",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# macro\nsnippet #macro\n #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n ${3:## macro code}\n #end\n# foreach\nsnippet #foreach\n #foreach ( ${1:\\$item} in ${2:\\$collection} )\n ${3:## foreach code}\n #end\n# if\nsnippet #if\n #if ( ${1:true} )\n ${0}\n #end\n# if ... else\nsnippet #ife\n #if ( ${1:true} )\n ${2}\n #else\n ${0}\n #end\n#import\nsnippet #import\n #import ( "${1:path/to/velocity/format}" )\n# set\nsnippet #set\n #set ( $${1:var} = ${0} )\n',t.scope="velocity",t.includeScopes=["html","javascript","css"]}) -------------------------------------------------------------------------------- /viewer/ace/snippets/verilog.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/verilog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="verilog"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/vhdl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/vhdl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vhdl"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/wollok.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/wollok",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='##\n## Basic Java packages and import\nsnippet im\n import\nsnippet w.l\n wollok.lang\nsnippet w.i\n wollok.lib\n\n## Class and object\nsnippet cl\n class ${1:`Filename("", "untitled")`} ${2}\nsnippet obj\n object ${1:`Filename("", "untitled")`} ${2:inherits Parent}${3}\nsnippet te\n test ${1:`Filename("", "untitled")`}\n\n##\n## Enhancements\nsnippet inh\n inherits\n\n##\n## Comments\nsnippet /*\n /*\n * ${1}\n */\n\n##\n## Control Statements\nsnippet el\n else\nsnippet if\n if (${1}) ${2}\n\n##\n## Create a Method\nsnippet m\n method ${1:method}(${2}) ${5}\n\n## \n## Tests\nsnippet as\n assert.equals(${1:expected}, ${2:actual})\n\n##\n## Exceptions\nsnippet ca\n catch ${1:e} : (${2:Exception} ) ${3}\nsnippet thr\n throw\nsnippet try\n try {\n ${3}\n } catch ${1:e} : ${2:Exception} {\n }\n\n##\n## Javadocs\nsnippet /**\n /**\n * ${1}\n */\n\n##\n## Print Methods\nsnippet print\n console.println("${1:Message}")\n\n##\n## Setter and Getter Methods\nsnippet set\n method set${1:}(${2:}) {\n $1 = $2\n }\nsnippet get\n method get${1:}() {\n return ${1:};\n }\n\n##\n## Terminate Methods or Loops\nsnippet re\n return',t.scope="wollok"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/xml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/xml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="xml"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/xquery.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/xquery",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="xquery"}) -------------------------------------------------------------------------------- /viewer/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"}) -------------------------------------------------------------------------------- /viewer/ace/theme-clouds.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/clouds",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-clouds",t.cssText='.ace-clouds .ace_gutter {background: #ebebeb;color: #333}.ace-clouds .ace_print-margin {width: 1px;background: #e8e8e8}.ace-clouds {background-color: #FFFFFF;color: #000000}.ace-clouds .ace_cursor {color: #000000}.ace-clouds .ace_marker-layer .ace_selection {background: #BDD5FC}.ace-clouds.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-clouds .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-clouds .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-clouds .ace_gutter-active-line {background-color : #dcdcdc}.ace-clouds .ace_marker-layer .ace_selected-word {border: 1px solid #BDD5FC}.ace-clouds .ace_invisible {color: #BFBFBF}.ace-clouds .ace_keyword,.ace-clouds .ace_meta,.ace-clouds .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-clouds .ace_keyword.ace_operator {color: #484848}.ace-clouds .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-clouds .ace_constant.ace_language {color: #39946A}.ace-clouds .ace_constant.ace_numeric {color: #46A609}.ace-clouds .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-clouds .ace_invalid {background-color: #FF002A}.ace-clouds .ace_fold {background-color: #AF956F;border-color: #000000}.ace-clouds .ace_storage,.ace-clouds .ace_support.ace_class,.ace-clouds .ace_support.ace_function,.ace-clouds .ace_support.ace_other,.ace-clouds .ace_support.ace_type {color: #C52727}.ace-clouds .ace_string {color: #5D90CD}.ace-clouds .ace_comment {color: #BCC8BA}.ace-clouds .ace_entity.ace_name.ace_tag,.ace-clouds .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-clouds_midnight.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-clouds-midnight",t.cssText=".ace-clouds-midnight .ace_gutter {background: #232323;color: #929292}.ace-clouds-midnight .ace_print-margin {width: 1px;background: #232323}.ace-clouds-midnight {background-color: #191919;color: #929292}.ace-clouds-midnight .ace_cursor {color: #7DA5DC}.ace-clouds-midnight .ace_marker-layer .ace_selection {background: #000000}.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #191919;}.ace-clouds-midnight .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-clouds-midnight .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds-midnight .ace_marker-layer .ace_active-line {background: rgba(215, 215, 215, 0.031)}.ace-clouds-midnight .ace_gutter-active-line {background-color: rgba(215, 215, 215, 0.031)}.ace-clouds-midnight .ace_marker-layer .ace_selected-word {border: 1px solid #000000}.ace-clouds-midnight .ace_invisible {color: #666}.ace-clouds-midnight .ace_keyword,.ace-clouds-midnight .ace_meta,.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {color: #927C5D}.ace-clouds-midnight .ace_keyword.ace_operator {color: #4B4B4B}.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {color: #366F1A}.ace-clouds-midnight .ace_constant.ace_language {color: #39946A}.ace-clouds-midnight .ace_constant.ace_numeric {color: #46A609}.ace-clouds-midnight .ace_constant.ace_character.ace_entity {color: #A165AC}.ace-clouds-midnight .ace_invalid {color: #FFFFFF;background-color: #E92E2E}.ace-clouds-midnight .ace_fold {background-color: #927C5D;border-color: #929292}.ace-clouds-midnight .ace_storage,.ace-clouds-midnight .ace_support.ace_class,.ace-clouds-midnight .ace_support.ace_function,.ace-clouds-midnight .ace_support.ace_other,.ace-clouds-midnight .ace_support.ace_type {color: #E92E2E}.ace-clouds-midnight .ace_string {color: #5D90CD}.ace-clouds-midnight .ace_comment {color: #3C403B}.ace-clouds-midnight .ace_entity.ace_name.ace_tag,.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds-midnight .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-cobalt.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-cobalt",t.cssText=".ace-cobalt .ace_gutter {background: #011e3a;color: rgb(128,145,160)}.ace-cobalt .ace_print-margin {width: 1px;background: #555555}.ace-cobalt {background-color: #002240;color: #FFFFFF}.ace-cobalt .ace_cursor {color: #FFFFFF}.ace-cobalt .ace_marker-layer .ace_selection {background: rgba(179, 101, 57, 0.75)}.ace-cobalt.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002240;}.ace-cobalt .ace_marker-layer .ace_step {background: rgb(127, 111, 19)}.ace-cobalt .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_marker-layer .ace_selected-word {border: 1px solid rgba(179, 101, 57, 0.75)}.ace-cobalt .ace_invisible {color: rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_keyword,.ace-cobalt .ace_meta {color: #FF9D00}.ace-cobalt .ace_constant,.ace-cobalt .ace_constant.ace_character,.ace-cobalt .ace_constant.ace_character.ace_escape,.ace-cobalt .ace_constant.ace_other {color: #FF628C}.ace-cobalt .ace_invalid {color: #F8F8F8;background-color: #800F00}.ace-cobalt .ace_support {color: #80FFBB}.ace-cobalt .ace_support.ace_constant {color: #EB939A}.ace-cobalt .ace_fold {background-color: #FF9D00;border-color: #FFFFFF}.ace-cobalt .ace_support.ace_function {color: #FFB054}.ace-cobalt .ace_storage {color: #FFEE80}.ace-cobalt .ace_entity {color: #FFDD00}.ace-cobalt .ace_string {color: #3AD900}.ace-cobalt .ace_string.ace_regexp {color: #80FFC2}.ace-cobalt .ace_comment {font-style: italic;color: #0088FF}.ace-cobalt .ace_heading,.ace-cobalt .ace_markup.ace_heading {color: #C8E4FD;background-color: #001221}.ace-cobalt .ace_list,.ace-cobalt .ace_markup.ace_list {background-color: #130D26}.ace-cobalt .ace_variable {color: #CCCCCC}.ace-cobalt .ace_variable.ace_language {color: #FF80E1}.ace-cobalt .ace_meta.ace_tag {color: #9EFFFF}.ace-cobalt .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-dawn.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/dawn",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-dawn",t.cssText=".ace-dawn .ace_gutter {background: #ebebeb;color: #333}.ace-dawn .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dawn {background-color: #F9F9F9;color: #080808}.ace-dawn .ace_cursor {color: #000000}.ace-dawn .ace_marker-layer .ace_selection {background: rgba(39, 95, 255, 0.30)}.ace-dawn.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #F9F9F9;}.ace-dawn .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-dawn .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(75, 75, 126, 0.50)}.ace-dawn .ace_marker-layer .ace_active-line {background: rgba(36, 99, 180, 0.12)}.ace-dawn .ace_gutter-active-line {background-color : #dcdcdc}.ace-dawn .ace_marker-layer .ace_selected-word {border: 1px solid rgba(39, 95, 255, 0.30)}.ace-dawn .ace_invisible {color: rgba(75, 75, 126, 0.50)}.ace-dawn .ace_keyword,.ace-dawn .ace_meta {color: #794938}.ace-dawn .ace_constant,.ace-dawn .ace_constant.ace_character,.ace-dawn .ace_constant.ace_character.ace_escape,.ace-dawn .ace_constant.ace_other {color: #811F24}.ace-dawn .ace_invalid.ace_illegal {text-decoration: underline;font-style: italic;color: #F8F8F8;background-color: #B52A1D}.ace-dawn .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #B52A1D}.ace-dawn .ace_support {color: #691C97}.ace-dawn .ace_support.ace_constant {color: #B4371F}.ace-dawn .ace_fold {background-color: #794938;border-color: #080808}.ace-dawn .ace_list,.ace-dawn .ace_markup.ace_list,.ace-dawn .ace_support.ace_function {color: #693A17}.ace-dawn .ace_storage {font-style: italic;color: #A71D5D}.ace-dawn .ace_string {color: #0B6125}.ace-dawn .ace_string.ace_regexp {color: #CF5628}.ace-dawn .ace_comment {font-style: italic;color: #5A525F}.ace-dawn .ace_heading,.ace-dawn .ace_markup.ace_heading {color: #19356D}.ace-dawn .ace_variable {color: #234A97}.ace-dawn .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-dracula.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/dracula",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-dracula",t.cssText="ace-dracula .ace_gutter {background: #282a36;color: rgb(144,145,148)}.ace-dracula .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dracula {background-color: #282a36;color: #f8f8f2}.ace-dracula .ace_cursor {color: #f8f8f0}.ace-dracula .ace_marker-layer .ace_selection {background: #44475a}.ace-dracula.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #282a36;border-radius: 2px}.ace-dracula .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-dracula .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #3B3A32}.ace-dracula .ace_marker-layer .ace_active-line {background: #44475a}.ace-dracula .ace_gutter-active-line {background-color: #44475a}.ace-dracula .ace_marker-layer .ace_selected-word {border: 1px solid #44475a}.ace-dracula .ace_fold {background-color: #50fa7b;border-color: #f8f8f2}.ace-dracula .ace_keyword {color: #ff79c6}.ace-dracula .ace_constant.ace_language {color: #bd93f9}.ace-dracula .ace_constant.ace_numeric {color: #bd93f9}.ace-dracula .ace_constant.ace_character {color: #bd93f9}.ace-dracula .ace_constant.ace_character.ace_escape {color: #ff79c6}.ace-dracula .ace_constant.ace_other {color: #bd93f9}.ace-dracula .ace_support.ace_function {color: #8be9fd}.ace-dracula .ace_support.ace_constant {color: #6be5fd}.ace-dracula .ace_support.ace_class {font-style: italic;color: #66d9ef}.ace-dracula .ace_support.ace_type {font-style: italic;color: #66d9ef}.ace-dracula .ace_storage {color: #ff79c6}.ace-dracula .ace_storage.ace_type {font-style: italic;color: #8be9fd}.ace-dracula .ace_invalid {color: #F8F8F0;background-color: #ff79c6}.ace-dracula .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #bd93f9}.ace-dracula .ace_string {color: #f1fa8c}.ace-dracula .ace_comment {color: #6272a4}.ace-dracula .ace_variable {color: #50fa7b}.ace-dracula .ace_variable.ace_parameter {font-style: italic;color: #ffb86c}.ace-dracula .ace_entity.ace_other.ace_attribute-name {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_function {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_tag {color: #ff79c6}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-eclipse.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse {background-color: #FFFFFF;color: black;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_cursor {color: black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(113, 150, 130);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {color: darkblue;}.ace-eclipse .ace_tag {color: rgb(25, 118, 116);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(25, 118, 116);}.ace-eclipse .ace_invisible {color: #ddd;}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_gutter-active-line {background-color : #DADADA;}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.cssClass="ace-eclipse";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-github.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/github",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-gob.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/gob",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gob",t.cssText=".ace-gob .ace_gutter {background: #0B1818;color: #03EE03}.ace-gob .ace_print-margin {width: 1px;background: #131313}.ace-gob {background-color: #0B0B0B;color: #00FF00}.ace-gob .ace_cursor {border-color: rgba(16, 248, 255, 0.90);background-color: rgba(16, 240, 248, 0.70);opacity: 0.4;}.ace-gob .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-gob.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #141414;}.ace-gob .ace_marker-layer .ace_step {background: rgb(16, 128, 0)}.ace-gob .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(64, 255, 255, 0.25)}.ace-gob .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.04)}.ace-gob .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.04)}.ace-gob .ace_marker-layer .ace_selected-word {border: 1px solid rgba(192, 240, 255, 0.20)}.ace-gob .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-gob .ace_keyword,.ace-gob .ace_meta {color: #10D8E8}.ace-gob .ace_constant,.ace-gob .ace_constant.ace_character,.ace-gob .ace_constant.ace_character.ace_escape,.ace-gob .ace_constant.ace_other,.ace-gob .ace_heading,.ace-gob .ace_markup.ace_heading,.ace-gob .ace_support.ace_constant {color: #10F0A0}.ace-gob .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-gob .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #20F8C0}.ace-gob .ace_support {color: #20E8B0}.ace-gob .ace_fold {background-color: #50B8B8;border-color: #70F8F8}.ace-gob .ace_support.ace_function {color: #00F800}.ace-gob .ace_list,.ace-gob .ace_markup.ace_list,.ace-gob .ace_storage {color: #10FF98}.ace-gob .ace_entity.ace_name.ace_function,.ace-gob .ace_meta.ace_tag,.ace-gob .ace_variable {color: #00F868}.ace-gob .ace_string {color: #10F060}.ace-gob .ace_string.ace_regexp {color: #20F090;}.ace-gob .ace_comment {font-style: italic;color: #00E060;}.ace-gob .ace_variable {color: #00F888;}.ace-gob .ace_xml-pe {color: #488858;}.ace-gob .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-gruvbox.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox",t.cssText='.ace-gruvbox .ace_gutter-active-line {background-color: #3C3836;}.ace-gruvbox {color: #EBDAB4;background-color: #1D2021;}.ace-gruvbox .ace_invisible {color: #504945;}.ace-gruvbox .ace_marker-layer .ace_selection {background: rgba(179, 101, 57, 0.75)}.ace-gruvbox.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002240;}.ace-gruvbox .ace_keyword {color: #8ec07c;}.ace-gruvbox .ace_comment {font-style: italic;color: #928375;}.ace-gruvbox .ace-statement {color: red;}.ace-gruvbox .ace_variable {color: #84A598;}.ace-gruvbox .ace_variable.ace_language {color: #D2879B;}.ace-gruvbox .ace_constant {color: #C2859A;}.ace-gruvbox .ace_constant.ace_language {color: #C2859A;}.ace-gruvbox .ace_constant.ace_numeric {color: #C2859A;}.ace-gruvbox .ace_string {color: #B8BA37;}.ace-gruvbox .ace_support {color: #F9BC41;}.ace-gruvbox .ace_support.ace_function {color: #F84B3C;}.ace-gruvbox .ace_storage {color: #8FBF7F;}.ace-gruvbox .ace_keyword.ace_operator {color: #EBDAB4;}.ace-gruvbox .ace_punctuation.ace_operator {color: yellow;}.ace-gruvbox .ace_marker-layer .ace_active-line {background: #3C3836;}.ace-gruvbox .ace_marker-layer .ace_selected-word {border-radius: 4px;border: 8px solid #3f475d;}.ace-gruvbox .ace_print-margin {width: 5px;background: #3C3836;}.ace-gruvbox .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-idle_fingers.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-idle-fingers",t.cssText=".ace-idle-fingers .ace_gutter {background: #3b3b3b;color: rgb(153,153,153)}.ace-idle-fingers .ace_print-margin {width: 1px;background: #3b3b3b}.ace-idle-fingers {background-color: #323232;color: #FFFFFF}.ace-idle-fingers .ace_cursor {color: #91FF00}.ace-idle-fingers .ace_marker-layer .ace_selection {background: rgba(90, 100, 126, 0.88)}.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #323232;}.ace-idle-fingers .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-idle-fingers .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-idle-fingers .ace_marker-layer .ace_active-line {background: #353637}.ace-idle-fingers .ace_gutter-active-line {background-color: #353637}.ace-idle-fingers .ace_marker-layer .ace_selected-word {border: 1px solid rgba(90, 100, 126, 0.88)}.ace-idle-fingers .ace_invisible {color: #404040}.ace-idle-fingers .ace_keyword,.ace-idle-fingers .ace_meta {color: #CC7833}.ace-idle-fingers .ace_constant,.ace-idle-fingers .ace_constant.ace_character,.ace-idle-fingers .ace_constant.ace_character.ace_escape,.ace-idle-fingers .ace_constant.ace_other,.ace-idle-fingers .ace_support.ace_constant {color: #6C99BB}.ace-idle-fingers .ace_invalid {color: #FFFFFF;background-color: #FF0000}.ace-idle-fingers .ace_fold {background-color: #CC7833;border-color: #FFFFFF}.ace-idle-fingers .ace_support.ace_function {color: #B83426}.ace-idle-fingers .ace_variable.ace_parameter {font-style: italic}.ace-idle-fingers .ace_string {color: #A5C261}.ace-idle-fingers .ace_string.ace_regexp {color: #CCCC33}.ace-idle-fingers .ace_comment {font-style: italic;color: #BC9458}.ace-idle-fingers .ace_meta.ace_tag {color: #FFE5BB}.ace-idle-fingers .ace_entity.ace_name {color: #FFC66D}.ace-idle-fingers .ace_collab.ace_user1 {color: #323232;background-color: #FFF980}.ace-idle-fingers .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-kr_theme.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-kr-theme",t.cssText=".ace-kr-theme .ace_gutter {background: #1c1917;color: #FCFFE0}.ace-kr-theme .ace_print-margin {width: 1px;background: #1c1917}.ace-kr-theme {background-color: #0B0A09;color: #FCFFE0}.ace-kr-theme .ace_cursor {color: #FF9900}.ace-kr-theme .ace_marker-layer .ace_selection {background: rgba(170, 0, 255, 0.45)}.ace-kr-theme.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0B0A09;}.ace-kr-theme .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-kr-theme .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_marker-layer .ace_active-line {background: #38403D}.ace-kr-theme .ace_gutter-active-line {background-color : #38403D}.ace-kr-theme .ace_marker-layer .ace_selected-word {border: 1px solid rgba(170, 0, 255, 0.45)}.ace-kr-theme .ace_invisible {color: rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_keyword,.ace-kr-theme .ace_meta {color: #949C8B}.ace-kr-theme .ace_constant,.ace-kr-theme .ace_constant.ace_character,.ace-kr-theme .ace_constant.ace_character.ace_escape,.ace-kr-theme .ace_constant.ace_other {color: rgba(210, 117, 24, 0.76)}.ace-kr-theme .ace_invalid {color: #F8F8F8;background-color: #A41300}.ace-kr-theme .ace_support {color: #9FC28A}.ace-kr-theme .ace_support.ace_constant {color: #C27E66}.ace-kr-theme .ace_fold {background-color: #949C8B;border-color: #FCFFE0}.ace-kr-theme .ace_support.ace_function {color: #85873A}.ace-kr-theme .ace_storage {color: #FFEE80}.ace-kr-theme .ace_string {color: rgba(164, 161, 181, 0.8)}.ace-kr-theme .ace_string.ace_regexp {color: rgba(125, 255, 192, 0.65)}.ace-kr-theme .ace_comment {font-style: italic;color: #706D5B}.ace-kr-theme .ace_variable {color: #D1A796}.ace-kr-theme .ace_list,.ace-kr-theme .ace_markup.ace_list {background-color: #0F0040}.ace-kr-theme .ace_variable.ace_language {color: #FF80E1}.ace-kr-theme .ace_meta.ace_tag {color: #BABD9C}.ace-kr-theme .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-kuroir.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-kuroir",t.cssText=".ace-kuroir .ace_gutter {background: #e8e8e8;color: #333;}.ace-kuroir .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-kuroir {background-color: #E8E9E8;color: #363636;}.ace-kuroir .ace_cursor {color: #202020;}.ace-kuroir .ace_marker-layer .ace_selection {background: rgba(245, 170, 0, 0.57);}.ace-kuroir.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #E8E9E8;}.ace-kuroir .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-kuroir .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(0, 0, 0, 0.29);}.ace-kuroir .ace_marker-layer .ace_active-line {background: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_gutter-active-line {background-color: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_marker-layer .ace_selected-word {border: 1px solid rgba(245, 170, 0, 0.57);}.ace-kuroir .ace_invisible {color: #BFBFBF}.ace-kuroir .ace_fold {border-color: #363636;}.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;font-style:italic;color:#FD1732;background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-merbivore.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-merbivore",t.cssText=".ace-merbivore .ace_gutter {background: #202020;color: #E6E1DC}.ace-merbivore .ace_print-margin {width: 1px;background: #555651}.ace-merbivore {background-color: #161616;color: #E6E1DC}.ace-merbivore .ace_cursor {color: #FFFFFF}.ace-merbivore .ace_marker-layer .ace_selection {background: #454545}.ace-merbivore.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #161616;}.ace-merbivore .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-merbivore .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-merbivore .ace_marker-layer .ace_active-line {background: #333435}.ace-merbivore .ace_gutter-active-line {background-color: #333435}.ace-merbivore .ace_marker-layer .ace_selected-word {border: 1px solid #454545}.ace-merbivore .ace_invisible {color: #404040}.ace-merbivore .ace_entity.ace_name.ace_tag,.ace-merbivore .ace_keyword,.ace-merbivore .ace_meta,.ace-merbivore .ace_meta.ace_tag,.ace-merbivore .ace_storage,.ace-merbivore .ace_support.ace_function {color: #FC6F09}.ace-merbivore .ace_constant,.ace-merbivore .ace_constant.ace_character,.ace-merbivore .ace_constant.ace_character.ace_escape,.ace-merbivore .ace_constant.ace_other,.ace-merbivore .ace_support.ace_type {color: #1EDAFB}.ace-merbivore .ace_constant.ace_character.ace_escape {color: #519F50}.ace-merbivore .ace_constant.ace_language {color: #FDC251}.ace-merbivore .ace_constant.ace_library,.ace-merbivore .ace_string,.ace-merbivore .ace_support.ace_constant {color: #8DFF0A}.ace-merbivore .ace_constant.ace_numeric {color: #58C554}.ace-merbivore .ace_invalid {color: #FFFFFF;background-color: #990000}.ace-merbivore .ace_fold {background-color: #FC6F09;border-color: #E6E1DC}.ace-merbivore .ace_comment {font-style: italic;color: #AD2EA4}.ace-merbivore .ace_entity.ace_other.ace_attribute-name {color: #FFFF89}.ace-merbivore .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-merbivore_soft.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-merbivore-soft",t.cssText=".ace-merbivore-soft .ace_gutter {background: #262424;color: #E6E1DC}.ace-merbivore-soft .ace_print-margin {width: 1px;background: #262424}.ace-merbivore-soft {background-color: #1C1C1C;color: #E6E1DC}.ace-merbivore-soft .ace_cursor {color: #FFFFFF}.ace-merbivore-soft .ace_marker-layer .ace_selection {background: #494949}.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #1C1C1C;}.ace-merbivore-soft .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-merbivore-soft .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-merbivore-soft .ace_marker-layer .ace_active-line {background: #333435}.ace-merbivore-soft .ace_gutter-active-line {background-color: #333435}.ace-merbivore-soft .ace_marker-layer .ace_selected-word {border: 1px solid #494949}.ace-merbivore-soft .ace_invisible {color: #404040}.ace-merbivore-soft .ace_entity.ace_name.ace_tag,.ace-merbivore-soft .ace_keyword,.ace-merbivore-soft .ace_meta,.ace-merbivore-soft .ace_meta.ace_tag,.ace-merbivore-soft .ace_storage {color: #FC803A}.ace-merbivore-soft .ace_constant,.ace-merbivore-soft .ace_constant.ace_character,.ace-merbivore-soft .ace_constant.ace_character.ace_escape,.ace-merbivore-soft .ace_constant.ace_other,.ace-merbivore-soft .ace_support.ace_type {color: #68C1D8}.ace-merbivore-soft .ace_constant.ace_character.ace_escape {color: #B3E5B4}.ace-merbivore-soft .ace_constant.ace_language {color: #E1C582}.ace-merbivore-soft .ace_constant.ace_library,.ace-merbivore-soft .ace_string,.ace-merbivore-soft .ace_support.ace_constant {color: #8EC65F}.ace-merbivore-soft .ace_constant.ace_numeric {color: #7FC578}.ace-merbivore-soft .ace_invalid,.ace-merbivore-soft .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #FE3838}.ace-merbivore-soft .ace_fold {background-color: #FC803A;border-color: #E6E1DC}.ace-merbivore-soft .ace_comment,.ace-merbivore-soft .ace_meta {font-style: italic;color: #AC4BB8}.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {color: #EAF1A3}.ace-merbivore-soft .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-monokai.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-pastel_on_dark.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-pastel-on-dark",t.cssText=".ace-pastel-on-dark .ace_gutter {background: #353030;color: #8F938F}.ace-pastel-on-dark .ace_print-margin {width: 1px;background: #353030}.ace-pastel-on-dark {background-color: #2C2828;color: #8F938F}.ace-pastel-on-dark .ace_cursor {color: #A7A7A7}.ace-pastel-on-dark .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2C2828;}.ace-pastel-on-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-pastel-on-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_keyword,.ace-pastel-on-dark .ace_meta {color: #757aD8}.ace-pastel-on-dark .ace_constant,.ace-pastel-on-dark .ace_constant.ace_character,.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,.ace-pastel-on-dark .ace_constant.ace_other {color: #4FB7C5}.ace-pastel-on-dark .ace_keyword.ace_operator {color: #797878}.ace-pastel-on-dark .ace_constant.ace_character {color: #AFA472}.ace-pastel-on-dark .ace_constant.ace_language {color: #DE8E30}.ace-pastel-on-dark .ace_constant.ace_numeric {color: #CCCCCC}.ace-pastel-on-dark .ace_invalid,.ace-pastel-on-dark .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-pastel-on-dark .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-pastel-on-dark .ace_fold {background-color: #757aD8;border-color: #8F938F}.ace-pastel-on-dark .ace_support.ace_function {color: #AEB2F8}.ace-pastel-on-dark .ace_string {color: #66A968}.ace-pastel-on-dark .ace_string.ace_regexp {color: #E9C062}.ace-pastel-on-dark .ace_comment {color: #A6C6FF}.ace-pastel-on-dark .ace_variable {color: #BEBF55}.ace-pastel-on-dark .ace_variable.ace_language {color: #C1C144}.ace-pastel-on-dark .ace_xml-pe {color: #494949}.ace-pastel-on-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-solarized_dark.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark {background-color: #002B36;color: #93A1A1}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage {color: #93A1A1}.ace-solarized-dark .ace_cursor,.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-solarized_light.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-solarized-light",t.cssText=".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light {background-color: #FDF6E3;color: #586E75}.ace-solarized-light .ace_cursor {color: #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: rgba(7, 54, 67, 0.09)}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #EDE5C1}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-textmate.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-tomorrow.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-twilight.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/twilight",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=".ace-twilight .ace_gutter {background: #232323;color: #E2E2E2}.ace-twilight .ace_print-margin {width: 1px;background: #232323}.ace-twilight {background-color: #141414;color: #F8F8F8}.ace-twilight .ace_cursor {color: #A7A7A7}.ace-twilight .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-twilight.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #141414;}.ace-twilight .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-twilight .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-twilight .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-twilight .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-twilight .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-twilight .ace_keyword,.ace-twilight .ace_meta {color: #CDA869}.ace-twilight .ace_constant,.ace-twilight .ace_constant.ace_character,.ace-twilight .ace_constant.ace_character.ace_escape,.ace-twilight .ace_constant.ace_other,.ace-twilight .ace_heading,.ace-twilight .ace_markup.ace_heading,.ace-twilight .ace_support.ace_constant {color: #CF6A4C}.ace-twilight .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-twilight .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-twilight .ace_support {color: #9B859D}.ace-twilight .ace_fold {background-color: #AC885B;border-color: #F8F8F8}.ace-twilight .ace_support.ace_function {color: #DAD085}.ace-twilight .ace_list,.ace-twilight .ace_markup.ace_list,.ace-twilight .ace_storage {color: #F9EE98}.ace-twilight .ace_entity.ace_name.ace_function,.ace-twilight .ace_meta.ace_tag,.ace-twilight .ace_variable {color: #AC885B}.ace-twilight .ace_string {color: #8F9D6A}.ace-twilight .ace_string.ace_regexp {color: #E9C062}.ace-twilight .ace_comment {font-style: italic;color: #5F5A60}.ace-twilight .ace_variable {color: #7587A6}.ace-twilight .ace_xml-pe {color: #494949}.ace-twilight .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-vibrant_ink.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-vibrant-ink",t.cssText=".ace-vibrant-ink .ace_gutter {background: #1a1a1a;color: #BEBEBE}.ace-vibrant-ink .ace_print-margin {width: 1px;background: #1a1a1a}.ace-vibrant-ink {background-color: #0F0F0F;color: #FFFFFF}.ace-vibrant-ink .ace_cursor {color: #FFFFFF}.ace-vibrant-ink .ace_marker-layer .ace_selection {background: #6699CC}.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0F0F0F;}.ace-vibrant-ink .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-vibrant-ink .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #404040}.ace-vibrant-ink .ace_marker-layer .ace_active-line {background: #333333}.ace-vibrant-ink .ace_gutter-active-line {background-color: #333333}.ace-vibrant-ink .ace_marker-layer .ace_selected-word {border: 1px solid #6699CC}.ace-vibrant-ink .ace_invisible {color: #404040}.ace-vibrant-ink .ace_keyword,.ace-vibrant-ink .ace_meta {color: #FF6600}.ace-vibrant-ink .ace_constant,.ace-vibrant-ink .ace_constant.ace_character,.ace-vibrant-ink .ace_constant.ace_character.ace_escape,.ace-vibrant-ink .ace_constant.ace_other {color: #339999}.ace-vibrant-ink .ace_constant.ace_numeric {color: #99CC99}.ace-vibrant-ink .ace_invalid,.ace-vibrant-ink .ace_invalid.ace_deprecated {color: #CCFF33;background-color: #000000}.ace-vibrant-ink .ace_fold {background-color: #FFCC00;border-color: #FFFFFF}.ace-vibrant-ink .ace_entity.ace_name.ace_function,.ace-vibrant-ink .ace_support.ace_function,.ace-vibrant-ink .ace_variable {color: #FFCC00}.ace-vibrant-ink .ace_variable.ace_parameter {font-style: italic}.ace-vibrant-ink .ace_string {color: #66FF00}.ace-vibrant-ink .ace_string.ace_regexp {color: #44B4CC}.ace-vibrant-ink .ace_comment {color: #9933CC}.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {font-style: italic;color: #99CC99}.ace-vibrant-ink .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/ace/theme-xcode.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /viewer/img/ArmMbedLogo.svg: -------------------------------------------------------------------------------- 1 | arm_mbed_lockup_horizontal -------------------------------------------------------------------------------- /viewer/img/led_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/viewer/img/led_blue.png -------------------------------------------------------------------------------- /viewer/img/led_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/viewer/img/led_red.png -------------------------------------------------------------------------------- /viewer/img/led_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/viewer/img/led_white.png -------------------------------------------------------------------------------- /viewer/img/led_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janjongboom/mbed-simulator/75ebeb0c65601882eb3b93f37aa0d46450804ade/viewer/img/led_yellow.png -------------------------------------------------------------------------------- /viewer/js-hal/pinnames.js: -------------------------------------------------------------------------------- 1 | // Created from targets/TARGET_SIMULATOR/PinNames.h 2 | window.MbedJSHal = window.MbedJSHal || {}; 3 | window.MbedJSHal.PinNames = { 4 | 'p5': 9, 5 | 'p6': 8, 6 | 'p7': 7, 7 | 'p8': 6, 8 | 'p9': 0, 9 | 'p10': 1, 10 | 'p11': 18, 11 | 'p12': 17, 12 | 'p13': 15, 13 | 'p14': 16, 14 | 'p15': 23, 15 | 'p16': 24, 16 | 'p17': 25, 17 | 'p18': 26, 18 | 'p19': 62, 19 | 'p20': 63, 20 | 'p21': 69, 21 | 'p22': 68, 22 | 'p23': 67, 23 | 'p24': 66, 24 | 'p25': 65, 25 | 'p26': 64, 26 | 'p27': 11, 27 | 'p28': 10, 28 | 'p29': 5, 29 | 'p30': 4, 30 | 31 | 'LED1': 50, 32 | 'LED2': 52, 33 | 'LED3': 53, 34 | 'LED4': 55, 35 | 36 | 'BUTTON1': 1337, 37 | 38 | 'I2C_SCL1': 1, 39 | 'I2C_SDA1': 0, 40 | 'I2C_SCL2': 11, // pin used by application board 41 | 'I2C_SDA2': 10, // pin used by application board 42 | 'I2C_SCL': 11, 43 | 'I2C_SDA': 10, 44 | 45 | 'SPI_MOSI': 9, 46 | 'SPI_MISO': 8, 47 | 'SPI_SCK': 7 48 | }; 49 | -------------------------------------------------------------------------------- /viewer/js-hal/sleep.js: -------------------------------------------------------------------------------- 1 | window.MbedJSHal.sleep = (function() { 2 | 3 | var started = Date.now(); 4 | 5 | function uptime() { 6 | return (Date.now() - started) * 1000; // this is in us 7 | } 8 | 9 | return { 10 | uptime: uptime 11 | }; 12 | 13 | })(); -------------------------------------------------------------------------------- /viewer/js-hal/timers.js: -------------------------------------------------------------------------------- 1 | window.MbedJSHal.timers = (function() { 2 | 3 | var tickers = {}; 4 | var timeouts = {}; 5 | 6 | // HAL functions (these are called from C++) 7 | function ticker_setup(id, interval) { 8 | // console.log('ticker_setup', id, interval); 9 | 10 | if (tickers[id]) { 11 | clearInterval(tickers[id]); 12 | } 13 | 14 | tickers[id] = setInterval(() => { 15 | ccall('invoke_ticker', null, [ 'number' ], [ id ], { async: true }); 16 | }, interval); 17 | } 18 | 19 | function ticker_detach(id) { 20 | // console.log('ticker_detach', id); 21 | 22 | if (!(id in tickers)) return // console.error('ticker_detach called on non-registered ticker...'); 23 | 24 | clearInterval(tickers[id]); 25 | delete tickers[id]; 26 | } 27 | 28 | return { 29 | ticker_setup: ticker_setup, 30 | ticker_detach: ticker_detach 31 | }; 32 | 33 | })(); -------------------------------------------------------------------------------- /viewer/js-ui/components/base_component.js: -------------------------------------------------------------------------------- 1 | (function(exports) { 2 | 3 | function BaseComponent() { 4 | 5 | } 6 | 7 | BaseComponent.prototype.createDestroyEl = function() { 8 | var destroy = document.createElement('span'); 9 | destroy.classList.add('destroy'); 10 | destroy.textContent = 'X'; 11 | destroy.onclick = function() { 12 | if (confirm('Do you want to delete this component?')) { 13 | this.destroy(); 14 | } 15 | }.bind(this); 16 | 17 | return destroy; 18 | }; 19 | 20 | BaseComponent.prototype.pinNameForPin = function(pin) { 21 | return Object.keys(MbedJSHal.PinNames).find(function(p) { 22 | return MbedJSHal.PinNames[p] === pin; 23 | }.bind(this)); 24 | }; 25 | 26 | exports.BaseComponent = BaseComponent; 27 | 28 | })(window.MbedJSUI); 29 | -------------------------------------------------------------------------------- /viewer/js-ui/components/led.js: -------------------------------------------------------------------------------- 1 | (function(exports) { 2 | function Led(img, pins) { 3 | exports.BaseComponent.call(this); 4 | 5 | this.img = img; 6 | this.dataPin = pins.LED; 7 | 8 | this.componentsEl = document.querySelector('#components'); 9 | this._on_pin_write = this.on_pin_write.bind(this); 10 | } 11 | 12 | Led.prototype = Object.create(exports.BaseComponent.prototype); 13 | 14 | Led.prototype.init = function() { 15 | window.MbedJSHal.gpio.on('pin_write', this._on_pin_write); 16 | 17 | var el = this._el = document.createElement('div'); 18 | el.classList.add('component'); 19 | el.classList.add('led'); 20 | var p = document.createElement('p'); 21 | p.classList.add('description'); 22 | 23 | p.textContent = 'LED (' + this.pinNameForPin(this.dataPin) + ')'; 24 | 25 | p.appendChild(this.createDestroyEl()); 26 | el.appendChild(p); 27 | 28 | var img = document.createElement('img'); 29 | img.src = '/img/' + this.img; 30 | img.style.width = '30px'; 31 | el.appendChild(img); 32 | 33 | this.componentsEl.appendChild(el); 34 | 35 | this._on_pin_write(this.dataPin, MbedJSHal.gpio.read(this.dataPin), MbedJSHal.gpio.get_type(this.dataPin)); 36 | }; 37 | 38 | Led.prototype.destroy = function() { 39 | window.MbedJSHal.gpio.removeListener('pin_write', this._on_pin_write); 40 | 41 | window.removeComponent(this); 42 | 43 | this.componentsEl.removeChild(this._el); 44 | }; 45 | 46 | Led.prototype.on_pin_write = function(pin, value, type) { 47 | if (pin !== this.dataPin) return; 48 | 49 | if (type === MbedJSHal.gpio.TYPE.DIGITAL) { 50 | this._el.querySelector('img').style.opacity = value === 1 ? '1' : '0.3'; 51 | } 52 | else if (type === MbedJSHal.gpio.TYPE.PWM) { 53 | this._el.querySelector('img').style.opacity = (value / 1024 * 0.7) + 0.3; 54 | } 55 | else { 56 | console.error('LED only supports DIGITAL|PWM, not', type); 57 | } 58 | }; 59 | 60 | exports.LedRed = Led.bind(Led, 'led_red.png'); 61 | exports.LedBlue = Led.bind(Led, 'led_blue.png'); 62 | exports.LedYellow = Led.bind(Led, 'led_yellow.png'); 63 | exports.LedWhite = Led.bind(Led, 'led_white.png'); 64 | 65 | })(window.MbedJSUI); 66 | -------------------------------------------------------------------------------- /viewer/js-ui/components/thermistor.js: -------------------------------------------------------------------------------- 1 | (function(exports) { 2 | function Thermistor(pins) { 3 | exports.BaseComponent.call(this); 4 | 5 | this.dataPin = pins.Thermistor; 6 | 7 | this.componentsEl = document.querySelector('#components'); 8 | } 9 | 10 | Thermistor.prototype = Object.create(exports.BaseComponent.prototype); 11 | 12 | Thermistor.prototype.init = function() { 13 | var self = this; 14 | 15 | var el = this._el = document.createElement('div'); 16 | el.classList.add('component'); 17 | el.classList.add('thermistor'); 18 | var p = document.createElement('p'); 19 | p.classList.add('description'); 20 | 21 | p.textContent = 'Thermistor (' + this.pinNameForPin(this.dataPin) + ')'; 22 | 23 | p.appendChild(this.createDestroyEl()); 24 | el.appendChild(p); 25 | 26 | var range = document.createElement('input'); 27 | range.setAttribute('min', 0); 28 | range.setAttribute('max', 5); 29 | range.step = 0.01; 30 | range.value = MbedJSHal.gpio.read(this.dataPin) / 1024 * 5; 31 | range.setAttribute('type', 'range'); 32 | 33 | range.addEventListener('change', function() { 34 | window.MbedJSHal.gpio.write(self.dataPin, range.value / 5 * 1024); 35 | }); 36 | 37 | var rangeP = document.createElement('p'); 38 | rangeP.appendChild(range); 39 | 40 | el.appendChild(rangeP); 41 | 42 | var voltageP = document.createElement('p'); 43 | var voltageMin = document.createElement('span'); 44 | voltageMin.classList.add('voltage-min'); 45 | voltageMin.textContent = '0V'; 46 | var voltageMax = document.createElement('span'); 47 | voltageMax.classList.add('voltage-max'); 48 | voltageMax.textContent = '5V'; 49 | 50 | voltageP.appendChild(voltageMin); 51 | voltageP.appendChild(voltageMax); 52 | 53 | el.appendChild(voltageP); 54 | 55 | this.componentsEl.appendChild(el); 56 | }; 57 | 58 | Thermistor.prototype.destroy = function() { 59 | window.removeComponent(this); 60 | 61 | this.componentsEl.removeChild(this._el); 62 | }; 63 | 64 | exports.Thermistor = Thermistor; 65 | 66 | })(window.MbedJSUI); 67 | -------------------------------------------------------------------------------- /viewer/js-ui/ga.js: -------------------------------------------------------------------------------- 1 | if (location.host.indexOf('localhost') === 0) { 2 | ga = function(a, b) { 3 | console.log('ga event', a, b); 4 | }; 5 | } 6 | else { 7 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 8 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 9 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 10 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 11 | } 12 | 13 | ga('create', 'UA-3800502-30'); 14 | ga('send', 'pageview'); 15 | --------------------------------------------------------------------------------