Showing preview only (5,202K chars total). Download the full file or copy to clipboard to get everything.
Repository: frg-fossee/eSim-Cloud
Branch: master
Commit: 2d8a2e898e9d
Files: 522
Total size: 4.9 MB
Directory structure:
gitextract_5zs9hdle/
├── .all-contributorsrc
├── .github/
│ └── workflows/
│ ├── angularTestBuild.yml
│ ├── devDockerCompose.yml
│ ├── dockerTestBackend.yml
│ ├── masterDockerCompose.yml
│ ├── prodContainers.yml
│ ├── reactEslint.yml
│ └── reactTestBuild.yml
├── .gitignore
├── ArduinoFrontend/
│ ├── .editorconfig
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── angular.json
│ ├── e2e/
│ │ ├── protractor-ci.conf.js
│ │ ├── protractor.conf.js
│ │ ├── src/
│ │ │ ├── app.e2e-spec.ts
│ │ │ └── app.po.ts
│ │ └── tsconfig.e2e.json
│ ├── package.json
│ ├── src/
│ │ ├── app/
│ │ │ ├── Libs/
│ │ │ │ ├── AVR8/
│ │ │ │ │ ├── Execute.ts
│ │ │ │ │ ├── IntelHex.ts
│ │ │ │ │ └── Scheduler.ts
│ │ │ │ ├── Battery.ts
│ │ │ │ ├── CircuitElement.spec.ts
│ │ │ │ ├── CircuitElement.ts
│ │ │ │ ├── ConvertJSONFormat.ts
│ │ │ │ ├── Download.ts
│ │ │ │ ├── General.ts
│ │ │ │ ├── Geometry.ts
│ │ │ │ ├── ImageToByteArray.ts
│ │ │ │ ├── Login.ts
│ │ │ │ ├── MathUtils.ts
│ │ │ │ ├── Miscellaneous.ts
│ │ │ │ ├── Point.ts
│ │ │ │ ├── RaphaelUtils.ts
│ │ │ │ ├── SaveOffiline.ts
│ │ │ │ ├── SaveOnline.ts
│ │ │ │ ├── UndoUtils.ts
│ │ │ │ ├── Utils.ts
│ │ │ │ ├── Wire.ts
│ │ │ │ ├── Workspace.ts
│ │ │ │ ├── drivers/
│ │ │ │ │ └── L293D.ts
│ │ │ │ ├── inputs/
│ │ │ │ │ ├── Buttons.ts
│ │ │ │ │ ├── Collision.ts
│ │ │ │ │ ├── GasSensor.ts
│ │ │ │ │ ├── PIRSensor.ts
│ │ │ │ │ ├── PhotoResistor.ts
│ │ │ │ │ ├── Potentiometer.ts
│ │ │ │ │ ├── Relay.ts
│ │ │ │ │ ├── Slider.ts
│ │ │ │ │ ├── TemperatureSensors.ts
│ │ │ │ │ ├── Thermistor.ts
│ │ │ │ │ └── UltrasonicSensor.ts
│ │ │ │ └── outputs/
│ │ │ │ ├── Arduino.ts
│ │ │ │ ├── Buzzer.ts
│ │ │ │ ├── Display.ts
│ │ │ │ ├── LCD/
│ │ │ │ │ ├── LCDPanel.spec.ts
│ │ │ │ │ ├── LCDPanel.ts
│ │ │ │ │ ├── LCDStates.ts
│ │ │ │ │ ├── LCDUtils.ts
│ │ │ │ │ └── MemorySchema.ts
│ │ │ │ ├── Led.ts
│ │ │ │ └── Motors.ts
│ │ │ ├── alert/
│ │ │ │ ├── alert-modal/
│ │ │ │ │ ├── alert-modal.component.css
│ │ │ │ │ ├── alert-modal.component.html
│ │ │ │ │ ├── alert-modal.component.spec.ts
│ │ │ │ │ └── alert-modal.component.ts
│ │ │ │ ├── alert-service/
│ │ │ │ │ ├── alert.service.spec.ts
│ │ │ │ │ └── alert.service.ts
│ │ │ │ ├── confirm-modal/
│ │ │ │ │ ├── confirm-modal.component.css
│ │ │ │ │ ├── confirm-modal.component.html
│ │ │ │ │ ├── confirm-modal.component.spec.ts
│ │ │ │ │ └── confirm-modal.component.ts
│ │ │ │ └── option-modal/
│ │ │ │ ├── option-modal.component.css
│ │ │ │ ├── option-modal.component.html
│ │ │ │ └── option-modal.component.ts
│ │ │ ├── api.service.spec.ts
│ │ │ ├── api.service.ts
│ │ │ ├── app-routing.module.ts
│ │ │ ├── app.component.css
│ │ │ ├── app.component.html
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.module.ts
│ │ │ ├── code-editor/
│ │ │ │ ├── code-editor.component.css
│ │ │ │ ├── code-editor.component.html
│ │ │ │ ├── code-editor.component.spec.ts
│ │ │ │ └── code-editor.component.ts
│ │ │ ├── common/
│ │ │ │ ├── SharedModule.module.ts
│ │ │ │ └── material.module.ts
│ │ │ ├── componentlist/
│ │ │ │ ├── componentlist.component.css
│ │ │ │ ├── componentlist.component.html
│ │ │ │ ├── componentlist.component.spec.ts
│ │ │ │ └── componentlist.component.ts
│ │ │ ├── dashboard/
│ │ │ │ ├── dashboard-routing.module.ts
│ │ │ │ ├── dashboard.component.css
│ │ │ │ ├── dashboard.component.html
│ │ │ │ ├── dashboard.component.spec.ts
│ │ │ │ ├── dashboard.component.ts
│ │ │ │ └── dashboard.module.ts
│ │ │ ├── exit-confirm-dialog/
│ │ │ │ ├── exit-confirm-dialog.component.css
│ │ │ │ ├── exit-confirm-dialog.component.html
│ │ │ │ ├── exit-confirm-dialog.component.spec.ts
│ │ │ │ └── exit-confirm-dialog.component.ts
│ │ │ ├── export-jsondialog/
│ │ │ │ ├── export-jsondialog.component.css
│ │ │ │ ├── export-jsondialog.component.html
│ │ │ │ ├── export-jsondialog.component.spec.ts
│ │ │ │ └── export-jsondialog.component.ts
│ │ │ ├── exportfile/
│ │ │ │ ├── exportfile.component.css
│ │ │ │ ├── exportfile.component.html
│ │ │ │ ├── exportfile.component.spec.ts
│ │ │ │ └── exportfile.component.ts
│ │ │ ├── front-page/
│ │ │ │ ├── front-page.component.css
│ │ │ │ ├── front-page.component.html
│ │ │ │ ├── front-page.component.spec.ts
│ │ │ │ └── front-page.component.ts
│ │ │ ├── gallery/
│ │ │ │ ├── gallery.component.css
│ │ │ │ ├── gallery.component.html
│ │ │ │ ├── gallery.component.spec.ts
│ │ │ │ └── gallery.component.ts
│ │ │ ├── graph/
│ │ │ │ ├── graph.component.css
│ │ │ │ ├── graph.component.html
│ │ │ │ └── graph.component.ts
│ │ │ ├── graph-data.service.ts
│ │ │ ├── graphlist/
│ │ │ │ ├── graphlist.component.css
│ │ │ │ ├── graphlist.component.html
│ │ │ │ └── graphlist.component.ts
│ │ │ ├── header/
│ │ │ │ ├── header.component.css
│ │ │ │ ├── header.component.html
│ │ │ │ ├── header.component.spec.ts
│ │ │ │ └── header.component.ts
│ │ │ ├── layout/
│ │ │ │ ├── ArduinoCanvasInterface.ts
│ │ │ │ ├── Components.ts
│ │ │ │ └── PathUtils.ts
│ │ │ ├── lti-form/
│ │ │ │ ├── lti-form.component.css
│ │ │ │ ├── lti-form.component.html
│ │ │ │ ├── lti-form.component.ts
│ │ │ │ └── view-code/
│ │ │ │ ├── view-code.component.css
│ │ │ │ ├── view-code.component.html
│ │ │ │ └── view-code.component.ts
│ │ │ ├── main-page/
│ │ │ │ ├── main-page.component.css
│ │ │ │ ├── main-page.component.html
│ │ │ │ ├── main-page.component.spec.ts
│ │ │ │ └── main-page.component.ts
│ │ │ ├── side-panel/
│ │ │ │ ├── side-panel.component.css
│ │ │ │ ├── side-panel.component.html
│ │ │ │ ├── side-panel.component.spec.ts
│ │ │ │ └── side-panel.component.ts
│ │ │ ├── simulator/
│ │ │ │ ├── save-project-dialog/
│ │ │ │ │ ├── save-project-dialog.component.html
│ │ │ │ │ ├── save-project-dialog.component.spec.ts
│ │ │ │ │ └── save-project-dialog.component.ts
│ │ │ │ ├── simulator.component.css
│ │ │ │ ├── simulator.component.html
│ │ │ │ ├── simulator.component.spec.ts
│ │ │ │ └── simulator.component.ts
│ │ │ ├── submissionlist/
│ │ │ │ ├── submissionlist.component.css
│ │ │ │ ├── submissionlist.component.html
│ │ │ │ └── submissionlist.component.ts
│ │ │ ├── versioning-panel/
│ │ │ │ ├── create-variation-dialog/
│ │ │ │ │ ├── create-variation-dialog.component.css
│ │ │ │ │ ├── create-variation-dialog.component.html
│ │ │ │ │ └── create-variation-dialog.component.ts
│ │ │ │ ├── versioning-panel.component.css
│ │ │ │ ├── versioning-panel.component.html
│ │ │ │ └── versioning-panel.component.ts
│ │ │ ├── view-component-info/
│ │ │ │ ├── view-component-info.component.css
│ │ │ │ ├── view-component-info.component.html
│ │ │ │ ├── view-component-info.component.spec.ts
│ │ │ │ └── view-component-info.component.ts
│ │ │ └── view-project/
│ │ │ ├── view-project.component.css
│ │ │ ├── view-project.component.html
│ │ │ ├── view-project.component.spec.ts
│ │ │ └── view-project.component.ts
│ │ ├── assets/
│ │ │ ├── .gitkeep
│ │ │ ├── 404page.html
│ │ │ ├── avr8js/
│ │ │ │ └── index.js
│ │ │ ├── canvg/
│ │ │ │ ├── index.babel.js
│ │ │ │ ├── index.es.js
│ │ │ │ ├── index.js
│ │ │ │ └── umd.js
│ │ │ ├── images/
│ │ │ │ ├── ComponentmeasuresForSimulation.txt
│ │ │ │ └── RGB CODE.txt
│ │ │ ├── jsons/
│ │ │ │ ├── Arduino.json
│ │ │ │ ├── Battery9v.json
│ │ │ │ ├── Breadboard.json
│ │ │ │ ├── Buzzer.json
│ │ │ │ ├── CoinCell.json
│ │ │ │ ├── Component.sample.json
│ │ │ │ ├── L293D.json
│ │ │ │ ├── L298N.json
│ │ │ │ ├── LCD16X2.json
│ │ │ │ ├── LED.json
│ │ │ │ ├── MQ2.json
│ │ │ │ ├── Motor.json
│ │ │ │ ├── PIRSensor.json
│ │ │ │ ├── PhotoResistor.json
│ │ │ │ ├── Potentiometer.json
│ │ │ │ ├── PushButton.json
│ │ │ │ ├── RGBLED.json
│ │ │ │ ├── Relay.json
│ │ │ │ ├── Resistor.json
│ │ │ │ ├── ServoMotor.json
│ │ │ │ ├── SevenSegment.json
│ │ │ │ ├── SlideSwitch.json
│ │ │ │ ├── TMP36.json
│ │ │ │ ├── Thermistor.json
│ │ │ │ ├── UltrasonicSensor.json
│ │ │ │ └── help.json
│ │ │ └── samples/
│ │ │ └── Samples.json
│ │ ├── browserslist
│ │ ├── environments/
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── index.html
│ │ ├── karma.conf.js
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ ├── styles.css
│ │ ├── test.ts
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.spec.json
│ │ └── tslint.json
│ ├── tsconfig.json
│ └── tslint.json
├── Assembly_support.md
├── CONFIG.md
├── CONTRIBUTING.md
├── Enhancements/
│ └── Arduino/
│ └── Assembly_support.md
├── JMeter/
│ ├── README.md
│ ├── libAPI.csv
│ ├── libAPI.jmx
│ └── simulationAPI.jmx
├── LICENSE
├── Nginx/
│ ├── conf.d/
│ │ └── local.conf
│ ├── dev.conf.d/
│ │ └── local.conf
│ └── static_pages/
│ └── index/
│ ├── css/
│ │ ├── normalize.css
│ │ └── skeleton.css
│ └── index.html
├── README.md
├── ansible/
│ ├── ansible-playbook.yml
│ ├── configure-containers.yml
│ └── configure-instance.yml
├── docker-compose.dev.yml
├── docker-compose.prod.yml
├── docs/
│ ├── arduino/
│ │ ├── components.rst
│ │ └── index.rst
│ ├── arduinoCloud/
│ │ ├── features.rst
│ │ ├── flow.rst
│ │ ├── index.rst
│ │ └── screenshots.rst
│ ├── conf.py
│ ├── contribute/
│ │ ├── Contributing.rst
│ │ ├── ContributingGuidelines.rst
│ │ ├── NewIssue.rst
│ │ ├── PullRequest.rst
│ │ └── index.rst
│ ├── contributors/
│ │ └── index.rst
│ ├── developerDocs/
│ │ ├── apidocs.rst
│ │ ├── dbswitch.rst
│ │ └── index.rst
│ ├── docker/
│ │ ├── env_variables.rst
│ │ ├── index.rst
│ │ └── installation.rst
│ ├── eSim_on_Cloud/
│ │ ├── eSimGallery.rst
│ │ ├── features.rst
│ │ ├── flow.rst
│ │ ├── index.rst
│ │ └── screenshots.rst
│ ├── index.rst
│ ├── overview/
│ │ └── index.rst
│ ├── requirements.txt
│ └── specs/
│ └── swagger_openapi.yml
├── eda-frontend/
│ ├── .dockerignore
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── package.json
│ ├── public/
│ │ ├── index.html
│ │ └── manifest.json
│ └── src/
│ ├── App.js
│ ├── App.test.js
│ ├── __snapshots__/
│ │ └── App.test.js.snap
│ ├── components/
│ │ ├── Dashboard/
│ │ │ ├── DashboardHome.js
│ │ │ ├── DashboardOtherProjects.js
│ │ │ ├── DashboardSidebar.js
│ │ │ ├── ProgressPanel.js
│ │ │ ├── ProjectCard.js
│ │ │ ├── SchematicCard.js
│ │ │ └── SchematicsList.js
│ │ ├── LTI/
│ │ │ ├── CompareGraph.js
│ │ │ ├── Helper/
│ │ │ │ └── Testcase.js
│ │ │ ├── LTI.css
│ │ │ ├── LTI.js
│ │ │ ├── SubmissionTable.js
│ │ │ └── SubmitResults.js
│ │ ├── Project/
│ │ │ ├── ChangeStatus.js
│ │ │ ├── CreateProject.js
│ │ │ ├── ProjectSimulationParameters.js
│ │ │ ├── ProjectTimeline.js
│ │ │ └── ReportComponent.js
│ │ ├── SchematicEditor/
│ │ │ ├── ComponentProperties.js
│ │ │ ├── ComponentSidebar.js
│ │ │ ├── Header.js
│ │ │ ├── Helper/
│ │ │ │ ├── ComponentDrag.js
│ │ │ │ ├── ComponentParametersData.js
│ │ │ │ ├── KeyboardShorcuts.js
│ │ │ │ ├── KiCadFileUtils.js
│ │ │ │ ├── SchematicEditor.css
│ │ │ │ ├── SideBar.js
│ │ │ │ ├── SvgParser.js
│ │ │ │ └── ToolbarTools.js
│ │ │ ├── PropertiesSidebar.js
│ │ │ ├── RightSidebar.js
│ │ │ ├── SchematicToolbar.js
│ │ │ ├── SideComp.js
│ │ │ ├── SimulationProperties.js
│ │ │ ├── ToolbarExtension.js
│ │ │ └── VersionComponent.js
│ │ ├── Shared/
│ │ │ ├── Graph.js
│ │ │ ├── Layout.js
│ │ │ ├── LayoutMain.js
│ │ │ ├── LayoutSidebar.js
│ │ │ ├── Navbar.js
│ │ │ ├── Notice.js
│ │ │ ├── SimulationScreen.js
│ │ │ ├── Snackbar.js
│ │ │ └── helper/
│ │ │ └── Notice.css
│ │ └── Simulator/
│ │ ├── Editor.js
│ │ ├── NetlistUpload.js
│ │ └── textToFile.js
│ ├── index.css
│ ├── index.js
│ ├── pages/
│ │ ├── Account/
│ │ │ └── ChangePassword.js
│ │ ├── Dashboard.js
│ │ ├── Gallery.js
│ │ ├── Home.js
│ │ ├── LTISetup.js
│ │ ├── Login.js
│ │ ├── NotFound.js
│ │ ├── ProjectPage.js
│ │ ├── Projects.js
│ │ ├── ResetPassword/
│ │ │ ├── Confirmation.js
│ │ │ └── Initiation.js
│ │ ├── SchematiEditor.js
│ │ ├── Simulator.js
│ │ ├── SubmissionPage.js
│ │ └── signUp.js
│ ├── redux/
│ │ ├── actions/
│ │ │ ├── accountActions.js
│ │ │ ├── actions.js
│ │ │ ├── authActions.js
│ │ │ ├── componentPropertiesActions.js
│ │ │ ├── dashboardActions.js
│ │ │ ├── galleryActions.js
│ │ │ ├── index.js
│ │ │ ├── netlistActions.js
│ │ │ ├── projectActions.js
│ │ │ ├── saveSchematicActions.js
│ │ │ ├── schematicEditorActions.js
│ │ │ └── simulationActions.js
│ │ ├── reducers/
│ │ │ ├── accountReducer.js
│ │ │ ├── authReducer.js
│ │ │ ├── componentPropertiesReducer.js
│ │ │ ├── dashboardReducer.js
│ │ │ ├── galleryReducer.js
│ │ │ ├── index.js
│ │ │ ├── netlistReducer.js
│ │ │ ├── projectReducer.js
│ │ │ ├── saveSchematicReducer.js
│ │ │ ├── schematicEditorReducer.js
│ │ │ └── simulationReducer.js
│ │ └── store.js
│ ├── serviceWorker.js
│ ├── setupTests.js
│ ├── theme.js
│ └── utils/
│ └── Api.js
├── esim-cloud-backend/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── arduinoAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── tasks.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── authAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── templates/
│ │ │ ├── activate_user.html
│ │ │ ├── css/
│ │ │ │ ├── normalize.css
│ │ │ │ └── skeleton.css
│ │ │ └── google_callback.html
│ │ ├── tests.py
│ │ ├── token.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── esimCloud/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── celery.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── generate_svg.sh
│ ├── kicad-symbols/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── additional/
│ │ │ ├── 4xxx.dcm
│ │ │ ├── 4xxx.lib
│ │ │ ├── Analog.dcm
│ │ │ ├── Analog.lib
│ │ │ ├── Device.dcm
│ │ │ ├── Device.lib
│ │ │ ├── Diode.dcm
│ │ │ ├── Diode.lib
│ │ │ ├── LED.dcm
│ │ │ ├── LED.lib
│ │ │ ├── Motor.dcm
│ │ │ ├── Motor.lib
│ │ │ ├── Oscillator.dcm
│ │ │ ├── Oscillator.lib
│ │ │ ├── Transistor_FET.dcm
│ │ │ ├── Transistor_FET.lib
│ │ │ ├── Transistor_IGBT.dcm
│ │ │ ├── Transistor_IGBT.lib
│ │ │ ├── Triac_Thyristor.dcm
│ │ │ ├── Triac_Thyristor.lib
│ │ │ ├── eSim_Hybrid.dcm
│ │ │ └── eSim_Hybrid.lib
│ │ └── default/
│ │ ├── Transistor_BJT.dcm
│ │ ├── Transistor_BJT.lib
│ │ ├── eSim_Sources.dcm
│ │ ├── eSim_Sources.lib
│ │ ├── power.dcm
│ │ ├── power.lib
│ │ ├── pspice.dcm
│ │ └── pspice.lib
│ ├── libAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── forms.py
│ │ ├── helper/
│ │ │ ├── main.py
│ │ │ ├── parser.py
│ │ │ └── plotter.py
│ │ ├── lib_utils.py
│ │ ├── management/
│ │ │ └── commands/
│ │ │ ├── createsuperuser_noinput.py
│ │ │ └── load_default_libs.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── ltiAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── process_submission.py
│ │ ├── serializers.py
│ │ ├── templates/
│ │ │ └── ltiAPI/
│ │ │ ├── config.xml
│ │ │ └── denied.html
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── utils.py
│ │ └── views.py
│ ├── manage.py
│ ├── migrations.sh
│ ├── publishAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── signals.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── requirements.txt
│ ├── saveAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── simulationAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── helpers/
│ │ │ ├── ngspice_helper.py
│ │ │ ├── parse.py
│ │ │ └── sample_files/
│ │ │ ├── RC.cir
│ │ │ ├── data.txt
│ │ │ ├── plot_data_i.txt
│ │ │ └── plot_data_v.txt
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tasks.py
│ │ ├── templates/
│ │ │ └── admin/
│ │ │ └── runtimeStats.html
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ └── workflowAPI/
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── fixtures/
│ │ ├── gallery_setup.json
│ │ └── initial_setup.json
│ ├── models.py
│ ├── serializers.py
│ ├── signals/
│ │ ├── __init__.py
│ │ └── handlers.py
│ ├── tests.py
│ ├── urls.py
│ ├── utils.py
│ └── views.py
├── first_run.dev.sh
└── guidelines-checklist/
├── contributing-guidelines.md
├── new-issue-guidelines.md
└── pullrequest-guidelines.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .all-contributorsrc
================================================
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "darshkpatel",
"name": "Darsh Patel",
"avatar_url": "https://avatars.githubusercontent.com/u/11258286?v=4",
"profile": "http://darshkpatel.com",
"contributions": [
"code",
"doc",
"infra"
]
},
{
"login": "dssudake",
"name": "Darshan Sudake",
"avatar_url": "https://avatars.githubusercontent.com/u/42094875?v=4",
"profile": "https://www.linkedin.com/in/darshan-sudake-a640ba1b1/",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "felixfaisal",
"name": "felixfaisal",
"avatar_url": "https://avatars.githubusercontent.com/u/42486737?v=4",
"profile": "https://felixfaisal.github.io/",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "rohitgeddam",
"name": "rohitgeddam",
"avatar_url": "https://avatars.githubusercontent.com/u/48797475?v=4",
"profile": "https://github.com/rohitgeddam",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "NavonilDas",
"name": "Navonil Das",
"avatar_url": "https://avatars.githubusercontent.com/u/29132316?v=4",
"profile": "http://navonildas.github.io/",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "meet-10",
"name": "Meet10",
"avatar_url": "https://avatars.githubusercontent.com/u/61341284?v=4",
"profile": "https://github.com/meet-10",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "gupta-arpit",
"name": "gupta-arpit",
"avatar_url": "https://avatars.githubusercontent.com/u/12170429?v=4",
"profile": "https://github.com/gupta-arpit",
"contributions": [
"code",
"design"
]
},
{
"login": "ikartikgautam",
"name": "Kartik Gautam",
"avatar_url": "https://avatars.githubusercontent.com/u/39825660?v=4",
"profile": "http://ikartikgautam.web.app/",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "kumanik5661",
"name": "Nikhil Kumar",
"avatar_url": "https://avatars.githubusercontent.com/u/42597251?v=4",
"profile": "https://github.com/kumanik5661",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "Kaustuv942",
"name": "Kaustuv K Chattopadhyay",
"avatar_url": "https://avatars.githubusercontent.com/u/56028031?v=4",
"profile": "https://github.com/Kaustuv942",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "akshat2602",
"name": "Akshat Sharma",
"avatar_url": "https://avatars.githubusercontent.com/u/35724794?v=4",
"profile": "https://akshat-sharma.me",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "Rugz007",
"name": "Rugved Somwanshi",
"avatar_url": "https://avatars.githubusercontent.com/u/16833604?v=4",
"profile": "http://rugvedsomwanshi.me",
"contributions": [
"code",
"doc",
"design"
]
},
{
"login": "rajatmaheshwari2512",
"name": "Rajat Maheshwari",
"avatar_url": "https://avatars.githubusercontent.com/u/54249328?v=4",
"profile": "https://rajatmaheshwari.me/",
"contributions": [
"code",
"doc",
"design"
]
}
],
"contributorsPerLine": 7,
"projectName": "eSim-Cloud",
"projectOwner": "frg-fossee",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true
}
================================================
FILE: .github/workflows/angularTestBuild.yml
================================================
name: Angular Build and Tests
on:
push:
paths: [ 'ArduinoFrontend/**' ]
pull_request:
paths: [ 'ArduinoFrontend/**' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node js
uses: actions/setup-node@v1
with:
node-version: 10.5.0
- name: Install packages,lint,build and Unit testing
working-directory: ./ArduinoFrontend
run: |
npm install
npm run lint
npm run build -- --prod
npm test -- --configuration=ci
================================================
FILE: .github/workflows/devDockerCompose.yml
================================================
name: Containers
on:
push:
#Until changes are merged to master initially
branches: [ develop, docker-images ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to docker
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin
- name: Build the docker-compose stack
run: |
docker-compose -f docker-compose.dev.yml --env-file .env pull --ignore-pull-failures
docker-compose -f docker-compose.dev.yml --env-file .env build
- name: Run the docker-compose step
run: docker-compose -f docker-compose.dev.yml --env-file .env up -d
- name: Check running containers
run: docker ps -a
- name: Publish images
run: docker-compose -f docker-compose.dev.yml --env-file .env push
================================================
FILE: .github/workflows/dockerTestBackend.yml
================================================
name: Django Build and Tests
on:
push:
paths: [ 'esim-cloud-backend/**' ]
pull_request:
paths: [ 'esim-cloud-backend/**' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to docker
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin
- name: Build Images
run: |
docker-compose -f docker-compose.dev.yml --env-file .env pull --ignore-pull-failures
docker-compose -f docker-compose.dev.yml --env-file .env build
- name: Run Django Test Suite
run: |
docker-compose -f docker-compose.dev.yml run django python manage.py test
================================================
FILE: .github/workflows/masterDockerCompose.yml
================================================
name: Containers
on:
push:
branches: [ master, devops ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to docker
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin
- name: Build the docker-compose stack
run: |
cp .env .env.prod
docker-compose -f docker-compose.prod.yml --env-file .env.prod pull --ignore-pull-failures
docker-compose -f docker-compose.prod.yml --env-file .env.prod build
- name: Run the docker-compose step
run: docker-compose -f docker-compose.prod.yml --env-file .env.prod up -d
- name: Check running containers
run: docker ps -a
- name: Publish images
if: github.ref == 'refs/heads/master'
run: docker-compose -f docker-compose.prod.yml --env-file .env.prod push
================================================
FILE: .github/workflows/prodContainers.yml
================================================
name: Master Containers
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to docker
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://docker.pkg.github.com -u ${{ github.repository_owner }} --password-stdin
- name: Build the docker-compose stack
run: |
cp .env .env.prod
docker-compose -f docker-compose.prod.yml --env-file .env.prod pull --ignore-pull-failures
docker-compose -f docker-compose.prod.yml --env-file .env.prod build
- name: Run the docker-compose step
run: docker-compose -f docker-compose.prod.yml --env-file .env.prod up -d
- name: Check running containers
run: docker ps -a
- name: Publish images
run: docker-compose -f docker-compose.prod.yml --env-file .env.prod push
================================================
FILE: .github/workflows/reactEslint.yml
================================================
name: ESLint eda-frontend
on:
push:
paths: [ 'eda-frontend/**' ]
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: darshkpatel/eslint-action@master
with:
repo-token: ${{secrets.GITHUB_TOKEN}}
source-root: 'eda-frontend'
================================================
FILE: .github/workflows/reactTestBuild.yml
================================================
name: React Build and Tests
on:
push:
paths: [ 'eda-frontend/**' ]
pull_request:
paths: [ 'eda-frontend/**' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node js
uses: actions/setup-node@v1
with:
node-version: 10.5.0
- name: Install packages,lint,build and Unit testing
working-directory: ./eda-frontend
run: |
export NODE_OPTIONS=--max_old_space_size=4096
npm install
CI=true npm run build
CI=true npm test
================================================
FILE: .gitignore
================================================
redis_data/
mysql_data/
.vscode
venv
env
*.sqlite3
.env.prod
mongo_data/
sample_lib/
symbols/*
.DS_Store
migrations
symbol_svgs
postgres_data
file_storage
node_modules
================================================
FILE: ArduinoFrontend/.editorconfig
================================================
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: ArduinoFrontend/.gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/doc
/documentation
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: ArduinoFrontend/Dockerfile
================================================
FROM node:10-alpine3.11
RUN mkdir /code
WORKDIR /code
COPY package.json /code/package.json
COPY package-lock.json /code/package-lock.json
================================================
FILE: ArduinoFrontend/README.md
================================================
# ArduinoFrontend
## Instructions
* Install Packages
```bash
npm install
```
* Run Server
```bash
ng serve
```
* Angular Linting
```bash
ng lint
```
* Angular Unit testing
```bash
ng test
```
* To generate documentation
```bash
npm run doc
```
Then open a server on the "documentation" folder.
================================================
FILE: ArduinoFrontend/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ArduinoFrontend": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ArduinoFrontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "node_modules/ngx-monaco-editor/assets/monaco",
"output": "./assets/monaco/"
}
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.css"
],
"scripts": [],
"es5BrowserSupport": true,
"showCircularDependencies": false
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "8mb",
"maximumError": "10mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ArduinoFrontend:build",
"host": "0.0.0.0"
},
"configurations": {
"production": {
"browserTarget": "ArduinoFrontend:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ArduinoFrontend:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
},
"configurations": {
"ci": {
"watch": false,
"progress": false,
"browsers": "CIChromeHeadless"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"ArduinoFrontend-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ArduinoFrontend:serve"
},
"configurations": {
"production": {
"devServerTarget": "ArduinoFrontend:serve:production"
},
"ci": {
"devServerTarget": "ArduinoFrontend:serve:production",
"protractorConfig": "e2e/protractor-ci.conf.js"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ArduinoFrontend",
"cli": {
"analytics": "aae09df8-6ed6-4120-adda-1b9080860d1e"
}
}
================================================
FILE: ArduinoFrontend/e2e/protractor-ci.conf.js
================================================
const config = require('./protractor.conf').config;
config.capabilities = {
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--no-sandbox', '--disable-gpu'],
binary: require('puppeteer').executablePath(),
},
};
exports.config = config;
================================================
FILE: ArduinoFrontend/e2e/protractor.conf.js
================================================
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
================================================
FILE: ArduinoFrontend/e2e/src/app.e2e-spec.ts
================================================
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
================================================
FILE: ArduinoFrontend/e2e/src/app.po.ts
================================================
import { browser, by, element } from 'protractor';
/**
* AppPage End to End Testing
*/
export class AppPage {
/**
* Navigate to Base URL
*/
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
}
================================================
FILE: ArduinoFrontend/e2e/tsconfig.e2e.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
================================================
FILE: ArduinoFrontend/package.json
================================================
{
"name": "arduino-frontend",
"version": "0.8.0",
"scripts": {
"ng": "ng",
"start": "ng serve --disableHostCheck",
"build": " ng build --prod --aot --buildOptimizer --extractCss --optimization --extractLicenses",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "webdriver-manager update --standalone false --gecko false --versions.chrome 76.0.3809.68",
"doc": "compodoc -p tsconfig.json"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/cdk": "~7.3.7",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/material": "^7.3.7",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"chart.js": "^2.9.4",
"chroma-js": "^1.3.5",
"core-js": "^2.6.12",
"file-saver": "^2.0.5",
"is-promise": "2.2.2",
"lodash": "^4.17.19",
"lodash-transpose": "^0.2.1",
"ng2-charts": "^2.4.3",
"ngx-filter-pipe": "^2.1.2",
"ngx-monaco-editor": "^7.0.0",
"or": "^0.2.0",
"rxjs": "~6.3.3",
"tslib": "^1.14.1",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.10",
"@angular/cli": "~7.3.8",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@compodoc/compodoc": "^1.1.11",
"@types/jasmine": "^2.8.17",
"@types/jasminewd2": "^2.0.9",
"@types/node": "^8.10.66",
"avr8js": "^0.9.2",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"puppeteer": "chrome-76",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/AVR8/Execute.ts
================================================
import { TaskScheduler } from './Scheduler';
import { parseHex } from './IntelHex';
/**
* AVR8 Global Variable
*/
declare var AVR8: any;
/**
* Event to change the Value of a pin after some duration in microseconds
*/
export interface MicroEvent {
/**
* State of the Pin
*/
state: boolean;
/**
* Pin Number
*/
pin: number;
/**
* Port register
*/
port: string;
/**
* Start of the clock
*/
start: number;
/**
* Complete time period in microsecond
*/
period: number;
/**
* Is Event enabled
*/
enable: boolean;
}
/**
* PWM Event
*/
export interface ServoEvent {
/**
* Pin where component is attached
*/
pin: number;
/**
* Start time of the event
*/
start: number;
/**
* prev value of pwm (angle in case of servo)
*/
prevAngle: number;
/**
* is we only need pwm output
*/
isPWM?: boolean;
/**
* Port where component is attached.
*/
port?: string;
/**
* Callback with current value and previous value
*/
callback: (angle: number, prevAngle: number) => void;
}
/**
* Arduino Program Loop class ie. Arduino runner
*/
export class ArduinoRunner {
/**
* Program Data
*/
readonly program = new Uint16Array(0x8000);
/**
* Arduino CPU
*/
readonly cpu: any;
/**
* Arduino Timer 0
*/
readonly timer0: any;
/**
* Arduino Timer 1
*/
readonly timer1: any;
/**
* Arduino Timer 2
*/
readonly timer2: any;
/**
* Arduino register Port B
*/
readonly portB: any;
/**
* Arduino register Port C
*/
readonly portC: any;
/**
* Arduino register Port D
*/
readonly portD: any;
/**
* Arduino Universal Synchronous/Asynchronous Receiver/Transmitter
*/
readonly usart: any;
/**
* Arduino Analog to Digital Convertor
*/
readonly adc: any;
/**
* Arduino Frequency
*/
readonly frequency = 16e6;
/**
* Task Scheduler for Arduino
*/
readonly scheduler: TaskScheduler = new TaskScheduler();
/**
* Work Unit Cycles
*/
readonly workUnitCycles = 500000; // TODO: FIGURE OUT
/**
* All microseconds event
*/
private events: MicroEvent[] = [];
/**
* List for all PWM events
*/
private servo: ServoEvent[] = [];
/**
* Port Listeners
*/
private listeners: any = {};
/**
* Contains Serial data
*/
private serialBuffer: string[] = [];
/**
* Arduino runner constructor
* @param hex Compiled Hex string
*/
constructor(hex: string) {
// Parse the compiled hex
parseHex(hex, new Uint8Array(this.program.buffer));
// initialize variables
this.cpu = new AVR8.CPU(this.program);
this.timer0 = new AVR8.AVRTimer(this.cpu, AVR8.timer0Config);
this.timer1 = new AVR8.AVRTimer(this.cpu, AVR8.timer1Config);
this.timer2 = new AVR8.AVRTimer(this.cpu, AVR8.timer2Config);
this.portB = new AVR8.AVRIOPort(this.cpu, AVR8.portBConfig);
this.portC = new AVR8.AVRIOPort(this.cpu, AVR8.portCConfig);
this.portD = new AVR8.AVRIOPort(this.cpu, AVR8.portDConfig);
this.usart = new AVR8.AVRUSART(this.cpu, AVR8.usart0Config, this.frequency);
this.adc = new AVR8.ADC(this.cpu);
// Start the scheduler
this.scheduler.start();
}
/**
* The Execute loop
*/
execute() {
// Complete work unit cycle
const cyclesToRun = this.cpu.cycles + this.workUnitCycles;
while (this.cpu.cycles < cyclesToRun) {
AVR8.avrInstruction(this.cpu); // Parse the instruction
// Update timers
this.timer0.tick();
this.timer1.tick();
this.timer2.tick();
this.usart.tick();
// For handling microsecond events
for (const event of this.events) {
const ms = Math.floor(((this.cpu.cycles - event.start) * 1000000) / this.frequency);
if (event.enable && ms !== 0 && ms % event.period === 0) {
this[event.port].setPin(event.pin, event.state);
event.state = !event.state;
event.start = this.cpu.cycles;
}
}
}
// Send Serial data to the arduino
if (((this.cpu.data[0xc0] >> 7) & 1) === 0 && this.serialBuffer.length > 0) {
const chr = this.serialBuffer.shift();
this.cpu.data[0xc6] = chr.charCodeAt(0) & 255;
let tmp = this.cpu.data[0xc0];
tmp &= ~(1 << 6);
tmp &= ~(1 << 5);
tmp |= (1 << 7);
this.cpu.writeData(0xc0, tmp);
}
// add task to queue
this.scheduler.postTask(() => this.execute());
}
/**
* Return Miliseconds of time span
* @param seconds CPU Seconds
*/
getmiliS(seconds: number) {
const ms = Math.floor(seconds * 1000) % 1000;
return ms;
}
/**
* Returns Microsecond of timespan
* @param seconds CPU Seconds
*/
getMicroSeconds(seconds: number) {
return (seconds * 1000000) % 1000000;
}
/**
* Delete The runner
*/
delete() {
this.events = null;
this.servo = null;
this.listeners = null;
this.scheduler.stop();
}
/**
* Stop the scheduler
*/
stop() {
this.scheduler.stop();
}
/**
* Add microsecond event
* @param event Micro second event
*/
addMicroEvent(event: MicroEvent) {
return this.events.push(event) - 1;
}
/**
* Get the Microsecond event
* @param index Index of Microevent
*/
getMicroEvent(index: number): MicroEvent {
// TODO: Check index is in range
return this.events[index];
}
/**
* Add a PWM EVENT
* @param port The PWM Port
* @param pin The PWM Pin
* @param callback callback to send pwm value
* @param isPwm isPwm or servo (if servo the callback will get angle)
*/
addServo(port: string, pin: number, callback: (angle: number, prevAngle: number) => void, isPwm = false) {
// Add the event to the queue
this.servo.push({
pin,
prevAngle: -10,
start: 0,
callback,
isPWM: isPwm,
port
});
if (!(port in this.listeners)) {
this[port].addListener((value) => {
for (const item of this.servo) {
if (port !== item.port) {
continue;
}
// Logic for handling PWM
if (((value >> item.pin) & 1) === 1) {
item.start = this.cpu.cycles;
} else {
if (item.start === 0) {
continue;
}
const seconds = ((this.cpu.cycles - item.start) * 1000000) / this.frequency;
let ang = 0.0;
if (item.isPWM) {
ang = (Math.floor(seconds) - 7) / 4.048;
ang = Math.floor(ang);
} else {
ang = (Math.floor(seconds) - 543) / 10.316;
ang = Math.floor(ang);
}
if (
(ang + 1) !== item.prevAngle &&
(ang - 1) !== item.prevAngle &&
ang !== item.prevAngle
) {
callback(ang, item.prevAngle);
item.prevAngle = ang;
}
item.start = 0;
}
}
});
this.listeners[port] = true;
}
}
/**
* Add serial input to the buffer
* @param inp Input String that needs to be sent
*/
serialInput(inp: string) {
this.serialBuffer = inp.split('');
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/AVR8/IntelHex.ts
================================================
import { saveAs } from 'file-saver';
/**
* PART OF AVR8js (Minimal Hex Parser)
* To Understand Proper Working visit
* https://en.wikipedia.org/wiki/Intel_HEX
* @param source String Hex
* @param target Program memory
*/
export function parseHex(source: string, target: Uint8Array) {
// Split By Lines
// writeText(source, "hexCode.hex");
for (const line of source.split('\n')) {
if (line[0] === ':' && line.substr(7, 2) === '00') {
const bytes = parseInt(line.substr(1, 2), 16);
const addr = parseInt(line.substr(3, 4), 16);
for (let i = 0; i < bytes; i++) {
target[addr + i] = parseInt(line.substr(9 + i * 2, 2), 16);
}
}
}
}
function writeText(data, filename) {
const blob = new Blob([data], {type: 'text/plain;charset=utf-8'});
saveAs(blob, filename);
}
================================================
FILE: ArduinoFrontend/src/app/Libs/AVR8/Scheduler.ts
================================================
/**
* Type Definition of Task Callback aka Job that needs to be executed
*/
export type TaskCallback = () => void;
/**
* Faster setTimeout(fn, 0) implementation using postMessage API
* Based on https://dbaron.org/log/20100309-faster-timeouts
*/
export class TaskScheduler {
/**
* Message used to check for Arduino task
*/
readonly messageName = 'arduinoRocks';
/**
* Queue to store Task (JOB)
*/
private Queue: Array<TaskCallback> = [];
/**
* Store the state of queue
*/
private stopped = true;
/**
* Start The Scheduler
*/
start() {
// If it is on Stop State then start
if (this.stopped) {
this.stopped = false;
window.addEventListener('message', this.handleMessage, true);
}
}
/**
* Stop The Scheduler
*/
stop() {
this.stopped = true;
window.removeEventListener('message', this.handleMessage, true);
}
/**
* Add task to the Scheduler
* @param fn The Task that needs to complete
*/
postTask(fn: TaskCallback) {
// if it is stop then don't add to queue
if (!this.stopped) {
this.Queue.push(fn);
window.postMessage(this.messageName, '*');
}
}
/**
* Message Event Listener
* @param event Message Event
*/
private handleMessage = (event: MessageEvent) => {
// Only Process Arduino Task and ignore others
if (event.data === this.messageName) {
// Prevents further propagation of the current event
event.stopPropagation();
// Takes the Task (job) from queue and execute it
const executeJob = this.Queue.shift();
if (executeJob !== undefined) {
executeJob();
}
}
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Battery.ts
================================================
import { CircuitElement } from './CircuitElement';
/**
* Battery9V class
*/
export class Battery9v extends CircuitElement {
/**
* Battery9V constructor
* @param canvas Raphael Canvas (Paper)
* @param x position x
* @param y position y
*/
constructor(public canvas: any, x: number, y: number) {
super('Battery9v', x, y, 'Battery9v.json', canvas);
}
/** init is called when the component is complety drawn to the canvas */
init() {
// console.log(this.nodes[0].label);
// console.log(this.nodes[1].label);
this.nodes[1].addValueListener((v, calledby) => {
// if both the terminals of battery are connected with each other
if (calledby.parent.id === this.id) {
/// TODO: Show Toast and Stop Simulation
console.log('Short Circuit');
window['showToast']('Short Circuit');
}
if (v >= 0 && this.nodes[0].value <= 0) {
this.nodes[0].setValue(9, this.nodes[0]);
}
if (v < 0) {
this.nodes[0].setValue(-1, this.nodes[0]);
}
});
}
/**
* Function provides component details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
properties(): { keyName: string; id: number; body: HTMLElement; title: string; } {
const body = document.createElement('div');
return {
keyName: 'Battery9v',
id: this.id,
body,
title: '9v Battery'
};
}
/**
* Initialize variable when start simulation is pressed
*/
initSimulation(): void {
this.nodes[0].setValue(9, null);
setTimeout(() => {
if (this.nodes[1].value < 0) {
this.nodes[0].setValue(-1, null);
}
}, 10);
}
/**
* Called on Stop Simulation
*/
closeSimulation(): void {
}
}
/**
* CoinCell3V class
*/
export class CoinCell extends CircuitElement {
/**
* CoinCell 3V constructor
* @param canvas Raphael Canvas (Paper)
* @param x position x
* @param y position y
*/
constructor(public canvas: any, x: number, y: number) {
super('CoinCell', x, y, 'CoinCell.json', canvas);
}
/**
* Function provides component details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
init() {
this.nodes[1].addValueListener((_, calledby, __) => {
if (calledby.parent.id === this.id) {
/// TODO: Show Toast and Stop Simulation
window['showToast']('Short Circuit');
}
});
}
/**
* Function provides component details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
properties(): { keyName: string; id: number; body: HTMLElement; title: string; } {
const body = document.createElement('div');
return {
keyName: this.keyName,
id: this.id,
body,
title: 'Coin Cell'
};
}
/**
* Initialize variable when start simulation is pressed
*/
initSimulation(): void {
this.nodes[0].setValue(3, null);
}
/**
* Called on stop Simulation
*/
closeSimulation(): void {
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/CircuitElement.spec.ts
================================================
================================================
FILE: ArduinoFrontend/src/app/Libs/CircuitElement.ts
================================================
import { Point } from './Point';
import { Wire } from './Wire';
import { isNull } from 'util';
import { BoundingBox } from './Geometry';
import { UndoUtils } from './UndoUtils';
/**
* Abstract Class Circuit Elements
* Inherited by Each Circuit Component
*/
export abstract class CircuitElement {
/**
* Circuit Component Name
*/
public keyName: string;
/**
* Stores the id of the Component
*/
public id: number;
/**
* Stores the Nodes of a Component
*/
public nodes: Point[] = [];
/**
* Raphael Set of elements
*/
public elements: any;
/**
* Translation X
*/
public tx = 0;
/**
* Translation Y
*/
public ty = 0;
/**
* Title of the component
*/
public title: string;
/**
* Store Values That are required during simulation
*/
public simulationData: any = {};
/**
* Store Values that are additionaly require by class
*/
public data: any = {};
/**
* Stores Information regarding a component
*/
public info: any;
/**
* The Half Size of the Circuit Node
*/
public pointHalf: number;
/**
* Node ID
*/
public nid = 0;
/**
* Constructor For Circuit Element Class (Parent of every component)
* @param keyName KeyName For a Component required for mapping class to string
* @param x X position of component
* @param y Y Position Of component
* @param filename Json Data filename
* @param canvas Raphael Canvas
*/
constructor(keyName: string, public x: number, public y: number, filename: string = '', canvas: any = null) {
this.id = Date.now(); // Generate New id
this.keyName = keyName; // Set key name
// Create Raphael Set
this.elements = window['canvas'].set();
// if filename is present fetch the file
if (filename) {
fetch(`./assets/jsons/${filename}`)
.then(v => v.json())
.then(obj => {
// get the title
this.title = obj.name;
this.pointHalf = obj.pointHalf;
// Draw Elements of the component
this.DrawElement(canvas, obj.draw);
// Add Circuiy Nodes
this.DrawNodes(canvas, obj.pins, obj.pointHalf);
// Add info and data
this.info = obj.info;
this.data = obj.data;
// Add a Drag listener
this.setDragListeners();
// Add a Click Listener
this.setClickListener(null);
// Add Hover Listener
this.setHoverListener();
// Translate the elements to the tranformation
this.elements.transform(`t${this.tx},${this.ty}`);
// Move the node according to the translatiom
for (const node of this.nodes) {
node.relativeMove(this.tx, this.ty);
}
// Decrease the Queue
window['queue'] -= 1;
// Call the init method
this.init();
})
.catch(err => {
console.error(err);
window['showToast']('Failed to load');
// TODO: Delete the Component
});
}
}
/**
* Returns bounding box of the circuit element
*/
getBoundingBox(): BoundingBox {
return BoundingBox.loadFromRaphaelBbox(this.elements.getBBox());
}
/**
* Draws circuit nodes
* @param canvas Raphael Canvas
* @param pinData Pin Position and name
* @param pointHalf The Half size of circuit node
*/
DrawNodes(canvas: any, pinData: any, pointHalf: number) {
for (const pin of pinData) {
this.nodes.push(
new Point(
canvas,
this.x + pin.x,
this.y + pin.y,
pin.name,
pointHalf,
this
)
);
}
}
/**
* Draw Elements inside an component
* @param canvas Raphael Canvas
* @param drawData Draw Data
*/
DrawElement(canvas: any, drawData: any) {
const elementsDrawn = [];
for (const item of drawData) {
let element;
// Draw image
if (item.type === 'image') {
element = canvas.image(
item.url,
this.x + item.x,
this.y + item.y,
item.width,
item.height
);
} else if (item.type === 'path') {
element = this.DrawPath(canvas, item);
} else if (item.type === 'rectangle') {
// Draw rectangle
element = canvas.rect(
this.x + item.x,
this.y + item.y,
item.width,
item.height,
item.radius || 0
).attr({
fill: item.fill || 'none',
stroke: item.stroke || 'none'
});
} else if (item.type === 'circle') {
// Draw a circle
element = canvas.circle(
this.x + item.x,
this.y + item.y,
item.radius,
).attr({
fill: item.fill || 'none',
stroke: item.stroke || 'none'
});
} else if (item.type === 'polygon') {
element = this.DrawPolygon(canvas, item);
}
this.elements.push(element);
elementsDrawn.push(element);
}
return elementsDrawn;
}
/**
* Draws an Polygon
* @param canvas Raphael Paper(Canvas)
* @param item Polygon points in a 2d array format
*/
DrawPolygon(canvas: any, item: any) {
if (item.points.length <= 1) {
return;
}
const points = item.points;
let tmp = 'M';
for (const point of points) {
tmp += `${this.x + point[0]},${this.y + point[1]}L`;
}
tmp = tmp.substr(0, tmp.length - 1) + 'z';
return canvas.path(tmp)
.attr({
fill: item.fill || 'none',
stroke: item.stroke || 'none'
});
}
/**
* Draw a Path
* @param canvas Raphael Paper (Canvas)
* @param item Path Data
*/
DrawPath(canvas: any, item: any) {
// Regex used to parse the path data
const lines = /L[\-]?\d+(\.\d*)?\,[\-]?\d+(\.\d*)?/g; // L a,b
const start = /M[\-]?\d+(\.\d*)?\,[\-]?\d+(\.\d*)?/g; // M a,b
const curves = /C([\-]?\d+(\.\d*)?\,){5}[\-]?\d+(\.\d*)?/g;
const horizontal = /H[\-]?\d+(\.\d*)?/g; // H a
const vertical = /V[\-]?\d+(\.\d*)?/g; // V b
const sCurve = /S([\-]?\d+(\.\d*)?\,){3}[\-]?\d+(\.\d*)?/g;
let str: string = item.value;
str = this.calcRelative(str, start, canvas);
str = this.calcRelative(str, lines, canvas);
str = this.calcRelative(str, curves, canvas);
str = this.calcRelative(str, horizontal, canvas);
str = this.calcRelative(str, vertical, canvas);
str = this.calcRelative(str, sCurve, canvas);
return canvas.path(str)
.attr({
fill: item.fill || 'none',
stroke: item.stroke || 'none'
});
}
/**
* Draw path relative to the component
* @param input Path Data
* @param pattern The regex pattern
* @param canvas Raphael Paper
*/
calcRelative(input: string, pattern: RegExp, canvas: any) {
const founds = input.match(pattern);
if (founds) {
for (const found of founds) {
let output = '';
const start = found.charAt(0);
let tmp: any = found.substring(1).split(',');
tmp = tmp.map(v => parseFloat(v));
if (start === 'M' || start === 'L') {
output += `${start}${this.x + tmp[0]},${this.y + tmp[1]}`;
} else if (start === 'V') {
output += `${start}${this.y + tmp[0]}`;
} else if (start === 'H') {
output += `${start}${this.x + tmp[0]}`;
} else if (start === 'C') {
output += `${start}${this.x + tmp[0]},`;
output += `${this.y + tmp[1]},`;
output += `${this.x + tmp[2]},`;
output += `${this.y + tmp[3]},`;
output += `${this.x + tmp[4]},`;
output += `${this.y + tmp[5]}`;
} else if (start === 'S') {
output += `${start}${this.x + tmp[0]},`;
output += `${this.y + tmp[1]},`;
output += `${this.x + tmp[2]},`;
output += `${this.y + tmp[3]},`;
}
input = input.replace(found, output);
}
}
return input;
}
/**
* Add Drag listener to the components
*/
setDragListeners() {
let fdx = 0;
let fdy = 0;
let tmpar = [];
this.elements.drag((dx, dy) => {
this.elements.transform(`t${this.tx + dx},${this.ty + dy}`);
// tmpx = this.tx + dx;
// tmpy = this.ty + dy;
fdx = dx;
fdy = dy;
for (let i = 0; i < this.nodes.length; ++i) {
this.nodes[i].move(tmpar[i][0] + dx, tmpar[i][1] + dy);
}
window['onDragEvent'](this);
}, () => {
fdx = 0;
fdy = 0;
tmpar = [];
for (const node of this.nodes) {
// node.remainHidden();
tmpar.push(
[node.x, node.y]
);
}
}, () => {
// for (const node of this.nodes) {
// node.relativeMove(fdx, fdy);
// node.remainShow();
// }
// Push dump to Undo stack & Reset
UndoUtils.pushChangeToUndoAndReset({ keyName: this.keyName, element: this.save(), event: 'drag', dragJson: { dx: fdx, dy: fdy } });
this.tx += fdx;
this.ty += fdy;
window['onDragStopEvent'](this);
});
}
/**
* Add Hover Listener
*/
setHoverListener() {
// this.elements.mouseover(() => {
// for (const node of this.nodes) {
// // node.show();
// }
// });
// this.elements.mouseout(() => {
// for (const node of this.nodes) {
// // node.hide();
// }
// });
}
/**
* Add a Click listenert to component and show properties on click
* @param callback On Click Callback
*/
setClickListener(callback: () => void) {
this.elements.mousedown(() => {
if (window['Selected'] && (window['Selected'] instanceof Wire)) {
if ((isNull(window['Selected'].start) || isNull(window['Selected'].end))) {
return;
}
window['Selected'].deselect();
}
window['isSelected'] = true;
window['Selected'] = this;
window['showProperty'](() => this.properties());
if (callback) {
callback();
}
});
}
/**
* Initialize Variable after inheriting this function
*/
init() { }
/**
* Save Circuit Component
*/
save(): any {
const data = this.SaveData();
const ret = {
x: this.x,
y: this.y,
tx: this.tx,
ty: this.ty,
id: this.id
};
if (data) {
ret['data'] = data;
}
return ret;
}
/**
* The Additional data that needs to be saved inside database.
* After Inheriting return the Data Object
*/
SaveData() {
return null;
}
/**
* Load Circuit Component
*/
load(data: any): void {
for (const i in window['DragListeners']) {
if (window['DragListeners'].hasOwnProperty(i)) {
const itrFn = window['DragListeners'][i];
if (itrFn.id === this.id) {
window['DragListeners'][i].id = data.id;
}
}
}
for (const i in window['DragStopListeners']) {
if (window['DragStopListeners'].hasOwnProperty(i)) {
const itrFn = window['DragStopListeners'][i];
if (itrFn.id === this.id) {
window['DragStopListeners'][i].id = data.id;
}
}
}
this.id = data.id;
this.tx = data.tx;
this.ty = data.ty;
this.LoadData(data);
}
/**
* The additional data which is stored in database needs to be load.
* Inherit this function for loading additional data.
* @param data Data from Database
*/
LoadData(data: any) { }
/**
* Returns the Circuit Node based on the x,y Position
*/
getNode(x: number, y: number, id: number = null): Point {
for (const node of this.nodes) {
if (
(Math.floor(node.x + this.pointHalf) === Math.floor(x) &&
Math.floor(node.y + this.pointHalf) === Math.floor(y))
||
node.id === id
) {
return node;
}
}
return null;
}
/**
* Removes Component from Canvas and memory
*/
remove(): void {
this.elements.remove();
for (const n of this.nodes) {
n.remove();
}
this.delete();
}
/**
* Inherit this function to remove some variable
*/
delete() { }
/**
* Return the Name of the component.Can be inheriter to return custom name.
*/
getName() { return this.title; }
/**
* Function to move/transform an element
* @param fdx relative x position to move
* @param fdy relative y position to move
*/
getNodesCoord(): number[] {
const tmpar = [];
for (const node of this.nodes) {
tmpar.push(
[node.x, node.y]
);
}
return tmpar;
}
dragAlong(tmpar: any, fdx: number, fdy: number): any {
this.elements.transform(`t${this.tx + fdx},${this.ty + fdy}`);
for (const node of this.nodes) {
tmpar.push(
[node.x, node.y]
);
}
for (let i = 0; i < this.nodes.length; ++i) {
this.nodes[i].move(tmpar[i][0] + fdx, tmpar[i][1] + fdy);
}
}
dragAlongStop(x: number, y: number): void {
this.tx = x;
this.ty = y;
}
/**
* Function to move/transform an element
* @param fdx relative x position to move
* @param fdy relative y position to move
*/
transformPosition(fdx: number, fdy: number): void {
const tmpar = [];
this.elements.transform(`t${this.tx + fdx},${this.ty + fdy}`);
for (const node of this.nodes) {
tmpar.push(
[node.x, node.y]
);
}
for (let i = 0; i < this.nodes.length; ++i) {
this.nodes[i].move(tmpar[i][0] + fdx, tmpar[i][1] + fdy);
}
this.tx += fdx;
this.ty += fdy;
}
/**
* Return the Property of the Circuit Component
* @returns Object containing component name,id and the html required to be shown on property box
*/
abstract properties(): { keyName: string, id: number, body: HTMLElement, title: string };
/**
* Initialize variable required for simulation
* Called before simulation
*/
abstract initSimulation(): void;
/**
* Called when Stop Simulation
*/
abstract closeSimulation(): void;
}
================================================
FILE: ArduinoFrontend/src/app/Libs/ConvertJSONFormat.ts
================================================
import { ImageToByteArray } from './ImageToByteArray';
export class ConvertJSONFormat {
/**
* Converts JSON of cloud-stored circuit into JSON format for storing it temporarily
* @param id Project Id
* @param data JSON data of the circuit
* @returns JSON data of the circuit with format for saving it temporarily
*/
static async convertToOfflineFormat(id, data) {
const obj = JSON.parse(data.data_dump);
const project = {
name: data.name,
description: data.description,
image: data.base64_image,
created_at: Date.now(),
};
obj['id'] = id;
obj['project'] = project;
// Correction required for the following two lines of code
// Image data is recieved after the image gets loaded which is async code
// In short, for now this function will not return image data but its url.
ImageToByteArray.getDataURLForm(project.image);
obj.project.image = ImageToByteArray.result !== '' ? ImageToByteArray.result : project.image;
return obj;
}
/**
* Converts JSON of temporarily saved circuit to JSON format on Cloud
* @param data JSON data of the circuit
* @returns JSON data of the circuit with format for saving it on cloud
*/
static convertToOnlineFormat(data) {
const obj = {
data_dump: '',
is_arduino: true,
description: data.project.description,
name: data.project.name,
base64_image: data.project.image,
branch: 'master',
version: this.getRandomString(20)
};
// Remove unwanted props from JSON
delete data['id'];
delete data['project'];
// Data Dump will contain Circuit data
const dataDump = data;
// Convert Data Dump to an String and add to Save Object
obj.data_dump = JSON.stringify(dataDump);
return obj;
}
/**
* Generate and return a random string
* @param length Length of random string
* @returns random string
*/
static getRandomString(length): string {
let result = '';
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() *
charactersLength));
}
return result;
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Download.ts
================================================
// Declare an Enumeration For Image Type
export enum ImageType { PNG, JPG, SVG }
/**
* Canvg used For Rendering SVG
*/
declare var canvg;
/**
* Download Class
*/
export class Download {
/**
* Downloads Image From Base64 Data
* @param data Base64 Image Data
* @param filename Filename For Download
* @param type Type of the image
*/
static DownloadImage(data: any, filename: string, type: ImageType) {
const evt = new MouseEvent('click', {
view: window,
bubbles: false,
cancelable: true
});
const a = document.createElement('a');
const ext = (type === ImageType.PNG) ? 'png' : 'jpg';
a.setAttribute('download', `${filename}.${ext}`);
a.setAttribute('href', data);
a.setAttribute('target', '_blank');
a.dispatchEvent(evt);
}
/**
* Download Text File
* @param filename Filename of the download
* @param data Data inside the download
* @param options Extra Options for mime
*/
static DownloadText(filename: string, data: any[], options: any) {
const blob = new Blob(data, options);
const evt = new MouseEvent('click', {
view: window,
bubbles: false,
cancelable: true
});
const a = document.createElement('a');
a.setAttribute('download', `${filename}`);
a.href = URL.createObjectURL(blob);
a.target = '_blank';
a.setAttribute('target', '_blank');
a.dispatchEvent(evt);
}
/**
* Asynchronous Function for Export Image to a Base64 Format.
* @param type Type of the Image
*/
static async ExportImage(type: ImageType) {
// Get SVG from Workspace an Clone it
const svg = (document.querySelector('#holder > svg').cloneNode(true) as SVGSVGElement);
svg.getElementsByTagName('g')[0].removeAttribute('transform'); // Remove any transformation
// Extract all image from svg
const images = (svg.getElementsByTagName('image') as any);
for (const image of images) {
// Fetch each image and convert image into base64
let data = await fetch(image.getAttribute('href'))
.then((v) => {
return v.text();
});
data = (data.replace('<svg ', `<svg width="${image.getAttribute('width')}" height="${image.getAttribute('height')}" `));
image.setAttribute(
'href',
'data:image/svg+xml;base64,' + window.btoa(data)
);
}
// Return a new Promise
return new Promise((res, _) => {
// Get the client pixel ratio
const pixelRatio = 1.25;
// get The Bounding box of the circuit
const gtag = (document.querySelector('#holder > svg > g') as SVGSVGElement).getBBox();
if (gtag.width === 0 || gtag.height === 0) {
gtag.width = 100;
gtag.height = 100;
}
// Add transformation to the g tag
svg.getElementsByTagName('g')[0].setAttribute('transform', `scale(1,1)translate(${-gtag.x + 10},${-gtag.y + 10})`);
// if type is svg then return new svg
if (type === ImageType.SVG) {
res(svg.outerHTML);
return;
}
// if type is not svg then render svg using canvg
const canvas = document.createElement('canvas');
// set canvas width and height
canvas.width = (gtag.width + gtag.x + 20) * pixelRatio;
canvas.height = (gtag.height + gtag.y + 20) * pixelRatio;
canvas.style.width = canvas.width + 'px';
canvas.style.height = canvas.width + 'px';
// change the width and height of svg
svg.setAttribute('width', '' + canvas.width);
svg.setAttribute('height', '' + canvas.height);
// Get Canvas Context
const ctx = (canvas.getContext('2d') as any);
// enable smoothing
ctx.mozImageSmoothingEnabled = true;
ctx.webkitImageSmoothingEnabled = true;
ctx.msImageSmoothingEnabled = true;
ctx.imageSmoothingEnabled = true;
// Apply tranformation
ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
// render for modified svg
const v = canvg.Canvg.fromString(ctx, svg.outerHTML);
v.render().then(() => {
let image;
if (type === ImageType.JPG) {
// if type is jpg remove the black background
const imgdata = ctx.getImageData(0, 0, canvas.width, canvas.height);
for (let i = 0; i < imgdata.data.length; i += 4) {
if (imgdata.data[i + 3] === 0) {
imgdata.data[i] = 255;
imgdata.data[i + 1] = 255;
imgdata.data[i + 2] = 255;
imgdata.data[i + 3] = 255;
}
}
// Add Image to canvas
ctx.putImageData(imgdata, 0, 0);
image = canvas.toDataURL('image/jpeg');
} else {
// Get The base64
if (type === ImageType.PNG) {
image = canvas.toDataURL('image/png');
}
}
res(image);
});
});
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/General.ts
================================================
import { CircuitElement } from './CircuitElement';
import { Point } from './Point';
import { areBoundingBoxesIntersecting } from './RaphaelUtils';
import _ from 'lodash';
import { Wire } from './Wire';
import { UndoUtils } from './UndoUtils';
/**
* Declare window so that custom created function don't throw error
*/
declare var window;
/**
* Node tuple class to store breadboard node and element node which are in proximity
*/
class BreadboardProximityNodeTuple {
breadboardNode: Point;
elementNode: Point;
constructor(breadboardNode: Point, elementNode: Point) {
this.breadboardNode = breadboardNode;
this.elementNode = elementNode;
}
}
/**
* Resistor Class
*/
export class Resistor extends CircuitElement {
/**
* color table(hex values) of resistor
*/
static colorTable: string[] = [];
/**
* tolerance color mapping values of resistor
*/
static tolColorMap: number[] = [];
/**
* tolerance value of resistor
*/
static toleranceValues: string[] = [];
/**
* unit labels of resistor
*/
static unitLabels: string[] = [];
/**
* unit values of resistor
*/
static unitValues: number[] = [];
/**
* Resistance value of the resistor.
*/
value: number;
/**
* Tolerance index of the resistor.
*/
toleranceIndex: number;
/**
* Resistor constructor
* @param canvas Raphael Canvas (Paper)
* @param x position x
* @param y position y
*/
constructor(public canvas: any, x: number, y: number) {
super('Resistor', x, y, 'Resistor.json', canvas);
}
/** init is called when the component is completely drawn to the canvas */
init() {
if (Resistor.colorTable.length === 0) {
Resistor.colorTable = this.data.colorTable;
Resistor.toleranceValues = this.data.toleranceValues;
Resistor.tolColorMap = this.data.tolColorMap;
Resistor.unitLabels = this.data.unitLabels;
Resistor.unitValues = this.data.unitValues;
}
this.value = this.data.initial;
this.toleranceIndex = this.data.initialToleranceIndex;
this.updateColors();
delete this.data;
this.data = null;
this.nodes[0].addValueListener((v, cby, par) => {
if (cby.parent.id !== this.id) {
this.nodes[1].setValue(v, this.nodes[0]);
}
});
this.nodes[1].addValueListener((v, cby, par) => {
if (cby.parent.id !== this.id) {
this.nodes[0].setValue(v, this.nodes[1]);
}
});
}
/** Saves data/values that are provided to resistor */
SaveData() {
return {
value: this.value,
tolerance: this.toleranceIndex
};
}
/**
* function loads the SaveData()
* @param data save object
*/
LoadData(data: any) {
this.value = data.data.value;
this.toleranceIndex = data.data.tolerance;
}
/**
* Updates Resistor Properties
*/
updateColors() {
const cur = this.getValue();
this.elements[1].attr({
fill: Resistor.colorTable[cur.third]
}); // Third
this.elements[2].attr({
fill: Resistor.colorTable[cur.second]
}); // Second
this.elements[3].attr({
fill: Resistor.colorTable[cur.first]
}); // First
this.elements[5].attr({
fill: Resistor.colorTable[cur.multiplier]
}); // multiplier
this.elements[4].attr({
fill: Resistor.colorTable[this.toleranceIndex]
}); // Tolerance
}
/** Function gets Resistence value */
getValue() {
const l = `${this.value}`.length;
const tmp = `${this.value}`;
if (l < 2) {
return {
multiplier: 11,
first: this.value,
second: 0,
third: 0
};
} else if (l < 3) {
return {
multiplier: 10,
first: +tmp.charAt(0),
second: +tmp.charAt(1),
third: 0,
};
}
return {
multiplier: l - 3,
first: +tmp.charAt(0),
second: +tmp.charAt(1),
third: +tmp.charAt(2),
};
}
/** Power values for unitvalues 1K ohm => 10^3 */
private getPower(index: number) {
if (index >= 0 && index <= Resistor.unitValues.length) {
return Resistor.unitValues[index];
}
return 0;
}
/**
* Calculate the resistance based on the user input.
* @param value The Input resistance
* @param unitIndex The selected unit index
*/
update(value: string, unitIndex: number) {
const val = parseFloat(value);
const p = this.getPower(unitIndex);
const tmp = parseInt((val * p).toFixed(0), 10);
if (value.length > 12 || isNaN(tmp) || tmp === Infinity || tmp < 1.0 || `${tmp}`.length > 12) {
window['showToast']('Resistance Not possible');
return;
} else {
this.value = tmp;
this.updateColors();
}
}
/** Function returns resistence values 10K ohm => 10 */
getInputValues() {
const val = this.value;
let tmp = val;
for (let i = 0; i < Resistor.unitValues.length; ++i) {
tmp = Math.floor(val / Resistor.unitValues[i]);
if (tmp > 0) {
continue;
} else {
return {
index: i - 1,
val: val / Resistor.unitValues[i - 1]
};
}
}
return {
index: Resistor.unitValues.length - 1,
val: this.value / Resistor.unitValues[
Resistor.unitLabels.length - 1
]
};
}
/** Function returns the resistor with resistence */
getName() {
const cur = this.getInputValues();
return `Resistor ${cur.val}${Resistor.unitLabels[cur.index]}`;
}
/**
* Function provides component details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
properties(): { keyName: string; id: number; body: HTMLElement; title: string; } {
let tmp;
const cur = this.getInputValues();
const body = document.createElement('div');
const inp = document.createElement('input');
inp.type = 'number';
inp.value = `${cur.val}`;
inp.min = '1';
inp.addEventListener('wheel', (event) => {
event.preventDefault();
});
const unit = document.createElement('select');
tmp = '';
for (const ohm of Resistor.unitLabels) {
tmp += `<option>${ohm} Ω</option>`;
}
unit.innerHTML = tmp;
unit.selectedIndex = cur.index;
const tole = document.createElement('select');
tmp = '';
for (const t of Resistor.toleranceValues) {
tmp += `<option>± ${t}%</option>`;
}
tole.innerHTML = tmp;
unit.onchange = () => this.update(inp.value, unit.selectedIndex);
inp.onkeyup = () => this.update(inp.value, unit.selectedIndex);
inp.onchange = () => this.update(inp.value, unit.selectedIndex);
tole.onchange = () => {
this.toleranceIndex = Resistor.tolColorMap[tole.selectedIndex];
this.updateColors();
};
const lab = document.createElement('label');
lab.innerText = 'Resistance';
body.append(lab);
body.append(inp);
body.append(unit);
const lab2 = document.createElement('label');
lab2.innerText = 'Tolerance';
body.append(lab2);
body.append(tole);
return {
keyName: this.keyName,
id: this.id,
title: 'Resistor',
body
};
}
/**
* Called by the start simulation.
*/
initSimulation(): void {
}
/**
* Called by the stop simulation.
*/
closeSimulation(): void {
}
/**
* Get resistance value of resistor
*/
getResistance() {
return this.value;
}
/**
* Get ID of the resistor
* TODO: Add this function inside CircuitElements.ts instead
*/
getID() {
return this.id;
}
}
/**
* Breadboard Class
*/
export class BreadBoard extends CircuitElement {
/**
* Minimum distance of node to be classified as in proximity
*/
static PROXIMITY_DISTANCE = 20;
/**
* Set to keep track of visited nodes
*/
static visitedNodesv2 = new Set();
/**
* Stores group of points which are interconnected
*/
static groupings: any = [];
/**
* Nodes that are connected
*/
public joined: Point[] = [];
/**
* List to store current nodes in the proximity of any of the breadboard' node
*/
public highlightedPoints: BreadboardProximityNodeTuple[] = [];
/**
* Nodes sorted by 'x' and 'y' position
*/
public sortedNodes: Point[] = [];
/**
* Cached list of nodes that are soldered
*/
private solderedNodes: Point[] = null;
/**
* Map of x and nodes with x-coordinates as x
*/
public sameXNodes: { [key: string]: Point[] } = {};
/**
* Map of y and nodes with y-coordinates as y
*/
public sameYNodes: { [key: string]: Point[] } = {};
/**
* Breadboard constructor
* @param canvas Raphael Canvas (Paper)
* @param x position x
* @param y position y
*/
constructor(public canvas: any, x: number, y: number) {
super('BreadBoard', x, y, 'Breadboard.json', canvas);
this.subsribeToDrag({ id: this.id, fn: this.onOtherComponentDrag.bind(this) });
this.subscribeToDragStop({ id: this.id, fn: this.onOtherComponentDragStop.bind(this) });
}
/**
* Returns node connected to arduino
* @param node node to start search on
* @param startedOn label of node search started on
* @returns Arduino connected Node
*/
static getRecArduinov2(node: Point, startedOn: string) {
try {
if (node.connectedTo.start.parent.keyName === 'ArduinoUno') {
// TODO: Return if arduino is connected to start node
return node.connectedTo.start;
} else if (node.connectedTo.end.parent.keyName === 'ArduinoUno') {
// TODO: Return if arduino is connected to end node
return node.connectedTo.end;
} else if (node.connectedTo.start.parent.keyName === 'BreadBoard' && !this.visitedNodesv2.has(node.connectedTo.start.gid)) {
// TODO: Call recursive BreadBoard handler function if node is connected to Breadboard && visited nodes doesn't have node's gid
return this.getRecArduinoBreadv2(node, startedOn);
} else if (node.connectedTo.end.parent.keyName === 'BreadBoard' && !this.visitedNodesv2.has(node.connectedTo.end.gid)) {
// TODO: Call recursive BreadBoard handler function if node is connected to Breadboard && visited nodes doesn't have node's gid
return this.getRecArduinoBreadv2(node, startedOn);
} else if (node.connectedTo.end.parent.keyName === 'Battery9v' && window.scope.ArduinoUno.length === 0) {
// TODO: Return false if node's end is connected to 9V Battery
return false;
} else if (node.connectedTo.end.parent.keyName === 'CoinCell' && window.scope.ArduinoUno.length === 0) {
// TODO: Return false if node's end is connected to Coin Cell
return false;
} else if (node.connectedTo.end.parent.keyName === 'RelayModule') {
// TODO: Handle RelayModule
if (startedOn === 'POSITIVE') {
// If search was started on Positive node then return connected node of VCC in Relay
return this.getRecArduinov2(node.connectedTo.end.parent.nodes[3], startedOn);
} else if (startedOn === 'NEGATIVE') {
// If search was started on Negative node then return connected node of GND in Relay
return this.getRecArduinov2(node.connectedTo.end.parent.nodes[5], startedOn);
}
} else {
// TODO: If nothing matches
// IF/ELSE: Determine if start is to be used OR end for further recursion
if (node.connectedTo.end.gid !== node.gid) {
// Loops through all nodes in parent
for (const e in node.connectedTo.end.parent.nodes) {
// IF: gid is different && gid not in visited node
if (node.connectedTo.end.parent.nodes[e].gid !== node.connectedTo.end.gid
&& !this.visitedNodesv2.has(node.connectedTo.end.parent.nodes[e].gid) && node.connectedTo.end.parent.nodes[e].isConnected()) {
// add gid in visited nodes
this.visitedNodesv2.add(node.connectedTo.end.parent.nodes[e].gid);
// call back Arduino Recursive Fn
return this.getRecArduinov2(node.connectedTo.end.parent.nodes[e], startedOn);
}
}
} else if (node.connectedTo.start.gid !== node.gid) {
// Loops through all nodes in parent
for (const e in node.connectedTo.start.parent.nodes) {
// IF: gid is different && gid not in visited node
if (node.connectedTo.start.parent.nodes[e].gid !== node.connectedTo.start.gid
&& !this.visitedNodesv2.has(node.connectedTo.start.parent.nodes[e].gid)
&& node.connectedTo.start.parent.nodes[e].isConnected()) {
// add gid in visited nodes
this.visitedNodesv2.add(node.connectedTo.start.parent.nodes[e].gid);
// call back Arduino Recursive Fn
return this.getRecArduinov2(node.connectedTo.start.parent.nodes[e], startedOn);
}
}
}
}
} catch (e) {
console.warn(e);
return false;
}
}
/**
* Recursive Function to handle BreadBoard
* @param node Node which is to be checked for BreadBoard
*/
static getRecArduinoBreadv2(node: Point, startedOn: string) {
// IF/ELSE: Determine if start is to be used OR end for further recursion
if (node.connectedTo.end.gid !== node.gid) {
const bb = (node.connectedTo.end.parent as BreadBoard);
// loop through joined nodes of breadboard
for (const e in bb.joined) {
if (bb.joined[e].gid !== node.connectedTo.end.gid) {
// Run only if substring matches
if (bb.joined[e].label.substring(1, bb.joined[e].label.length)
=== node.connectedTo.end.label.substring(1, node.connectedTo.end.label.length)) {
const ascii = node.connectedTo.end.label.charCodeAt(0);
const currAscii = bb.joined[e].label.charCodeAt(0);
// add gid to VisitedNode
this.visitedNodesv2.add(bb.joined[e].gid);
// IF/ELSE: determine which part of breadboard is connected
if (ascii >= 97 && ascii <= 101) {
if (bb.joined[e].isConnected() && (currAscii >= 97 && currAscii <= 101)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
} else if (ascii >= 102 && ascii <= 106) {
if (bb.joined[e].isConnected() && (currAscii >= 102 && currAscii <= 106)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
} else {
if (bb.joined[e].isConnected() && (bb.joined[e].label === node.connectedTo.end.label)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
}
}
}
}
} else if (node.connectedTo.start.gid !== node.gid) {
const bb = (node.connectedTo.start.parent as BreadBoard);
// loop through joined nodes of breadboard
for (const e in bb.joined) {
if (bb.joined[e].gid !== node.connectedTo.start.gid) {
// Run only if substring matches
if (bb.joined[e].label.substring(1, bb.joined[e].label.length)
=== node.connectedTo.start.label.substring(1, node.connectedTo.start.label.length)) {
const ascii = node.connectedTo.start.label.charCodeAt(0);
const currAscii = bb.joined[e].label.charCodeAt(0);
// add gid to VisitedNode
this.visitedNodesv2.add(bb.joined[e].gid);
// IF/ELSE: determine which part of breadboard is connected
if (ascii >= 97 && ascii <= 101) {
if (bb.joined[e].isConnected() && (currAscii >= 97 && currAscii <= 101)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
} else if (ascii >= 102 && ascii <= 106) {
if (bb.joined[e].isConnected() && (currAscii >= 102 && currAscii <= 106)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
} else {
if (bb.joined[e].isConnected() && (bb.joined[e].label === node.connectedTo.end.label)) {
return this.getRecArduinov2(bb.joined[e], startedOn);
}
}
}
}
}
}
}
/**
* Subscribes to drag listener of the workspace
* @param fn listener functino
*/
subsribeToDrag(fn) {
// copied the function from Workspace here to avoid circular dependency. TODO: resolve file dependencies
window['DragListeners'].push(fn);
}
/**
* Subscribes to drag stop listener of the workspace
* @param fn listener function
*/
subscribeToDragStop(fn) {
window['DragStopListeners'].push(fn);
}
/**
* Resets highlighted points
*/
resetHighlightedPoints() {
if (this.highlightedPoints.length > 0) {
this.highlightedPoints.forEach(nodeTuple => nodeTuple.breadboardNode.undoHighlight());
this.highlightedPoints = [];
}
}
/**
* Returns list of soldered elements on the breadboard
*/
getSolderedElements() {
return this.getSolderedNodes().map(node => node.connectedTo);
}
/**
* Unsolders element from the breadboard if soldered
* @param element element to find and unsolder
*/
private maybeUnsolderElement(element) {
const elementNodesWires = element.nodes.map(node => node.connectedTo);
const solderedNodes = [...this.getSolderedNodes()];
for (const breadboardNode of solderedNodes) {
if (elementNodesWires.includes(breadboardNode.connectedTo)) {
breadboardNode.unsolderWire();
_.remove(this.solderedNodes, node => node === breadboardNode);
}
}
}
/**
* Listens for drag of other circuit elements in the workspace
*/
onOtherComponentDrag(element) {
const bBox = this.elements.getBBox();
const elementBBox = element.elements.getBBox();
// Disable Node Bubble on hover
Point.showBubbleBool = false;
this.resetHighlightedPoints();
if (!areBoundingBoxesIntersecting(bBox, elementBBox)) {
return;
}
// unsolder element if it's soldered to either of the breadboard's node
this.maybeUnsolderElement(element);
// for all the nodes of the elements, find the nodes in proximity to the nodes of the breadboard
// and add them to this.highlightedPoints
for (const node of element.nodes) {
if (node.isConnected()) {
continue;
}
const nearestNode = this.getNearestNodes(node.x, node.y);
if (nearestNode) {
this.highlightedPoints.push(new BreadboardProximityNodeTuple(nearestNode, node));
}
}
// highlight points stored in highlightedPoints
for (const node of this.highlightedPoints) {
node.breadboardNode.highlight();
}
}
/**
* Listener to handle when dragging of a component stops
*/
onOtherComponentDragStop() {
// Enable Node Bubble on hover
Point.showBubbleBool = true;
// if no highlighted points when the dragging stops, return
if (this.highlightedPoints.length === 0) {
return;
}
// connect highlightedPoints
for (const nodeTuple of this.highlightedPoints) {
const wire = nodeTuple.breadboardNode.solderWire();
wire.addPoint(nodeTuple.elementNode.x, nodeTuple.elementNode.y);
// wire.connect(nodeTuple.elementNode, true);
nodeTuple.elementNode.connectWire(wire, false);
this.addSolderedNode(nodeTuple.breadboardNode);
}
this.resetHighlightedPoints();
}
/** init is called when the component is complety drawn to the canvas */
init() {
this.sortedNodes = _.sortBy(this.nodes, ['x', 'y']);
if (BreadBoard.groupings.length === 0) {
BreadBoard.groupings = this.data.groupings;
}
// initialise sameX and sameY node sets
for (const node of this.nodes) {
// create the set for x
this.sameXNodes[node.x] = this.sameXNodes[node.x] || [];
this.sameXNodes[node.x].push(node);
// Create the set for y
this.sameYNodes[node.y] = this.sameYNodes[node.y] || [];
this.sameYNodes[node.y].push(node);
}
// add a connect callback listener
for (const node of this.nodes) {
node.connectCallback = (item) => {
this.joined.push(item);
};
node.disconnectCallback = (item) => {
const index = this.joined.indexOf(item);
if (index > -1) {
this.joined.splice(index, 1);
}
};
}
this.elements.toBack();
// Remove the drag event
this.elements.undrag();
let tmpx = 0;
let tmpy = 0;
let fdx = 0;
let fdy = 0;
let tmpar = [];
let tmpar2 = [];
let ConnEleList = [];
let NodeList = [];
let tmpx2 = [];
let tmpy2 = [];
// Create Custom Drag event
this.elements.drag((dx, dy) => {
this.elements.transform(`t${this.tx + dx},${this.ty + dy}`);
tmpx = this.tx + dx;
tmpy = this.ty + dy;
fdx = dx;
fdy = dy;
for (let i = 0; i < this.joined.length; ++i) {
this.joined[i].move(tmpar[i][0] + dx, tmpar[i][1] + dy);
}
for (let i = 0; i < ConnEleList.length; ++i) {
ConnEleList[i].dragAlong(NodeList[i], dx, dy);
tmpx2[i] = ConnEleList[i].tx + dx;
tmpy2[i] = ConnEleList[i].ty + dy;
}
}, () => {
fdx = 0;
fdy = 0;
tmpar = [];
tmpar2 = [];
for (const node of this.nodes) {
tmpar2.push(
[node.x, node.y]
);
node.remainHidden();
}
for (const node of this.joined) {
let ElementFlag = false;
tmpar.push(
[node.x, node.y]
);
node.remainShow();
if (node.connectedTo != null) {
const ConnElement1 = node.connectedTo.start.parent;
const ConnElement2 = node.connectedTo.end.parent;
console.log(ConnElement1.keyName);
console.log(ConnElement2.keyName);
if (ConnElement1.keyName !== 'BreadBoard') {
for (const ele of ConnEleList) {
if (ele === ConnElement1) {
ElementFlag = true;
break;
}
}
const PlaceableCheck = 'isBreadBoardPlaceable' in ConnElement1.info.properties;
const isBreadBoardPlaceable = ConnElement1.info.properties.isBreadBoardPlaceable;
if (!ElementFlag && PlaceableCheck && isBreadBoardPlaceable === 1) {
ConnEleList.push(ConnElement1);
tmpx2.push(0);
tmpy2.push(0);
NodeList.push(ConnElement1.getNodesCoord());
}
} else {
for (const ele of ConnEleList) {
if (ele === ConnElement1) {
ElementFlag = true;
break;
}
}
const PlaceableCheck = 'isBreadBoardPlaceable' in ConnElement2.info.properties;
const isBreadBoardPlaceable = ConnElement2.info.properties.isBreadBoardPlaceable;
if (!ElementFlag && PlaceableCheck && isBreadBoardPlaceable === 1) {
ConnEleList.push(ConnElement2);
tmpx2.push(0);
tmpy2.push(0);
NodeList.push(ConnElement2.getNodesCoord());
}
}
}
}
}, () => {
// Push dump to Undo stack & Reset
UndoUtils.pushChangeToUndoAndReset({ keyName: this.keyName, element: this.save(), event: 'drag', dragJson: { dx: fdx, dy: fdy } });
for (let i = 0; i < this.nodes.length; ++i) {
this.nodes[i].move(tmpar2[i][0] + fdx, tmpar2[i][1] + fdy);
this.nodes[i].remainShow();
}
tmpar2 = [];
this.tx = tmpx;
this.ty = tmpy;
// reBuild SameNodeObject after drag stop
for (let i = 0; i < ConnEleList.length; i++) {
ConnEleList[i].dragAlongStop(tmpx2[i], tmpy2[i]);
}
ConnEleList = [];
NodeList = [];
tmpx2 = [];
tmpy2 = [];
tmpar = [];
this.reBuildSameNodes();
});
}
/**
* Function to move/transform breadboard
* @param fdx relative x position to move
* @param fdy relative y position to move
*/
transformBoardPosition(fdx: number, fdy: number): void {
let tmpar = [];
let tmpar2 = [];
let tmpx = 0;
let tmpy = 0;
let ffdx = 0;
let ffdy = 0;
let ConnEleList = [];
let NodeList = [];
let tmpx2 = [];
let tmpy2 = [];
ffdx = 0;
ffdy = 0;
tmpar = [];
tmpar2 = [];
for (const node of this.nodes) {
tmpar2.push(
[node.x, node.y]
);
node.remainHidden();
}
for (const node of this.joined) {
tmpar.push(
[node.x, node.y]
);
node.remainShow();
const ConnElement1 = node.connectedTo.start.parent;
const ConnElement2 = node.connectedTo.end.parent;
console.log(ConnElement1.keyName);
console.log(ConnElement2.keyName);
let ElementFlag = false;
if (ConnElement1.keyName !== 'BreadBoard') {
for (const ele of ConnEleList) {
if (ele === ConnElement1) {
ElementFlag = true;
break;
}
}
if (!ElementFlag && ConnElement1.info.properties.isBreadBoardPlaceable === 1) {
ConnEleList.push(ConnElement1);
tmpx2.push(0);
tmpy2.push(0);
NodeList.push(ConnElement1.getNodesCoord());
}
} else {
for (const ele of ConnEleList) {
if (ele === ConnElement1) {
ElementFlag = true;
break;
}
}
if (!ElementFlag && ConnElement2.info.properties.isBreadBoardPlaceable === 1) {
ConnEleList.push(ConnElement2);
tmpx2.push(0);
tmpy2.push(0);
NodeList.push(ConnElement2.getNodesCoord());
}
}
}
this.elements.transform(`t${this.tx + fdx},${this.ty + fdy}`);
tmpx = this.tx + fdx;
tmpy = this.ty + fdy;
ffdx = fdx;
ffdy = fdy;
for (let i = 0; i < this.joined.length; ++i) {
this.joined[i].move(tmpar[i][0] + fdx, tmpar[i][1] + fdy);
}
for (let i = 0; i < ConnEleList.length; ++i) {
ConnEleList[i].dragAlong(NodeList[i], fdx, fdy);
tmpx2[i] = ConnEleList[i].tx + fdx;
tmpy2[i] = ConnEleList[i].ty + fdy;
}
for (let i = 0; i < this.nodes.length; ++i) {
this.nodes[i].move(tmpar2[i][0] + ffdx, tmpar2[i][1] + ffdy);
this.nodes[i].remainShow();
}
this.tx = tmpx;
this.ty = tmpy;
for (let i = 0; i < ConnEleList.length; i++) {
ConnEleList[i].dragAlongStop(tmpx2[i], tmpy2[i]);
}
ConnEleList = [];
NodeList = [];
tmpx2 = [];
tmpy2 = [];
tmpar = [];
this.reBuildSameNodes();
}
/**
* Function provides component details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
properties(): { keyName: string; id: number; body: HTMLElement; title: string; } {
const body = document.createElement('div');
return {
keyName: this.keyName,
id: this.id,
body,
title: this.title
};
}
/**
* Re-build sameNode variables
*/
reBuildSameNodes() {
this.sameXNodes = {};
this.sameYNodes = {};
// initialise sameX and sameY node sets
for (const node of this.nodes) {
// create the set for x
this.sameXNodes[node.x] = this.sameXNodes[node.x] || [];
this.sameXNodes[node.x].push(node);
// Create the set for y
this.sameYNodes[node.y] = this.sameYNodes[node.y] || [];
this.sameYNodes[node.y].push(node);
}
}
/**
* Checks if the point is inside the passed bounding box
* TODO: move the function to a utils
* @param boundingBox: Raphael Bounding box object
* @param x: x-coordinate of the point
* @param y: y-coordinate of the point
*/
isPointWithinBbox(boundingBox, x, y): boolean {
return ((x < boundingBox.cx && x > boundingBox.cx - 1.2 * boundingBox.width) &&
(y < boundingBox.cy && y > boundingBox.cy - 1.2 * boundingBox.height));
}
/**
* Returns the shortlisted list of the nodes within the proximity of (x, y) coordinate
* @param x: x-coordinate
* @param y: y-coordinate
*/
shortlistNodes(x, y) {
const xIndexFrom = _.sortedIndexBy(this.sortedNodes, { x: x - BreadBoard.PROXIMITY_DISTANCE }, 'x');
const xIndexTo = _.sortedLastIndexBy(this.sortedNodes, { x: x + BreadBoard.PROXIMITY_DISTANCE }, 'x');
return this.sortedNodes.slice(xIndexFrom, xIndexTo);
}
/**
* Returns the nearest node on the breadboard to the passed coordinate
* @param x: x-coordinate
* @param y: y-coordinate
*/
getNearestNodes(x, y) {
// this.elements.getElementByPoint()
const nodesToSearch = this.shortlistNodes(x, y);
for (const node of nodesToSearch) {
if (this.isPointWithinBbox(node.body.getBBox(), x, y)) {
return node;
}
}
}
/**
* Returns the list of nodes that are soldered on the breadboard
*/
getSolderedNodes() {
if (this.solderedNodes == null) {
this.solderedNodes = this.nodes.filter(node => node.isSoldered());
}
return this.solderedNodes;
}
/**
* Adds soldered nodes to the cache
* @param node node
*/
addSolderedNode(node) {
if (this.solderedNodes == null) {
this.solderedNodes = [];
}
this.solderedNodes.push(node);
}
/**
* Initialize Breadboard for simultion
*/
initSimulation(): void {
// Stores set of node which has same x values
const xtemp = this.sameXNodes;
// Stores set of node which has same y values
const ytemp = this.sameYNodes;
for (const node of this.nodes) {
// Add a Node value change listener
node.addValueListener((value, calledBy, parent) => {
const labelCalledBy = calledBy.label;
const labelParent = parent.label;
if (calledBy.y === parent.y
&& (labelCalledBy.charCodeAt(0) !== labelParent.charCodeAt(0) || labelCalledBy === labelParent)) {
return;
}
if (node.label === '-') {
for (const neigh of ytemp[node.y]) {
if (neigh.x !== node.x && value <= 0) {
neigh.setValue(value, neigh);
}
}
} else if (node.label === '+') {
for (const neigh of ytemp[node.y]) {
if (neigh.x !== node.x) {
neigh.setValue(value, neigh);
}
}
} else {
const op = node.label.charCodeAt(0);
if (op >= 102) {
for (const neigh of xtemp[node.x]) {
if (neigh.y !== node.y && neigh.label.charCodeAt(0) >= 102) {
neigh.setValue(value, neigh);
}
}
}
if (op <= 101) {
for (const neigh of xtemp[node.x]) {
if (neigh.y !== node.y && neigh.label.charCodeAt(0) <= 101) {
neigh.setValue(value, neigh);
}
}
}
}
});
}
}
/**
* Called on Stop Simulation is pressed
*/
closeSimulation(): void {
BreadBoard.visitedNodesv2.clear();
}
/**
* Returns groupings
*/
getGroupings() {
const groups = _.cloneDeep(BreadBoard.groupings);
return groups;
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Geometry.ts
================================================
import _ from 'lodash';
export class BoundingBox {
x: number;
y: number;
height: number;
width: number;
constructor(x: number, y: number, width: number, height: number) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
static loadFromRaphaelBbox(bBox) {
return new BoundingBox(bBox.x, bBox.y, bBox.width, bBox.height);
}
static getCombinedBBox(bBoxes: BoundingBox[]) {
const minX = _.minBy(bBoxes, box => box.x).x;
const maxX = _.maxBy(bBoxes, box => box.x).x;
const minY = _.minBy(bBoxes, box => box.y).y;
const maxY = _.maxBy(bBoxes, box => box.y).y;
return new BoundingBox(
minX, minY, maxX - minX, maxY - minY
);
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/ImageToByteArray.ts
================================================
export class ImageToByteArray {
static result = '';
static getDataURLForm(url: string) {
this.result = '';
const image = this.createImage(url);
image.onload = () => {
this.result = this.convertImage(image);
};
}
static createImage(url: string) {
const image = document.createElement('img');
image.setAttribute('src', url);
image.setAttribute('visibility', 'hidden');
return image;
}
static convertImage(image) {
const canvas = this.drawImageToCanvas(image);
return canvas.toDataURL();
}
static drawImageToCanvas(image) {
const canvas = document.createElement('canvas');
canvas.width = image.width;
canvas.height = image.height;
canvas.getContext('2d').drawImage(image, 0, 0, image.width, image.height);
return canvas;
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Login.ts
================================================
import { environment } from '../../environments/environment';
/**
* Class For handling Login & Logout
*/
export class Login {
/**
* Get Auth Token
*/
static getToken(): string {
return window.localStorage.getItem('esim_token');
}
/**
* Logout and redirect to home page
*/
static logout() {
window.localStorage.removeItem('esim_token');
window.open(new URL('../../', window.location.href).href, '_self');
}
/**
* Redirect to the login Page
* @param isFront Is Frontpage
*/
static redirectLogin(isFront: boolean = false): void {
const dashboardURI = (new URL(environment.DASHBOARD_URL, window.location.href)).href;
if (Login.getToken()) {
window.open(dashboardURI, '_self');
} else {
let redirectUri = isFront ? dashboardURI : window.location.href;
redirectUri = encodeURIComponent(redirectUri);
// const url = `${window.location.protocol}\\\\${window.location.host}\\eda\\#\\login?url=${redirectUri}`;
const url = `${environment.LOGIN_URL}${redirectUri}`;
window.open(url, '_self');
}
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/MathUtils.ts
================================================
export class MathUtils {
static modulo(n, m) {
return ((n % m) + m) % m;
}
static isPointBetween(point: [number, number], point1: [number, number], point2: [number, number]): boolean {
return (point[0] >= point1[0] && point[0] < point2[0]) && (point[1] >= point1[1] && point[1] < point2[1]);
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Miscellaneous.ts
================================================
import { CircuitElement } from './CircuitElement';
/**
* Label class
*/
export class Label extends CircuitElement {
/**
* Text of the label
*/
text = 'Label';
/**
* Font Size of the Label
*/
fontSize = 15;
/**
* Font color of the label.
*/
fontColor = '#000000';
/**
* Font style of the label
*/
fontStyle = 'normal';
/**
* Font weight of the label.
*/
fontWeight = 'normal';
/**
* Get Name Function
*/
getName = null;
/**
* Label constructor
* @param canvas Raphael Canvas (Paper)
* @param x position x
* @param y position y
*/
constructor(public canvas: any, x: number, y: number) {
super('Label', x, y);
this.elements.push(
canvas.text(x, y, this.text)
);
this.update();
this.setClickListener(null);
this.setDragListeners();
this.setHoverListener();
window['queue'] -= 1;
}
/** Saves data for label class */
SaveData() {
return {
text: this.text,
size: this.fontSize,
color: this.fontColor,
weight: this.fontWeight,
style: this.fontStyle
};
}
/**
* Loads data of SaveData()
* @param data saved object
*/
LoadData(data: any) {
this.text = data.data.text;
this.fontSize = data.data.size;
this.fontColor = data.data.color;
this.fontWeight = data.data.weight;
this.fontStyle = data.data.style;
this.elements.transform(`t${this.tx},${this.ty}`);
this.update();
}
/** Function updates the label class */
update() {
this.elements[0]
.attr({
'font-size': this.fontSize,
'font-family': 'Times New Roman,Georgia,Serif',
'font-weight': this.fontWeight,
'font-style': this.fontStyle,
text: this.text,
fill: this.fontColor
});
}
/** Changes text for label */
changeLabel(value: string) {
// if text field is empty
if (value === '') {
// TODO: Show Toast
window['showToast']('Label cannot be empty');
return;
}
this.text = value;
this.update();
}
/**
* Function provides label details
* @param keyName Unique Class name
* @param id Component id
* @param body body of property box
* @param title Component title
*/
properties(): { keyName: string; id: number; body: HTMLElement; title: string; } {
let tmp;
const body = document.createElement('div');
body.style.display = 'flex';
body.style.flexDirection = 'column';
const inp = document.createElement('input');
inp.value = this.text;
inp.onkeyup = () => {
this.changeLabel(inp.value);
};
inp.addEventListener('focusout', () => {
if (inp.value === '') {
inp.value = this.text;
}
});
const sz = document.createElement('input');
sz.type = 'number';
sz.min = '10';
sz.value = `${this.fontSize}`;
sz.max = '100';
sz.onchange = () => {
const num = parseInt(sz.value, 10);
if (num) {
this.fontSize = Math.min(100, Math.max(10, num));
this.update();
}
};
const colors = [
['Black', '#000000'],
['Red', '#ff0000'],
['Green', '#04942b'],
['Blue', '#0000ff'],
['Purple', '#6a0dad'],
];
const colorSelect = document.createElement('select');
tmp = '';
for (const col of colors) {
tmp += `<option>${col[0]}</option>`;
}
colorSelect.innerHTML = tmp;
colorSelect.onchange = () => {
this.fontColor = colors[colorSelect.selectedIndex][1];
this.update();
};
const styles = ['Normal', 'Italic'];
const styleSelect = document.createElement('select');
tmp = '';
for (const styl of styles) {
tmp += `<option>${styl}</option>`;
}
styleSelect.innerHTML = tmp;
styleSelect.onchange = () => {
this.fontStyle = styles[styleSelect.selectedIndex];
this.update();
};
const weights = ['Normal', 'Bold', 'Bolder', 'Lighter'];
const weightSelect = document.createElement('select');
tmp = '';
for (const wght of weights) {
tmp += `<option>${wght}</option>`;
}
weightSelect.innerHTML = tmp;
weightSelect.onchange = () => {
this.fontWeight = weights[weightSelect.selectedIndex];
this.update();
};
tmp = document.createElement('label');
tmp.innerText = 'Text';
body.appendChild(tmp);
body.appendChild(inp);
tmp = document.createElement('label');
tmp.innerText = 'Size';
body.appendChild(tmp);
body.appendChild(sz);
tmp = document.createElement('label');
tmp.innerText = 'Colors';
body.appendChild(tmp);
body.appendChild(colorSelect);
tmp = document.createElement('label');
tmp.innerText = 'Styles';
body.appendChild(tmp);
body.appendChild(styleSelect);
tmp = document.createElement('label');
tmp.innerText = 'Weight';
body.appendChild(tmp);
body.appendChild(weightSelect);
return {
keyName: this.keyName,
id: this.id,
body,
title: 'Label'
};
}
/**
* Called on Start Simulation
*/
initSimulation(): void {
}
/**
* Called on Stop simulation.
*/
closeSimulation(): void {
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Point.ts
================================================
import { Wire } from './Wire';
import { CircuitElement } from './CircuitElement';
import { isNull } from 'util';
import { BoundingBox } from './Geometry';
import _ from 'lodash';
import { BreadBoard } from './General';
/**
* Declare window so that custom created function don't throw error
*/
declare var window;
/**
* Class For Circuit Node ie. Point wires can connect with nodes
*/
export class Point {
/**
* Boolean to either show bubble on hover or not
*/
static showBubbleBool = true;
/**
* Hide node on creation
*/
static defaultAttr: any = {
fill: 'rgba(0,0,0,0)',
stroke: 'rgba(0,0,0,0)'
};
/**
* Show red color with black stroke on hover
*/
static nodeAttr: any = {
fill: 'rgba(255,0,0,1)',
stroke: 'rgba(0,0,0,1)'
};
/**
* Body of the Circuit Node
*/
body: any;
/**
* Stores the reference of wire which is connected to it
*/
connectedTo: Wire = null;
/**
* Is the point soldered with wire.
*/
private soldered = false;
/**
* Hover callback called on hover over node
*/
hoverCallback: any = null;
/**
* Hover Close Callback called if hover is removed
*/
hoverCloseCallback: any = null;
/**
* Callback called when we connect wire.
*/
connectCallback: any = null;
/*
Callback called on disconnecting a wire.
*/
disconnectCallback: any = null;
/**
* The Value of the node
*/
value = -1;
/**
* Value change listener
*/
listener: (val: number, calledby: Point, current: Point) => void = null;
/**
* Graph id used while starting simulation.
*/
gid = -1;
/**
* The Node ID
*/
id: number;
/**
* Boolean for inputPullUp
*/
pullUpEnabled = false;
/**
* Constructor for Circuit Node
* @param canvas Raphael Canvas / paper
* @param x x position of node
* @param y y position of node
* @param label label to be shown when hover
* @param half The Half width of Square
* @param parent parent of the circuit node
*/
constructor(
private canvas: any,
public x: number,
public y: number,
public label: string,
public half: number,
public parent: CircuitElement
) {
// if (window['point_id']) {
// this.id = window['point_id'];
// window.point_id += 1;
// }
// else {
// this.id = 1;
// window['point_id'] = 2;
// }
this.id = this.parent.nid;
++this.parent.nid;
// Create a rectangle of 4x4 and set default color and stroke
this.body = this.canvas.rect(x, y, 2 * this.half, 2 * this.half);
this.body.attr(Point.defaultAttr);
this.body.node.setAttribute('class', 'mynode');
// Set Hover callback
this.body.hover((evt: MouseEvent) => {
// Check if showBubbleBool is enabled
if (Point.showBubbleBool) {
// Check if callback is present if it is then call it
if (this.hoverCallback) {
this.hoverCallback(this.x, this.y);
}
window.showBubble(this.label, evt.clientX, evt.clientY);
if (this.parent.keyName === 'BreadBoard') {
const ref = this.parent as BreadBoard;
if (this.label === '+' || this.label === '-') {
for (const point of ref.sameYNodes[this.y]) {
if (this.id === point.id) {
this.highlight();
} else {
point.outline();
}
}
} else {
const groups = ref.getGroupings();
const index = groups.findIndex(prefix => prefix.includes(this.label.charAt(0)));
for (const point of ref.sameXNodes[this.x]) {
if (point.label !== '+' && point.label !== '-') {
if (groups[index].includes(point.label.charAt(0))) {
if (this.id === point.id) {
this.highlight();
} else {
point.outline();
}
}
}
}
}
}
} else {
// TODO: Do not show node highligtht
this.remainHidden();
}
}, () => {
// Check if close callback is present if present call it
if (this.hoverCloseCallback) {
this.hoverCloseCallback(this.x, this.y);
}
window.hideBubble();
if (this.parent.keyName === 'BreadBoard') {
const ref = this.parent as BreadBoard;
if (this.label === '+' || this.label === '-') {
for (const point of ref.sameYNodes[this.y]) {
if (this.id === point.id) {
this.undoHighlight();
} else {
point.undoOutline();
}
}
} else {
for (const point of ref.sameXNodes[this.x]) {
if (point.label !== '+' && point.label !== '-') {
if (this.id === point.id) {
this.undoHighlight();
} else {
point.undoOutline();
}
}
}
}
}
// Show node highligtht
this.remainShow();
});
// TODO: Remove The following code After Development
// this.body.drag((dx, dy) => {
// this.body.attr({
// x: this.x + dx,
// y: this.y + dy
// });
// }, () => {
// this.x = this.body.attr("x");
// this.y = this.body.attr("y");
// }, () => {
// this.x = this.body.attr("x");
// this.y = this.body.attr("y");
// });
// this.body.dblclick(() => {
// alert((this.x - this.parent.x) + "," + (this.y - this.parent.y) + " " + this.label);
// });
// return;
// Set click listener
this.body.mousedown(() => {
if (this.connectedTo != null) {
return;
}
if ((window['Selected'] instanceof Wire) && !window.Selected.isConnected()) {
this.connectWire(window['Selected']);
window['isSelected'] = false; // deselect object
window['Selected'] = null;
} else {
// if nothing is selected create a new wire object
window.isSelected = true;
const wire = this.startNewWire();
// select the wire and insert into the scope of circuit
window.Selected = wire;
}
if (this.connectCallback) {
this.connectCallback(this);
}
});
}
isConnected(): boolean {
return !!this.connectedTo;
}
isSoldered(): boolean {
return this.soldered;
}
/**
* Solders wire to the point
* @param wire wire to solder (if existing wire, else pass empty to create a new wire at the node)
*/
solderWire(wire?): Wire {
if (!wire) {
wire = this.startNewWire();
}
this.soldered = true;
const newClass = `${this.body.node.getAttribute('class')} solder-highlight`;
this.body.node.setAttribute('class', newClass);
if (this.connectCallback) {
this.connectCallback(this);
}
return wire;
}
/**
* Unsolders wire to the point
*/
unsolderWire() {
const wire = this.connectedTo;
if (wire) {
this.setValue(-1, this);
wire.delete();
}
this.soldered = false;
const newClass = this.body.node.getAttribute('class').replace(' solder-highlight', '');
this.body.node.setAttribute('class', newClass);
if (this.disconnectCallback) {
this.disconnectCallback(this);
}
}
connectWire(wire, pushToUndo = true) {
// if selected item is wire then connect the wire with the node
// console.log([]);
if (wire.start === this) { return; }
this.connectedTo = wire;
wire.connect(this, true, false, !pushToUndo, pushToUndo ? 'add' : 'breadDrag');
wire.deselect();
if (wire.start && wire.end) {
window['scope']['wires'].push(wire);
} else {
window['showToast']('Wire was not connected properly !');
}
}
/**
* Creates and originates new wire at the point
*/
startNewWire() {
const wire = new Wire(this.canvas, this);
this.connectedTo = wire;
return wire;
}
/**
* Returns the bounding box of the point
*/
getBoundingBox(): BoundingBox {
return BoundingBox.loadFromRaphaelBbox(this.body.getBBox());
}
/**
* Set Hover and Hover close Callback
* @param callback Hover Callback
* @param closeCallback Hover Close Callback
*/
setHoverCallback(callback = null, closeCallback = null) {
this.hoverCallback = callback;
this.hoverCloseCallback = closeCallback;
}
/**
* Return the center position of the Node
*/
position() {
return [this.x + this.half, this.y + this.half];
}
highlight() {
const newClass = `${this.body.node.getAttribute('class')} highlight`;
this.body.node.setAttribute('class', newClass);
}
undoHighlight() {
const newClass = this.body.node.getAttribute('class').replace(' highlight', '');
this.body.node.setAttribute('class', newClass);
}
outline() {
const newClass = `${this.body.node.getAttribute('class')} outline`;
this.body.node.setAttribute('class', newClass);
}
undoOutline() {
const newClass = this.body.node.getAttribute('class').replace(' outline', '');
this.body.node.setAttribute('class', newClass);
}
/**
* Change the Position of Node with relative to current position
* @param dx change in x axis
* @param dy change in y axis
*/
relativeMove(dx: number, dy: number) {
this.x += dx;
this.y += dy;
// update the position
this.body.attr({
x: this.x,
y: this.y
});
}
/**
* Hide Node
*/
hide() {
this.body.attr(Point.defaultAttr);
}
/**
* This will permanently hide the node
*/
remainHidden() {
this.body.hide();
}
/**
* This will show node if its is permanently hidden
*/
remainShow() {
this.body.show();
}
/**
* Show Node
*/
show() {
if (this.connectedTo) { return; }
this.body.attr(Point.nodeAttr);
}
/**
* Move Node to x,y
* @param x new x position of Node
* @param y new y position of Node
*/
move(x: number, y: number) {
this.x = x;
this.y = y;
// Update the positon
this.body.attr({
x: this.x,
y: this.y
});
}
/**
* Disconnects the point to wire
*/
disconnect() {
this.connectedTo = null;
if (this.isSoldered()) {
this.unsolderWire();
}
}
/**
* Remove Node from canvas
*/
remove() {
this.body.remove();
if (this.connectedTo) {
this.connectedTo.remove();
this.connectedTo = null;
this.parent = null;
}
}
/**
* Adding a Value Change Listener.
* @param listener Value Change Listener
*/
addValueListener(listener: (val: number, calledby: Point, parent: Point) => void) {
this.listener = listener;
}
/**
* Set the value of a Circuit node.
* @param value New Value
* @param calledby The node which sets the value
*/
setValue(value: number, calledby: Point) {
this.value = value;
if (calledby && this.listener) {
this.listener(this.value, calledby, this);
}
if (isNull(calledby)) {
calledby = this;
}
// Propogate the value further
if (this.connectedTo && this.connectedTo.end) {
if (this.connectedTo.end.gid !== calledby.gid && this.connectedTo.end.gid !== this.gid) {
this.connectedTo.end.setValue(this.value, this);
}
}
if (this.connectedTo && this.connectedTo.start) {
if (this.connectedTo.start.gid !== calledby.gid && this.connectedTo.start.gid !== this.gid) {
this.connectedTo.start.setValue(this.value, this);
}
}
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/RaphaelUtils.ts
================================================
/**
* Checks if two raphael element's bounding boxes intersect
*/
export function areBoundingBoxesIntersecting(box1, box2): boolean {
if (box1.x >= box2.x2 || box2.x >= box1.x2) {
return false;
}
if (box1.y2 <= box2.y || box2.y2 <= box1.y) {
return false;
}
return true;
}
================================================
FILE: ArduinoFrontend/src/app/Libs/SaveOffiline.ts
================================================
import { AlertService } from '../alert/alert-service/alert.service';
/**
* Declare window so that custom created function don't throw error
*/
declare var window;
/**
* Class to Save Project in IndexedDB
*/
export class SaveOffline {
/**
* Check if IndexedDB exist if not show alert
* @param callback If IndexedDB exist call the callback
*/
static Check(callback: (result: any) => void = null) {
// check db exist
if (window.indexedDB) {
} else {
// support for other browser
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction;
window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange;
}
// if exist create/open project database
if (window.indexedDB) {
const request = window.indexedDB.open('projects', 1);
// Database was not able to open/create
request.onerror = (err) => {
console.log(err);
AlertService.showAlert('Error Occurred for Ofline Circuit (Private Window Can be a Reason)');
};
// if everything works call the callback with result
request.onsuccess = () => {
if (callback) {
callback(request.result);
}
};
// Create Object Store on success
request.onupgradeneeded = (event) => {
const datab = event.target.result;
if (!datab.objectStoreNames.contains('projects')) {
datab.createObjectStore('project', { keyPath: 'id' });
}
};
return true;
}
// IndexedDB not found
AlertService.showAlert('Save Offline Feature Will Not Work');
return false;
}
/**
* Save Project to Indexed DB
* @param mydata Project Data
* @param callback Callback if Project is saved
*/
static Save(mydata, callback: (data: any) => void = null) {
if (!SaveOffline.Check(db => {
db.transaction(['project'], 'readwrite')
.objectStore('project')
.add(mydata);
if (callback) {
callback(mydata);
}
AlertService.showAlert('Done saved.');
})) {
return;
}
// let db;
// const request = window.indexedDB.open('projects', 1);
// request.onerror = () => {
// // console.log('error: ');
// alert('Error Occurred');
// };
// request.onsuccess = () => {
// db = request.result;
// };
// request.onupgradeneeded = (event) => {
// const datab = event.target.result;
// if (!datab.objectStoreNames.contains('projects')) {
// datab.createObjectStore('project', { keyPath: 'id' });
// }
// };
}
/**
* Read all Project from Indexed DB
* @param callback Callback if after all the data is fetched
*/
static ReadALL(callback: (data: any) => void = null) {
if (!SaveOffline.Check(db => {
const objectStore = db.transaction('project').objectStore('project');
const data = [];
objectStore.openCursor().onsuccess = (event) => {
const cursor = event.target.result;
if (cursor) {
data.push(cursor.value);
cursor.continue();
} else {
if (callback) {
callback(data);
}
}
};
})) {
return;
}
// let db;
// const request = window.indexedDB.open('projects', 1);
// request.onerror = (event) => {
// // console.log('error: ');
// alert('Error Occurred');
// };
// request.onsuccess = () => {
// db = request.result;
// console.log('success: ' + db);
// };
}
/**
* Delete Project Fron Indexed DB
* @param id Project ID
* @param callback Callback if it was deleted Succesfully
*/
static Delete(id, callback: () => void = null) {
if (!SaveOffline.Check(db => {
const ok = db.transaction(['project'], 'readwrite')
.objectStore('project')
.delete(id);
ok.onsuccess = (_) => {
if (callback) {
callback();
}
};
})) {
return;
}
// let db;
// const request = window.indexedDB.open('projects', 1);
// request.onerror = (_) => {
// // console.log('error: ');
// alert('Error Occurred');
// };
// request.onsuccess = (__) => {
// db = request.result;
// };
}
/**
* Update respective Project in Indexed DB
* @param mydata Project data contains id
* @param callback Callback when Project is succesfully updated
*/
static Update(mydata, callback: (data: any) => void = null) {
if (!SaveOffline.Check(db => {
const ok = db.transaction(['project'], 'readwrite')
.objectStore('project')
.put(mydata);
ok.onsuccess = (_) => {
AlertService.showAlert('Done updating.');
if (callback) {
callback(mydata);
}
};
})) {
return;
}
// let db;
// const request = window.indexedDB.open('projects', 1);
// request.onerror = (_) => {
// alert('Error Occurred');
// // console.log('error: ');
// };
// request.onsuccess = (__) => {
// db = request.result;
// };
}
/**
* Read a Particular project from Indexed DB
* @param id Project ID
* @param callback Callback if Project read is completed
*/
static Read(id, callback: (data: any) => void = null) {
if (!SaveOffline.Check(db => {
const transaction = db.transaction(['project']);
const objectStore = transaction.objectStore('project');
const ok = objectStore.get(parseInt(id, 10));
ok.onerror = () => {
AlertService.showAlert('Unable to retrieve data from database!');
callback(null);
};
ok.onsuccess = () => {
callback(ok.result);
};
})) {
return;
}
// let db;
// const request = window.indexedDB.open('projects', 1);
// request.onerror = () => {
// alert('Error Occurred');
// // console.log('error: ');
// };
// request.onsuccess = () => {
// db = request.result;
// };
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/SaveOnline.ts
================================================
import { isNull } from 'util';
import { Login } from './Login';
import { Download, ImageType } from './Download';
import { ApiService } from '../api.service';
import { Workspace } from './Workspace';
import { AlertService } from '../alert/alert-service/alert.service';
import { HttpErrorResponse } from '@angular/common/http';
import { ConvertJSONFormat } from './ConvertJSONFormat';
/**
* Declare window so that custom created function don't throw error
*/
declare var window;
/**
* Class For Saving Online
*/
export class SaveOnline {
/**
* Check if input is an UUID.
* @param input Input that needs to be tested
*/
static isUUID(input: string) {
const rgx = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
return rgx.test(input);
}
/**
* Save or Update Project
* @param name Project Name
* @param description Project Description
* @param api API Service
* @param branch Branch of variation
* @param version Version of variation
* @param callback Callback when save/update is done
* @param id Project ID
*/
static Save(name = '', description = '', api: ApiService, branch, version, callback: (data: any) => void = null, id: string = null) {
// Get Token
const token = Login.getToken();
// if id is present then update
let toUpdate = false;
if (isNull(id)) {
} else {
toUpdate = true;
}
// Save Object that needs to send to server
const saveObj = {
data_dump: '',
is_arduino: true,
description,
name,
branch,
version,
};
// Data Dump will contain Workspace Data and Circuit data
const dataDump = {
canvas: {
x: Workspace.translateX,
y: Workspace.translateY,
scale: Workspace.scale
}
};
// For each item in scope
for (const key in window.scope) {
// if at least one component present in the scope
if (window.scope[key] && window.scope[key].length > 0) {
dataDump[key] = []; // Intialize datadump
// Call the save function and push the return object
for (const item of window.scope[key]) {
if (item.save) {
dataDump[key].push(item.save());
}
}
}
}
// Convert Data Dump to an String and add to Save Object
saveObj.data_dump = JSON.stringify(dataDump);
// Generate Thumbnail for the project
Download.ExportImage(ImageType.PNG).then(v => {
saveObj['base64_image'] = v; // Store the base64 image
// if update then update the project
if (toUpdate) {
api.updateProject(id, saveObj, token).subscribe(out => {
if (callback) {
callback(out);
}
}, err => {
if (err.status === 401) {
AlertService.showAlert('You Cannot Save the Circuit as you are not the Ownwer');
return;
}
console.log(err);
});
} else {
// Otherwise save the project
api.saveProject(saveObj, token).subscribe(output => {
if (callback) {
callback(output);
}
}, err => {
let message = '';
for (const key in err.error) {
if (err.error[key]) {
message += '\n' + key;
for (const item of err.error[key]) {
message += `${item},`;
}
}
}
AlertService.showAlert(message);
});
}
});
}
/**
* Save Staff Project
* @param name Project Name
* @param description Project Description
* @param api API Service
* @param callback Callback when save is done
*/
static staffSaveGallery(name = '', description = '', api: ApiService, callback: (data: any) => void = null) {
// Get Token
const token = Login.getToken();
// Save Object that needs to send to server
const saveObj = {
data_dump: '',
is_arduino: true,
description: '',
name,
save_id: 'gallery' + Math.random() * 100000
};
// Data Dump will contain Workspace Data and Circuit data
const dataDump = {
canvas: {
x: Workspace.translateX,
y: Workspace.translateY,
scale: Workspace.scale
}
};
// For each item in scope
for (const key in window.scope) {
// if at least one component present in the scope
if (window.scope[key] && window.scope[key].length > 0) {
dataDump[key] = []; // Intialize datadump
// Call the save function and push the return object
for (const item of window.scope[key]) {
if (item.save) {
dataDump[key].push(item.save());
}
}
}
}
// Convert Data Dump to an String and add to Save Object
saveObj.data_dump = JSON.stringify(dataDump);
// Generate Thumbnail for the project
Download.ExportImage(ImageType.PNG).then(v => {
saveObj['media'] = v; // Store the base64 image
// Otherwise save the project
api.saveProjectToGallery(saveObj, token).subscribe(output => {
if (callback) {
callback(output);
AlertService.showAlert('Saved In Gallery');
}
}, err => {
console.log(err);
let message = '';
for (const key in err.error) {
if (err.error[key]) {
message += '\n' + key;
for (const item of err.error[key]) {
message += `${item},`;
}
}
}
AlertService.showAlert(message);
});
});
}
/**
* Save or Update Project from Dashboard
* @param data Project data
* @param api API Service
* @param callback Callback when save/update is done
* @param toUpdate Determines whether to save or update the circuit
*/
static SaveFromDashboard(data: any, api: ApiService, callback: (data: any) => void = null, toUpdate: boolean) {
const id = data.id;
// Get Token
const token = Login.getToken();
if (token) {
// Converting data to required format
const saveObj = ConvertJSONFormat.convertToOnlineFormat(data);
if (toUpdate) {
api.readProject(id, 'master', this.getRandomString(20), token).subscribe(() => {
// if exists then update the project
api.updateProject(id, saveObj, token).subscribe(out => {
if (callback) {
AlertService.showAlert('Updated');
callback(out);
}
}, err => {
if (err.status === 401) {
AlertService.showAlert('You Cannot Save the Circuit as you are not the Ownwer');
return;
}
console.log(err);
});
},
(err: HttpErrorResponse) => {
if (err.status === 404) {
// Otherwise save the project
this.CallToAPISaveService(api, saveObj, token, callback);
AlertService.showAlert('Circuit ID has been changed as circuit was deleted');
} else if (err.status === 401) {
AlertService.showAlert('You are Not Authorized to download this circuit');
window.open('../../../', '_self');
return;
} else {
AlertService.showAlert('Something Went Wrong');
}
console.log(err);
}
);
} else {
// Save the project due to invalid id
this.CallToAPISaveService(api, saveObj, token, callback);
}
}
}
/**
* Calls api to save project data on cloud.
* This function was created to reduce repeating code from above function.
* @param api API Service
* @param saveObj JSON Object containing Project
* @param token Login Token
* @param callback Callback when project saved
*/
static CallToAPISaveService(api: ApiService, saveObj: any, token: string, callback: (data: any) => void = null) {
api.saveProject(saveObj, token).subscribe(output => {
if (callback) {
AlertService.showAlert('Saved');
callback(output);
}
}, err => {
let message = '';
for (const key in err.error) {
if (err.error[key]) {
message += '\n' + key;
for (const item of err.error[key]) {
message += `${item},`;
}
}
}
AlertService.showAlert(message);
});
}
/**
* Generate and return a random string
* @param length Length of random string
* @returns random string
*/
static getRandomString(length) {
let result = '';
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() *
charactersLength));
}
return result;
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/UndoUtils.ts
================================================
import { Utils } from './Utils';
import { Workspace } from './Workspace';
import { isNull } from 'util';
declare var window;
/**
* Abstract Class UndoUtils
* Inherited to implement Undo & Redo Functionality
*/
export abstract class UndoUtils {
/**
* Boolean to disable undo/redo buttons for some time until circuit is loading
*/
static enableButtonsBool = true;
/**
* Undo Stack
*/
static undo = [];
/**
* Redo Stack
*/
static redo = [];
/**
* Workspace changed
*/
static event = new CustomEvent('changed', {
detail : {
changed: true,
}
});
/**
* Call this function to Undo
*/
static workspaceUndo() {
if (this.undo.length > 0) {
const cng = this.undo.pop();
this.loadChange(cng, 'undo');
}
}
/**
* Call this function to Redo
*/
static workspaceRedo() {
if (this.redo.length > 0) {
const cng = this.redo.pop();
this.loadChange(cng, 'redo');
}
}
/**
* Function to reset redo stack & push into undo stack
* @param ele event snapshot
*/
static pushChangeToUndoAndReset(ele) {
// Empty Redo Stack
this.redo = [];
// This is used to save wires connected to element in case of delete event only
if (ele.event === 'delete') {
let step = 0;
const grup = window.scope[ele.keyName];
const temp = this.getExistingWindowElement(grup, ele);
for (const e in temp.nodes) {
if (temp.nodes[e].connectedTo) {
const wire = temp.nodes[e].connectedTo;
UndoUtils.pushChangeToUndo({ keyName: wire.keyName, element: wire.save(), event: 'delete' });
step += 1;
}
}
if (ele.event === 'add' || ele.event === 'delete') {
UndoUtils.event.detail['ele'] = ele;
console.log(ele);
document.dispatchEvent(UndoUtils.event);
}
ele.step = step;
this.undo.push(ele);
return;
}
// If not delete continue to normal Undo Process
this.pushChangeToUndo(ele);
}
/**
* Function to push into redo stack
* @param ele event snapshot
*/
static pushChangeToRedo(ele) {
this.redo.push(ele);
}
/**
* Function to push into undo stack
* @param ele event snapshot
*/
static pushChangeToUndo(ele) {
// This is used to save wires connected to element in case of delete event only
if (ele.event === 'delete') {
let step = 0;
const grup = window.scope[ele.keyName];
const temp = this.getExistingWindowElement(grup, ele);
for (const e in temp.nodes) {
if (temp.nodes[e].connectedTo) {
const wire = temp.nodes[e].connectedTo;
UndoUtils.pushChangeToUndo({ keyName: wire.keyName, element: wire.save(), event: 'delete' });
step += 1;
}
}
ele.step = step;
}
// Push to Undo stack
this.undo.push(ele);
if (ele.event === 'add' || ele.event === 'delete') {
UndoUtils.event.detail['ele'] = ele;
console.log(ele);
document.dispatchEvent(UndoUtils.event);
}
}
/**
* Load The Changes, Called after Undo and redo operation to process the event snapshot
* @param ele event snapshot
* @param operation undo/redo
*/
static async loadChange(ele, operation) {
// All elements in window.scope with similar
const grup = window.scope[ele.keyName];
// Check if dragJson is present, & jump to next operation if both dx & dy are 0
if (ele.dragJson) {
if (ele.dragJson.dx === 0 && ele.dragJson.dy === 0) {
if (operation === 'undo') {
this.workspaceUndo();
} else if (operation === 'redo') {
this.workspaceRedo();
}
return;
}
}
if (ele.event === 'add' || ele.event === 'delete') {
UndoUtils.event.detail['ele'] = ele;
console.log(ele);
document.dispatchEvent(UndoUtils.event);
}
// handle Delete events
if (operation === 'undo' && ele.event === 'delete') {
UndoUtils.createElement(ele).then(res => {
// if (ele.keyName === 'BreadBoard') {
// window['DragListeners'] = [];
// window['DragStopListeners'] = [];
// }
for (let i = 0; i < ele.step; i++) {
const chg = this.undo.pop();
UndoUtils.createElement(chg);
}
UndoUtils.pushChangeToRedo({ keyName: ele.keyName, element: ele.element, event: ele.event, step: ele.step });
});
return;
} else if (operation === 'redo' && ele.event === 'delete') {
const temp = this.getExistingWindowElement(grup, ele);
window['Selected'] = temp;
Workspace.DeleteComponent(false);
return;
}
// handle auto-layout of wires
if (ele.event === 'layout' && operation === 'undo') {
const existing = this.getExistingWindowElement(grup, ele);
UndoUtils.pushChangeToRedo({ keyName: existing.keyName, element: existing.save(), event: ele.event, step: ele.step });
UndoUtils.removeElement(ele).then(res => {
UndoUtils.createElement(ele).then(result => {
for (let i = 0; i < ele.step - 1; i++) {
const chg = this.undo.pop();
const innerExisting = this.getExistingWindowElement(grup, chg);
const obj = { keyName: innerExisting.keyName, element: innerExisting.save(), event: chg.event, step: chg.step };
UndoUtils.pushChangeToRedo(obj);
UndoUtils.removeElement(chg).then(ress => {
UndoUtils.createElement(chg);
});
}
});
});
return;
} else if (ele.event === 'layout' && operation === 'redo') {
const existing = this.getExistingWindowElement(grup, ele);
UndoUtils.pushChangeToUndo({ keyName: existing.keyName, element: existing.save(), event: ele.event, step: ele.step });
UndoUtils.removeElement(ele).then(res => {
UndoUtils.createElement(ele).then(result => {
for (let i = 0; i < ele.step - 1; i++) {
const chg = this.redo.pop();
const innerExisting = this.getExistingWindowElement(grup, chg);
const obj = { keyName: innerExisting.keyName, element: innerExisting.save(), event: chg.event, step: chg.step };
UndoUtils.pushChangeToUndo(obj);
UndoUtils.removeElement(chg).then(ress => {
UndoUtils.createElement(chg);
});
}
});
});
}
if (ele.event === 'breadDrag' && operation === 'undo') {
UndoUtils.removeElement(ele).then(res => {
UndoUtils.workspaceUndo();
});
return;
}
// handle Wire change events like add & color change
if (ele.event === 'add' && operation === 'redo' && ele.keyName === 'wires') {
UndoUtils.pushChangeToUndo(ele);
UndoUtils.createElement(ele);
return;
} else if (ele.event === 'add' && operation === 'undo' && ele.keyName === 'wires') {
UndoUtils.pushChangeToRedo(ele);
UndoUtils.removeElement(ele);
return;
} else if (ele.event === 'wire_color' && operation === 'undo' && ele.keyName === 'wires') {
const temp = this.getExistingWindowElement(grup, ele);
UndoUtils.pushChangeToRedo({ keyName: ele.keyName, element: temp.save(), event: ele.event });
temp.setColor(ele.element.color);
return;
} else if (ele.event === 'wire_color' && operation === 'redo' && ele.keyName === 'wires') {
const temp = this.getExistingWindowElement(grup, ele);
UndoUtils.pushChangeToUndo({ keyName: ele.keyName, element: temp.save(), event: ele.event });
temp.setColor(ele.element.color);
return;
}
// Only trigger if there is nothing in scope | is empty
if (grup.length <= 0) {
window['scope'][ele.keyName] = [];
if (ele.event === 'add' && operation === 'redo') {
UndoUtils.createElement(ele).then(done => {
if (ele.keyName === 'BreadBoard') {
// window['DragListeners'].splice(0, 1)
// window['DragStopListeners'].splice(0, 1)
}
});
UndoUtils.pushChangeToUndo({ keyName: ele.keyName, element: window.scope[ele.keyName][0].save(), event: ele.event });
}
}
// Trigger if window.scope is not empty
for (const e in grup) {
if (grup[e].id === ele.element.id) {
if (window.scope[ele.keyName][e].load) {
// Push to Undo/Redo stack
if (operation === 'undo') {
const obj = {
keyName: ele.keyName,
element: window.scope[ele.keyName][e].save(),
event: ele.event,
dragJson: ele.dragJson
};
UndoUtils.pushChangeToRedo(obj);
} else if (operation === 'redo') {
const obj = {
keyName: ele.keyName,
element: window.scope[ele.keyName][e].save(),
event: ele.event,
dragJson: ele.dragJson
};
UndoUtils.pushChangeToUndo(obj);
}
// handle Add events
if (ele.event === 'add' && operation === 'undo') {
UndoUtils.removeElement(ele);
return;
} else if (ele.event === 'add' && operation === 'redo') {
UndoUtils.createElement(ele);
UndoUtils.removeElement(ele);
} else if (ele.event === 'drag') {
// TODO: handle element Drag events
const existing = this.getExistingWindowElement(grup, ele);
if (operation === 'undo') {
if (ele.keyName === 'BreadBoard') {
existing.transformBoardPosition(-ele.dragJson.dx, -ele.dragJson.dy);
} else {
existing.transformPosition(-ele.dragJson.dx, -ele.dragJson.dy);
}
} else {
if (ele.keyName !== 'BreadBoard') {
existing.transformPosition(ele.dragJson.dx, ele.dragJson.dy);
Workspace.onDragEvent(existing);
Workspace.onDragStopEvent(existing);
} else {
existing.transformBoardPosition(ele.dragJson.dx, ele.dragJson.dy);
}
}
for (const ec in window.scope['wires']) {
if (window.scope['wires'].hasOwnProperty(ec)) {
window.scope['wires'][ec].update();
}
}
} else {
// TODO: Handle all other events which weren't handled before
// Create Element with dump of ele
UndoUtils.createElement(ele).then(createdEle => {
// Remove existing Element
UndoUtils.removeElement(ele).then(done => {
// Remove drag listeners if element is a breadboard
if (ele.keyName === 'BreadBoard') {
// window['DragListeners'].splice(0, 1)
// window['DragStopListeners'].splice(0, 1)
}
});
});
}
}
}
}
}
/**
* Used to get the existing element in window.scope
* @param grup window.scope['element_name']
* @param ele event snapshot
* @returns already present element in window.scope
*/
static getExistingWindowElement(grup, ele) {
for (const e in grup) {
if (grup[e].id === ele.element.id) {
if (window.scope[ele.keyName][e].load) {
return window.scope[ele.keyName][e];
}
}
}
}
/**
* create element again using its snapshot
* @param ele element snapshot
* @returns Promise
*/
static createElement(ele) {
return new Promise((resolve, reject) => {
window.queue = 0;
const comp = ele.element;
const key = ele.keyName;
if (key === 'wires') {
Workspace.LoadWires([ele.element], true, true);
// resolve
resolve(true);
}
// Get class from keyname using the map
const myClass = Utils.components[key].className;
// Create Component Object from class
const obj = new myClass(
window['canvas'],
comp.x,
comp.y
);
window.queue += 1;
// Add to scope
window['scope'][key].push(obj);
// Load data for each object
if (obj.load) {
obj.load(comp);
}
// Wait until all components are drawn
const interval = setInterval(() => {
if (window.queue === 0) {
clearInterval(interval);
// resolve when done
resolve(obj);
// Hide loading animation
} else {
// resolve anyways
// resolve(obj)
}
}, 100);
});
}
/**
* Remove and element from workspace using linear search
* @param key Key of elements to delete
* @param uid Id of element to delete
* @returns Promise
*/
static removeElement(ele) {
return new Promise((resolve, reject) => {
const key = ele.keyName;
const uid = ele.element.id;
// get existing element that is to be removed
const toRem = this.getExistingWindowElement(window.scope[key], ele);
// If Current Selected item is a Wire which is not Connected from both end
if (key === 'wires') {
if (isNull(ele.element.end)) {
// Remove and deselect
toRem.remove();
}
// make selected variables null
window.Selected = null;
window.isSelected = false;
}
// If BreadBoard remove draglistners too
if (key === 'BreadBoard') {
for (const i in window['DragListeners']) {
if (window['DragListeners'].hasOwnProperty(i)) {
const itrFn = window['DragListeners'][i];
if (itrFn.id === toRem.id) {
window['DragListeners'].splice(i, 1);
}
}
}
for (const i in window['DragStopListeners']) {
if (window['DragStopListeners'].hasOwnProperty(i)) {
const itrFn = window['DragStopListeners'][i];
if (itrFn.id === toRem.id) {
window['DragStopListeners'].splice(i, 1);
}
}
}
}
// get the component keyname
const items = window.scope[key];
// Use linear search find the element
for (let i = 0; i < items.length; ++i) {
if (items[i].id === uid) {
// remove from DOM
items[i].remove();
// Remove from scope
const k = items.splice(i, 1);
// Remove data from it recursively
Workspace.removeMeta(k[0]);
if (key !== 'wires') {
let index = 0;
while (index < window.scope.wires.length) {
const wire = window.scope.wires[index];
if (isNull(wire.start) && isNull(wire.end)) {
window.scope.wires.splice(index, 1);
continue;
}
++index;
}
}
break;
}
}
window.hideProperties();
resolve(true);
});
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Utils.ts
================================================
import { Buzzer } from './outputs/Buzzer';
import { Battery9v, CoinCell } from './Battery';
import { PushButton, SlideSwitch } from './inputs/Buttons';
import { ArduinoUno } from './outputs/Arduino';
import { LED, RGBLED } from './outputs/Led';
import { UltrasonicSensor } from './inputs/UltrasonicSensor';
import { PIRSensor } from './inputs/PIRSensor';
import { Motor, L298N, ServoMotor } from './outputs/Motors';
import { LCD16X2, SevenSegment } from './outputs/Display';
import { Label } from './Miscellaneous';
import { PhotoResistor } from './inputs/PhotoResistor';
import { TMP36 } from './inputs/TemperatureSensors';
import { Potentiometer } from './inputs/Potentiometer';
import { Relay } from './inputs/Relay';
import { MQ2 } from './inputs/GasSensor';
import { Resistor, BreadBoard } from './General';
import { L293D } from './drivers/L293D';
import { Thermistor } from './inputs/Thermistor';
/**
* Utils class
* Contains All components with their section
*/
export class Utils {
/**
* Stores an object required by the Side Component Panel
*/
static componentBox = {
input: [
['PushButton', 'UltrasonicSensor', 'PIRSensor'], // Row
['SlideSwitch', 'MQ2', 'TMP36'],
['PotentioMeter', 'PhotoResistor', 'Thermistor']
],
power: [
['Battery9v', 'CoinCell'] // Row
],
controllers: [
['ArduinoUno'] // Row
],
output: [
['Buzzer', 'LED', 'Motor'], // Row
['RGBLED', 'ServoMotor', 'SevenSegment'],
['LCD16X2']
],
drivers: [
['L298N', 'L293D']
],
misc: [
['Label', 'RelayModule']
],
general: [
['Resistor', 'BreadBoard']
]
};
/** Components with thier name, image, classname */
static components = {
BreadBoard: {
name: 'BreadBoard',
image: './assets/images/components/Breadboard.svg',
className: BreadBoard
},
Resistor: {
name: 'Resistor',
image: './assets/images/components/Resistor.png',
className: Resistor
},
RGBLED: {
name: 'RGB LED',
image: './assets/images/components/RGBLED.png',
className: RGBLED
},
SevenSegment: {
name: 'Seven Segment Display',
image: './assets/images/components/SevenSegment.png',
className: SevenSegment
},
MQ2: {
name: 'Gas Sensor MQ2',
image: './assets/images/components/GasSensor.svg',
className: MQ2
},
ServoMotor: {
name: 'Servo Motor',
image: './assets/images/components/Servo.png',
className: ServoMotor
},
RelayModule: {
name: 'Relay Module',
image: './assets/images/components/1ChannelRelay.svg',
className: Relay
},
PotentioMeter: {
name: 'Potentiometer',
image: './assets/images/components/Potentiometer.png',
className: Potentiometer
},
TMP36: {
name: 'Temperature Sensor TMP36',
image: './assets/images/components/TMP36.svg',
className: TMP36
},
PhotoResistor: {
name: 'Photo Resistor',
image: './assets/images/components/PhotoResistor.svg',
className: PhotoResistor
},
Label: {
name: 'Label',
image: './assets/images/components/Text.png',
className: Label
},
CoinCell: {
name: 'Coin Cell 3V',
image: './assets/images/components/CoinCell.svg',
className: CoinCell
},
SlideSwitch: {
name: 'Slide Switch',
image: './assets/images/components/SlideSwitch.png',
className: SlideSwitch
},
LCD16X2: {
name: 'LCD 16x2',
image: './assets/images/components/LCD16X2.png',
className: LCD16X2
},
L298N: {
name: 'Motor Driver L298N',
image: './assets/images/components/L298N.png',
className: L298N
},
Motor: {
name: 'Motor',
image: './assets/images/components/Motor.png',
className: Motor
},
PIRSensor: {
name: 'PIR Sensor',
image: './assets/images/components/PIRSensor.png',
className: PIRSensor
},
UltrasonicSensor: {
name: 'Ultrasonic Distance Sensor',
image: './assets/images/components/UltrasonicSensor.png',
className: UltrasonicSensor
},
LED: {
name: 'LED',
image: './assets/images/components/led.png',
className: LED
},
ArduinoUno: {
name: 'Arduino UNO',
image: './assets/images/components/ArduinoUno.png',
className: ArduinoUno
},
PushButton: {
name: 'Push Button',
image: './assets/images/components/PushButton.png',
className: PushButton
},
Battery9v: {
name: '9v Battery',
image: './assets/images/components/Battery9v.png',
className: Battery9v
},
Buzzer: {
name: 'Buzzer',
image: './assets/images/components/Buzzer.png',
className: Buzzer
},
L293D: {
name: 'L293D',
image: './assets/images/components/L293D.png',
className: L293D
},
Thermistor: {
name: 'Thermistor',
image: './assets/images/components/Thermistor.png',
className: Thermistor
}
};
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Wire.ts
================================================
import { Point } from './Point';
import _ from 'lodash';
import { UndoUtils } from './UndoUtils';
/**
* To prevent window from throwing error
*/
declare let window;
/**
* Class for Wire
*/
export class Wire {
/**
* Keyname require for mapping
*/
keyName = 'wires';
/**
* Stores array of position [x,y]
*/
points: number[][] = [];
/**
* Store the Raphael elements of the joints
*/
joints: any[] = [];
/**
* End circuit node of wire
*/
end: Point = null;
/**
* Body of the wire
*/
element: any;
/**
* Color of the wire
*/
color: any = '#000';
/**
* Store the glows on Hover
*/
glows: any[] = [];
/**
* Id of the Wire
*/
id: number;
/**
* Temporary point (which was used to draw perpendicular last time) of the wire while in drawing status
*/
lastTempPoint: [number, number];
/**
* Constructor of wire
* @param canvas Raphael Canvas / paper
* @param start Start circuit node of wire
*/
constructor(public canvas, public start: Point, public existingId = null) {
if (existingId) {
this.id = existingId;
} else {
this.id = this.getUniqueId(Date.now());
}
// insert the position of start node in array
this.points.push(start.position());
}
/**
* Recursive function to check if id is already present.
* If present then return a new unique id
* @param id current id
* @returns id number
*/
getUniqueId(id): number {
for (const e in window.scope) {
if (window.scope.hasOwnProperty(e)) {
for (const i in window.scope[e]) {
if (window.scope[e][i].id === id) {
return this.getUniqueId(Date.now() + Math.floor(Math.random() * 1000000));
}
}
}
}
return id;
}
/**
* Creates path element for the wire
* @param element canvas element
*/
createElement(element) {
if (this.element) {
this.removeGlows();
this.element.remove();
}
this.element = element;
this.element.attr({ 'stroke-linecap': 'round', 'stroke-linejoin': 'round', 'stroke-width': '4', stroke: this.color });
this.element.mouseover(() => {
// only glow if the wire has a start and an end
if (this.start && this.end) {
this.glows.push(
this.element.glow({
color: this.color
})
);
}
});
this.element.mouseout(() => {
this.removeGlows();
});
// set click listener
this.element.click(() => {
this.handleClick();
});
}
/**
* Adds a new coordinate (x, y) to the wire
* @param x x-coordinate of cursor
* @param y y-coordinate of cursor
* @param isPerpendicular is the point to be drawn perpendicular
*/
addPoint(x: number, y: number, isPerpendicular = false, index?) {
let newX = x;
let newY = y;
if (isPerpendicular) {
const n = this.points.length;
const [previousX, previousY] = this.points[n - 1];
[newX, newY] = this.getPerpendicularXY(x, y, previousX, previousY);
}
this.add(newX, newY, index);
// draw the line from the previous point to cursor's current position
if (isPerpendicular) {
this.drawPerpendicular(x, y);
} else {
this.draw(x, y);
}
}
/**
* Removes all the intermediate points from the wire path
*/
removeAllMiddlePoints() {
for (let i = this.points.length; i > 0; i--) {
this.removeJoint(i);
}
this.points = [this.points[0], this.points[this.points.length - 1]];
}
/**
* Makes the current temporary line perpendicular depending on current x and y
* @param toggle: true to draw perpendicular line upto current cursor's position
* false to undo the current perpendicular status
*/
togglePerpendicularLine(toggle: boolean) {
const currentPathAttrs = this.element.attrs.path;
const n = currentPathAttrs.length;
const [x, y] = currentPathAttrs[n - 1].slice(1);
let newX = null;
let newY = null;
if (toggle) {
// if toggle is true, draw perpendicular lines
const [previousX, previousY] = currentPathAttrs[n - 2].slice(1);
[newX, newY] = this.getPerpendicularXY(x, y, previousX, previousY);
} else {
[newX, newY] = this.lastTempPoint;
}
this.drawWire(newX, newY);
}
/**
* draws perpendicular lines based on current x, y coordinates
* @param x x-coordinate of cursor
* @param y y-coordinate of cursor
*/
drawPerpendicular(x: number, y: number) {
this.lastTempPoint = [x, y];
const n = this.points.length;
const [previousX, previousY] = this.points[n - 1];
const [newX, newY] = this.getPerpendicularXY(x, y, previousX, previousY);
this.drawWire(newX, newY);
}
/**
* Draws wire to (x, y)
* @param x x-coordinate
* @param y y-coordiante
*/
draw(x: number, y: number) {
this.lastTempPoint = [x, y];
this.drawWire(x, y);
}
/**
* Returns x, y for perpendicular lines
* @param x current x-coordinate
* @param y current y-coordinate
* @param previousX previous x-coordinate
* @param previousY previous y-coordinate
*/
private getPerpendicularXY(x: number, y: number, previousX: number, previousY: number) {
const delX = Math.abs(x - previousX);
const delY = Math.abs(y - previousY);
return (delX > delY) ? [x, previousY] : [previousX, y];
}
/**
* updates the path of the wire
* @param newPath new path of the wire
*/
private updateWirePath(newPath: string) {
if (this.element) {
// only update the path if the new path is different
if (this.element.attrs.path.toString() !== newPath) {
this.element.attr('path', newPath);
}
} else {
this.createElement(this.canvas.path(newPath));
}
}
/**
* Draws wire on the canvas
* @param x x position of point to be added
* @param y y position of point to be added
*/
private drawWire(x?: number, y?: number) {
let path = `M${this.points[0][0]},${this.points[0][1]}`;
// Draw lines to other points
for (let i = 1; i < this.points.length; ++i) {
path += `L${this.points[i][0]},${this.points[i][1]}`;
}
if (x && y) {
path += `L${x},${y}`;
}
// Update path
this.updateWirePath(path);
}
/**
* Add a point to wire
* @param x x position
* @param y y position
*/
private add(x: number, y: number, index?) {
if (index) {
// insert the point [x, y] at the index and create joint
this.points.splice(index, 0, [x, y]);
this.createJoint(index, true);
} else {
// else, insert at the end
this.points.push([x, y]);
}
}
/**
* Handle click on Wire
*/
handleClick() {
// If Current Selected item is wire then deselect it
if (window['Selected'] && (window['Selected'] instanceof Wire)) {
window['Selected'].deselect();
}
// Show all joints
for (const joint of this.joints) {
joint.show();
}
// Select current instance
window['isSelected'] = true;
window['Selected'] = this;
// Show properties
window.showProperty(() => {
return this.properties();
});
}
/**
* Set Color of the wire
* @param color color of the wire
*/
setColor(color: string) {
this.color = color;
this.element.attr({ stroke: color }); // set attribute
// Update the color of joints
for (const joint of this.joints) {
joint.attr({ fill: color, stroke: color });
}
}
/**
* Return Properties of wire
*/
properties() {
// Create div and insert options form color
const body = document.createElement('div');
body.innerHTML = '<label>Color:</label><br>';
const select = document.createElement('select');
select.innerHTML = `<option style="color:#000;">Black</option>
<option style="color:#ff0000;">Red</option>
<option style="color:#e6a800;">Yellow</option>
<option style="color:#2593fa;">Blue</option>
<option style="color:#31c404;">Green</option>
<option style="color:#FF5733;">Orange</option>
<option style="color:#30D5C8;">Turquoise</option>
<option style="color:#800080;">Purple</option>
<option style="color:#FF00FF;">Pink</option>
<option style="color:#964B00;">Brown</option>
<option style="color:#696969;">Grey</option>
`;
const colors = ['#000',
'#ff0000',
'#e6a800',
'#2593fa',
'#31c404',
'#FF5733',
'#30D5C8',
'#800080',
'#FF00FF',
'#964B00',
'#696969'
];
// set the current color
for (let i = 0; i < colors.length; ++i) {
if (colors[i] === this.color) {
select.selectedIndex = i;
}
}
// set on change listener
select.onchange = () => {
// Push dump to Undo stack & Reset
UndoUtils.pushChangeToUndoAndReset({ keyName: this.keyName, element: this.save(), event: 'wire_color' });
this.setColor(colors[select.selectedIndex]);
};
body.append(select);
return {
title: 'Wire',
keyName: this.keyName,
id: this.id,
body
};
}
/**
* Function to connect wire with the node
* @param t End point / END circuit node
* @param removeLast remove previously inserted item
*/
connect(t: Point, removeLast: boolean = false, hideJoint: boolean = false, pushUndo = false, undoEvtType = 'add') {
// if remove last then pop from array
if (removeLast && this.points.length > 1) {
this.points.pop();
}
// change the end letiable
this.end = t;
// insert the end position
this.points.push(t.position());
if (this.points.length > 2) {
// For each point in the wire except first and last
for (let i = 1; i < this.points.length - 1; ++i) {
// Create a Joint
this.createJoint(i, hideJoint);
}
}
// Update Wire
this.update();
// Push dump to Undo stack, only if pushUndo is false
if (!pushUndo) {
UndoUtils.pushChangeToUndoAndReset({ keyName: this.keyName, element: this.save(), event: undoEvtType });
}
if (undoEvtType === 'breadDrag') {
UndoUtils.pushChangeToUndo({ keyName: this.keyName, element: this.save(), event: undoEvtType });
}
}
/**
* Removes joint present at the point at index `pointIndex`
* @param pointIndex: index of the point whose joint needs to be removed
*/
removeJoint(pointIndex: number) {
const jointIndex = pointIndex - 1;
const joint = this.joints[jointIndex];
if (joint) {
joint.remove();
this.joints.splice(jointIndex, 1);
}
}
/**
* Creates joint at the index `pointIndex`
* @param pointIndex index of the point
* @param hideJoint hide the joint?
*/
createJoint(pointIndex: number, hideJoint: boolean = false) {
const joint = this.canvas.circle(this.points[pointIndex][0], this.points[pointIndex][1], 6);
joint.attr({ fill: this.color, stroke: this.color }); // Give the joint a Color
// Variables used while dragging joints
let tmpx;
let tmpy;
// set drag listener
joint.drag((dx, dy) => {
// Update joints position
joint.attr({ cx: tmpx + dx, cy: tmpy + dy });
// Update repective Point
this.points[pointIndex] = [tmpx + dx, tmpy + dy];
// Update the wire
this.update();
}, () => {
// Get the Joints center
const jointAttr = joint.attr();
tmpx = jointAttr.cx;
tmpy = jointAttr.cy;
}, () => {
});
this.joints.push(joint);
// Hide joint if required
if (hideJoint) {
joint.hide();
}
}
/**
* Returns true if both end of wire is connected
*/
isConnected() {
return (this.start !== null && this.end !== null);
}
/**
* Update the wire position if the parent element is changed
*/
update() {
// check if both start and end node are present
if (this.end && this.start) {
// Update the start and ending position
this.points[0] = this.start.position();
this.points[this.points.length - 1] = this.end.position();
this.drawWire();
return true;
}
return false;
}
/**
* Callback called after the wire is deselect
*/
deselect() {
for (const joint of this.joints) {
joint.hide();
}
}
/**
* Return save object for the wire
*/
save() {
return {
// object contains points,color,start point(id,keyname),end point(id,keybame)
id: this.id,
points: this.points,
color: this.color,
start: {
id: this.start.parent.id,
keyName: this.start.parent.keyName,
pid: this.start.id,
isSoldered: this.start.isSoldered()
},
end: {
id: this.end.parent.id,
keyName: this.end.parent.keyName,
pid: this.end.id,
isSoldered: this.end.isSoldered()
}
};
}
/**
* Load data from saved object
* @param data Saved object
*/
load(data) {
this.color = data.color;
this.points = data.points;
if (data.start.isSoldered) {
this.start.solderWire();
}
if (data.end.isSoldered) {
this.end.solderWire();
}
}
/**
* Remove Glow of Wire
*/
private removeGlows() {
if (this.glows) {
while (this.glows.length !== 0) {
this.glows.pop().remove();
}
}
}
/**
* Remove wire from canvas
*/
remove() {
// Remove Joint
for (const joint of this.joints) {
joint.remove();
}
// Remove Glow
this.removeGlows();
// Clear Joints
this.joints = null;
// Clear Points
this.points = null;
// Remove element from dom
this.element.remove();
// Clear connection from start node
if (this.start) {
this.start.disconnect();
}
// Clear connection from end node
if (this.end) {
this.end.disconnect();
}
this.start = null;
this.end = null;
this.element = null;
}
/**
* Removes the wire from window.scope and canvas
*/
delete() {
_.remove(window.scope.wires, wire => wire === this);
this.remove();
}
}
================================================
FILE: ArduinoFrontend/src/app/Libs/Workspace.ts
================================================
import { Utils } from './Utils';
import { Wire } from './Wire';
import { ArduinoUno } from './outputs/Arduino';
import { ApiService } from '../api.service';
import { Download, ImageType } from './Download';
import { isNull, isUndefined } from 'util';
import { SaveOffline } from './SaveOffiline';
import { Point } from './Point';
import { UndoUtils } from './UndoUtils';
import { EventEmitter } from '@angular/core';
/**
* Declare window so that custom created function don't throw error
*/
declare var window;
// Enum function for Colour values to print in console
export enum ConsoleType { INFO, WARN, ERROR, OUTPUT }
/**
* This class contains all Workspace related functions.
*/
export class Workspace {
/**
* The Worspace Translation x value
*/
static translateX = 0.0;
/**
* The Worspace Translation y value
*/
static translateY = 0.0;
/**
* Stores scaling factor value for zoom in/out
*/
static scale = 1.0;
/**
* zoomin/out increments by 0.01
*/
static readonly zooomIncrement = 0.01;
/**
* Translation Rate while holding and moving canvas
*/
static readonly translateRate = 0.25;
/**
* tores initial position values for x and y
*/
static moveCanvas = {
x: 0,
y: 0,
start: false
};
/**
* Stores value of copied component
*/
static copiedItem: any;
/**
* If simulation is on progress or not
*/
static simulating = false;
/**
* If circuit is loaded or not
*/
static circuitLoaded = false;
static circuitLoadStatus: EventEmitter<boolean> = new EventEmitter<boolean>();
static simulationStopped: EventEmitter<boolean> = new EventEmitter<boolean>();
static simulationStarted: EventEmitter<boolean> = new EventEmitter<boolean>();
/** function to zoom in workspace */
static zoomIn() {
Workspace.scale = Math.min(10, Workspace.scale + Workspace.zooomIncrement);
Workspace.scale = Math.min(10, Workspace.scale + Workspace.zooomIncrement);
const ele = (window['canvas'].canvas as HTMLElement);
ele.setAttribute('transform', `scale(
${Workspace.scale},
${Workspace.scale})
translate(${Workspace.translateX},
${Workspace.translateY})`);
Workspace.updateWires();
}
/** function to zoom out workspace */
static zoomOut() {
Workspace.scale = Math.max(0.1, Workspace.scale - Workspace.zooomIncrement);
Workspace.scale = Math.max(0.1, Workspace.scale - Workspace.zooomIncrement);
const ele = (window['canvas'].canvas as HTMLElement);
ele.setAttribute('transform', `scale(
${Workspace.scale},
${Workspace.scale})
translate(${Workspace.translateX},
${Workspace.translateY})`);
Workspace.updateWires();
}
/** Function deals with min and max value of zoom, hold and move */
static minMax(min: number, max: number, value: number) {
if (value < min) {
return min;
}
if (value > max) {
return max;
}
return value;
}
/**
* Initialize Global Variables
* @param canvas Raphael Paper (Canvas)
*/
static initalizeGlobalVariables(canvas: any) {
Workspace.simulating = false;
Workspace.copiedItem = null;
Workspace.moveCanvas = {
x: 0, y: 0, start: false
};
Workspace.scale = 1.0;
Workspace.translateY = 0.0;
Workspace.translateX = 0.0;
window['canvas'] = canvas;
window['holder'] = document.getElementById('holder').getBoundingClientRect();
window['holder_svg'] = document.querySelector('#holder > svg');
window['ArduinoUno_name'] = {};
window.scope = null;
// Stores all the Circuit Information
window['scope'] = {
wires: []
};
for (const key in Utils.components) {
if (window['scope'][key] === null || window['scope'][key] === undefined) {
window['scope'][key] = [];
}
}
// Default programming language is Arduino
window['progLang'] = 0;
// True when simulation takes place
window['isSimulating'] = false;
// Stores the reference to the selected circuit component
window['Selected'] = null;
// True when a component is selected
window['isSelected'] = false;
// Intialize a variable for Property Box
window['property_box'] = {
x: 0,
y: 0,
element: document.getElementById('propertybox'),
title: document.querySelector('#propertybox .title'),
body: document.querySelector('#propertybox .body'),
mousedown: false
};
window['DragListeners'] = [];
window['DragStopListeners'] = [];
window['onDragEvent'] = Workspace.onDragEvent;
window['onDragStopEvent'] = Workspace.onDragStopEvent;
}
/**
* Handler for drag stop event
*/
static onDragStopEvent(element) {
for (const fn of window.DragStopListeners) {
fn.fn(element);
}
}
/**
* Handler for drag event
*/
static onDragEvent(element) {
for (const fn of window.DragListeners) {
fn.fn(element);
}
}
/**
* Subscribes to drag event of element in the workspace
* @param fn listener function
*/
static subsribeToDrag(fn) {
window['DragListeners'].push(fn);
}
/**
* Subscribes to drag stop event of element in the workspace
* @param fn listener function
*/
static subsribeToDragStop(fn) {
window['DragStopListeners'].push(fn);
}
/**
* Initialize Property Box
* @param toggle Callback For Property Box
*/
static initProperty(toggle: (state: boolean) => void) {
// Global Function to Show Properties of Circuit Component
window['showProperty'] = (callback: any) => {
const data = callback();
window['property_box'].element.setAttribute('key', data.keyName);
window['property_box'].title.innerText = data.title;
window['property_box'].body.innerHTML = '';
window['property_box'].body.appendChild(data.body);
toggle(false);
};
// Global Function to Hide Properties of Circuit Component
window['hideProperties'] = () => {
if (window.Selected && window.Selected.deselect) {
window.Selected.deselect();
}
window['Selected'] = null;
window['isSelected'] = false;
window['property_box'].body.innerHTML = '';
window['property_box'].title.innerText = 'Project Info';
toggle(true);
};
}
/**
* Initialize Global Functions
*/
static initializeGlobalFunctions() {
// Global Function to show Popup Bubble
window['showBubble'] = (label: string, x: number, y: number) => {
// id label is empty don't show anything
if (label === '') { return; }
const ele = document.getElementById('bubblebox');
ele.innerText = label;
ele.style.display = 'block';
ele.style.top = `${y + 25}px`;
ele.style.left = `${(x - ele.clientWidth / 2)}px`;
};
// Global Function to hide Popub Bubble
window['hideBubble'] = () => {
const ele = document.getElementById('bubblebox');
ele.style.display = 'none';
};
// Global Function to show Toast Message
window['showToast'] = (message: string) => {
const ele = document.getElementById('ToastMessage');
ele.style.display = 'block';
ele.innerText = message;
ele.style.padding = '15px 25px 15px 25px';
setTimeout(() => {
ele.style.display = 'none';
}, 10000);
};
// Global Function to print output in Console
window['printConsole'] = (textmsg: string, type: ConsoleType) => {
const msg = document.getElementById('msg');
const container = document.createElement('label');
container.innerText = textmsg;
// checks which type of output needs to be printed
// depending on which the colour is assigned
if (type === ConsoleType.ERROR) {
container.style.color = 'red';
} else if (type === ConsoleType.WARN) {
container.style.color = 'yellow';
} else if (type === ConsoleType.INFO) {
container.style.color = 'white';
} else if (type === ConsoleType.OUTPUT) {
container.style.color = '#03fc6b';
}
msg.appendChild(container);
};
}
/**
* Before Unload Event Handler
* @param event Before Unload Event
*/
static BeforeUnload(event) {
event.preventDefault();
event.returnValue = 'did you save the stuff?';
}
/**
* Event Listener for mousemove on html body
* @param event Mouse Event
*/
static bodyMouseMove(event: MouseEvent) {
if (Workspace.moveCanvas.start) {
const dx = (event.clientX - Workspace.moveCanvas.x) * Workspace.translateRate;
const dy = (event.clientY - Workspace.moveCanvas.y) * Workspace.translateRate;
const ele = (window['canvas'].canvas as HTMLElement);
ele.setAttribute('transform', `scale(
${Workspace.scale},
${Workspace.scale})
translate(${Workspace.translateX + dx},
${Workspace.translateY + dy})`);
}
if (window['property_box'].start) {
const el = window['property_box'].element;
el.style.left = `${Workspace.minMax(0, window.innerWidth - 220, event.clientX - window['property_box'].x)}px`;
el.style.top = `${Workspace.minMax(0, window.innerHeight - 50, event.clientY - window['property_box'].y)}px`;
}
}
/**
* Event Listener for mouseup on html body
* @param event Mouse Event
*/
static bodyMouseUp(event: MouseEvent) {
if (Workspace.moveCanvas.start) {
const dx = (event.clientX - Workspace.moveCanvas.x) * Workspace.translateRate;
const dy = (event.clientY - Workspace.moveCanvas.y) * Workspace.translateRate;
Workspace.translateX += dx;
Workspace.translateY += dy;
Workspace.moveCanvas.start = false;
document.getElementById('holder').classList.remove('grabbing');
}
window['property_box'].start = false;
}
/**
* Event Listener for mousedown on html body
* @param event MouseDown
*/
static mouseDown(event: MouseEvent) {
Workspace.hideContextMenu();
if (window['isSelected'] && (window['Selected'] instanceof Wire)) {
// if selected item is wire and it is not connected then add the point
if (window.Selected.end == null) {
const pt = Workspace.svgPoint(event.clientX, event.clientY);
window.Selected.addPoint(pt.x, pt.y, event.shiftKey);
return;
}
}
if ((event.target as HTMLElement).tagName === 'svg') {
Workspace.moveCanvas = {
x: event.clientX,
y: event.clientY,
start: true
};
document.getElementById('holder').classList.add('grabbing');
}
}
/**
* Event Handler On clicking on workspace
* @param event Mouse Click event
*/
static click(event: MouseEvent) {
}
/**
* Returns true if current selected item is wire
*/
private static isWireSelected(): boolean {
return window['isSelected'] && (window['Selected'] instanceof Wire);
}
/**
* Event Listener for mouseMove on html body
* @param event MouseMove
*/
static mouseMove(event: MouseEvent) {
event.preventDefault();
// if wire is selected then draw temporary lines
if (Workspace.isWireSelected()) {
const pt = Workspace.svgPoint(event.clientX - 2, event.clientY - 2);
if (event.shiftKey) {
window.Selected.drawPerpendicular(pt.x, pt.y);
} else {
window.Selected.draw(pt.x, pt.y);
}
} else {
// deselect item
if (window.Selected && window.Selected.deselect) {
window.Selected.deselect();
}
}
Workspace.updateWires();
}
/*
TODO: Remove if not Required
static mouseEnter(event: MouseEvent) {
}
static mouseLeave(event: MouseEvent) {
}
static mouseOver(event: MouseEvent) {
}
static mouseOut(event: MouseEvent) {
}*/
/**
* Event handler for mouse up on workspace.
* @param event Mouse Event
*/
static mouseUp(event: MouseEvent) {
}
/**
* Event Listener to display Context menu (for performing copy, paste, delete operation)
* @param event Mouse Event
*/
static contextMenu(event: MouseEvent) {
event.preventDefault();
const element = document.getElementById('contextMenu');
element.style.display = 'block';
element.style.left = `${event.clientX}px`;
element.style.top = `${event.clientY}px`;
return true;
}
/** Function called to hide ContextMenu */
static hideContextMenu() {
const element = document.getElementById('contextMenu');
element.style.display = 'none';
}
/**
* Event handler for copy on workspace.
* @param event Clipboard Event
*/
static copy(event: ClipboardEvent) {
}
/**
* Event handler for CUT on workspace.
* @param event Clipboard Event
*/
static cut(event: ClipboardEvent) {
}
/**
* function deselects the item on Canvas
* @param event DoubleClick
*/
static doubleClick(event: MouseEvent) {
if (window['isSelected'] && (window['Selected'] instanceof Wire) && !window.Selected.isConnected()) {
return;
}
if ((event.target as HTMLElement).tagName !== 'svg') {
return;
}
// deselect item
window.hideProperties();
}
/**
* function drags element to valid drop target
* @param event DragEvent
*/
static dragLeave(event: DragEvent) {
event.preventDefault();
event.stopPropagation();
}
/**
* function drags element over a valid drop target
* @param event DragEvent
*/
static dragOver(event: DragEvent) {
event.preventDefault();
event.stopPropagation();
}
/**
* function drop element at drop target
* @param event DragEvent
*/
static drop(event: DragEvent) {
event.preventDefault();
event.stopPropagation();
const className = event.dataTransfer.getData('text'); // get the event data
const pt = Workspace.svgPoint(event.clientX, event.clientY);
Workspace.addComponent(className, pt.x, pt.y, 0, 0);
}
/**
* Key down event on workspace.
* @param event Keyboard Event
*/
static keyDown(event: KeyboardEvent) {
if (event.shiftKey) {
if (Workspace.isWireSelected()) {
window.Selected.togglePerpendicularLine(true);
}
}
}
/**
* Key Press event on workspace.
* @param event Keyboard Event
*/
static keyPress(event: KeyboardEvent) {
}
/**
* event Listener to perform Keyboard Shortcut operations
* @param event keyup Event
*/
static keyUp(event: KeyboardEvent) {
if (window.isCodeEditorOpened) {
return;
}
if ((event.key === 'Delete' || event.key === 'Backspace')
&& !(event['target']['localName'] === 'input' || event['target']['localName'] === 'textarea')) {
// Backspace or Delete
Workspace.DeleteComponent();
}
if (event.key === 'Escape') {
// terminate current wire connection if in progress
if (window.Selected instanceof Wire && !window.Selected.isConnected()) {
Workspace.DeleteComponent();
}
}
if (event.ctrlKey && (event.key === 'c' || event.key === 'C')) {
// Copy
Workspace.copyComponent();
}
if (event.ctrlKey && (event.key === 'v' || event.key === 'V')) {
// paste
Workspace.pasteComponent();
}
if (event.ctrlKey && (event.key === '+')) {
// CTRL + +
Workspace.zoomIn();
}
if (event.ctrlKey && (event.key === '-')) {
// CTRL + -
Workspace.zoomIn();
}
if (event.ctrlKey && (event.key === 'k' || event.key === 'K')) {
// TODO: Open Code Editor
}
if (event.key === 'F5') {
// TODO: Start Simulation
}
if (event.key === 'Shift') {
if (Workspace.isWireSelected()) {
window.Selected.togglePerpendicularLine(false);
}
}
if (event.ctrlKey && (event.key === 'z' || event.key === 'Z') && UndoUtils.enableButtonsBool) {
// CTRL + z
// Call Undo Function
UndoUtils.workspaceUndo();
}
}
/**
* Event Listener for zoom in/zoom out on workspace
* @param event MouseWheel Event
*/
static mouseWheel(event: WheelEvent) {
event.preventDefault();
if (event.deltaY < 0) {
Workspace.zoomIn();
} else {
Workspace.zoomOut();
}
}
/**
* Event handler for paste.
* @param event Clipboard Event
*/
static paste(event: ClipboardEvent) {
}
/**
* Function adds components by providing their keynames
* @param classString string
* @param x number
* @param y number
* @param offsetX number
* @param offsetY number
*/
static addComponent(classString: string, x: number, y: number, offsetX: number, offsetY: number) {
const myClass = Utils.components[classString].className;
const obj = new myClass(
window['canvas'],
x - offsetX,
y - offsetY
);
window['scope'][classString].push(obj);
// Push dump to Undo stack & Reset
UndoUtils.pushChangeToUndoAndReset({ keyName: obj.keyName, event: 'add', element: obj.save() });
}
/** Function updates the position of wires */
static updateWires() {
for (const z of window['scope']['wires']) {
z.update();
}
}
/**
* Function returns point translated according to the svg
* @param x number
* @param y number
*/
static svgPoint(x, y) {
const pt = window['holder_svg'].createSVGPoint();
pt.x = x;
pt.y = y;
return pt.matrixTransform(window.canvas.canvas.getScreenCTM().inverse());
}
/**
* This function is required by deleteComponent() to recursively remove item
* @param obj any
*/
static removeMeta(obj) {
for (const prop in obj) {
if (typeof obj[prop] === 'object') {
obj[prop] = null;
} else {
delete obj[prop];
}
}
}
/**
* Function saves the circuit Offline
* @param name string
* @param description string
* @param callback any
* @param id number
*/
static SaveCircuit(name: string = '', description: string = '', callback: any = null, id: number = null) {
let toUpdate = false;
// Check if id is already present then enable Update
if (isNull(id)) {
id = Date.now();
} else {
toUpdate = true;
}
// Default Save object
const saveObj = {
id,
canvas: {
x: Workspace.translateX,
y: Workspace.translateY,
scale: Workspace.scale
},
project: {
name,
description,
created_at: Date.now(),
updated_at: Date.now()
}
};
// For each item in the scope
for (const key in window.scope) {
// if atleast one component is present
if (window.scope[key] && window.scope[key].length > 0) {
saveObj[key] = [];
// Add the component to the save object
for (const item of window.scope[key]) {
if (item.save) {
saveObj[key].push(item.save());
}
}
}
}
// Save the Thumbnail for the circuit
Download.ExportImage(ImageType.PNG).then(v => {
saveObj.project['image'] = v; // Add the base64 image
// console.log(saveObj);
// Save or Update Circuit Ofline
if (toUpdate) {
SaveOffline.Update(saveObj, callback);
} else {
SaveOffline.Save(saveObj, callback);
}
});
}
/**
* Function called to Load data from saved object
* @param data Saved Object
*/
static Load(data) {
// Clear Project
this.ClearWorkspace();
// Show loading animation
window.showLoading();
// Load The translation and scaling values
Workspace.translateX = data.canvas.x;
Workspace.translateY = data.canvas.y;
Workspace.scale = data.canvas.scale;
// Update the translation and scaling
window.queue = 0;
const ele = (window['canvas'].canvas as HTMLElement);
ele.setAttribute('transform', `scale(
${Workspace.scale},
${Workspace.scale})
translate(${Workspace.translateX},
${Workspace.translateY})`);
// For each component key in the data
for (const key in data) {
// Check if key is valid
if (!(key in data)) {
continue;
}
// if key is not related to circuit then continue
if (key !== 'id' && key !== 'canvas' && key !== 'project' && key !== 'wires') {
// Initialize an array
window['scope'][key] = [];
// Get the data for respective component
const components = data[key];
for (const comp of components) {
// Get class from keyname using the map
const myClass = Utils.components[key].className;
// Create Component Object from class
const obj = new myClass(
window['canvas'],
comp.x,
comp.y
);
window.queue += 1;
// Add to scope
window['scope'][key].push(obj);
// Load data for each object
if (obj.load) {
obj.load(comp);
}
}
}
}
// Wait until all components are drawn
const interval = setInterval(() => {
if (window.queue === 0) {
clearInterval(interval);
// start drawing wires with Id retain
Workspace.LoadWires(data.wires, true);
// Hide loading animation
window.hideLoading();
}
}, 100);
}
/** This function recreates the wire object */
static LoadWires(wires: any[], retainId = false, pushUndo = false) {
if (isNull(wires) || isUndefined(wires)) {
return;
}
for (const w of wires) {
const points = w.points;
let start: Point = null;
let end: Point = null;
// Use Linear search to find the start circuit node
for (const st of window.scope[w.start.keyName]) {
// console.log(st.id,w.start.id);
if (st.id === w.start.id) {
start = st.getNode(points[0][0], points[0][1], w.start.pid);
break;
}
}
// Use Linear Search to find the end circuit node
for (const en of window.scope[w.end.keyName]) {
if (en.id === w.end.id) {
const p = points[points.length - 1];
end = en.getNode(p[0], p[1], w.end.pid);
break;
}
}
// console.log([start, end]);
// if both nodes are present then connect those nodes
if (start && end) {
let tmp: any;
if (retainId) {
tmp = new Wire(window.canvas, start, w.id);
} else {
tmp = new Wire(window.canvas, start);
}
tmp.load(w);
start.connectedTo = tmp;
end.connectedTo = tmp;
tmp.connect(end, true, true, pushUndo);
window['scope']['wires'].push(tmp);
tmp.update();
if (start.connectCallback) {
start.connectCallback(start);
}
if (end.connectCallback) {
end.connectCallback(end);
}
} else {
console.log('Not able to recreate Wires');
// alert('something went wrong');
}
}
Workspace.circuitLoaded = true;
Workspace.circuitLoadStatus.emit(true);
}
/** Function to delete component fro Workspace */
static DeleteComponent(undoReset = true) {
// Save Dump of current Workspace
// Check if component is selected
if (window['Selected']) {
// is selected component is an arduini uno then show confirm message
if (window['Selected'] instanceof ArduinoUno) {
const ans = confirm('The Respective code will also be lost!');
if (!ans) {
return;
}
}
// get the component id
const uid = window.Selected.id;
const key = window.Selected.keyName;
if (!(window.Selected instanceof Wire && !window.Selected.isConnected())) {
const obj = { keyName: window.Selected.keyName, element: window.Selected.save(), event: 'delete' };
// Push dump to Undo stack & Reset if undoReset is true, else just push
if (undoReset) { UndoUtils.pushChangeToUndoAndReset(obj); } else { UndoUtils.pushChangeToUndo(obj); }
}
// If Current Selected item is a Wire which is not Connected from both end
if (key === 'wires') {
if (isNull(window.Selected.end)) {
// Remove and deselect
window.Selected.remove();
window.Selected = null;
window.isSelected = false;
}
}
// If BreadBoard remove draglistners too
if (key === 'BreadBoard') {
// Search in DragListeners & splice
for (const i in window['DragListeners']) {
if (window.DragListeners.hasOwnProperty(i)) {
const itrFn = window['DragListeners'][i];
if (itrFn.id === window['Selected'].id) {
window['DragListeners'].splice(i, 1);
}
}
}
// Search in DragStopListeners & splice
for (const i in window['DragStopListeners']) {
if (window.DragStopListeners.hasOwnProperty(i)) {
const itrFn = window['DragStopListeners'][i];
if (itrFn.id === window['Selected'].id) {
window['DragStopListeners'].splice(i, 1);
}
}
}
}
// get the component keyname
const items = window.scope[key];
// Use linear search find the element
for (let i = 0; i < items.length; ++i) {
if (items[i].id === uid) {
// remove from DOM
window.Selected.remove();
window.Selected = null;
window.isSelected = false;
// Remove from scope
const k = items.splice(i, 1);
// Remove data from it recursively
Workspace.removeMeta(k[0]);
if (key !== 'wires') {
let index = 0;
while (index < window.scope.wires.length) {
const wire = window.scope.wires[index];
if (isNull(wire.start) && isNull(wire.end)) {
window.scope.wires.splice(index, 1);
continue;
}
++index;
}
}
break;
}
}
// Hide Property box
window.hideProperties();
} else {
window['showToast']('No Element Selected');
}
}
/** Function to copy component fro Workspace */
static copyComponent() {
if (window['Selected']) {
if (window['Selected'] instanceof Wire) {
window['showToast']('You Can\'t Copy Wire');
return;
}
Workspace.copiedItem = window.Selected;
} else {
Workspace.copiedItem = null;
}
}
/** Function to paste component fro Workspace */
static pasteComponent() {
// Save Dump of current Workspace
// console.log(Workspace.copiedItem);
if (Workspace.copiedItem) {
const ele = document.getElementById('contextMenu');
let x = +ele.style.left.replace('px', '');
let y = +ele.style.top.replace('px', '');
// console.log([x, y]);
const key = Workspace.copiedItem.keyName;
if (x === 0 && y === 0) {
x = Workspace.copiedItem.x + 100;
y = Workspace.copiedItem.y + 100;
}
const pt = Workspace.svgPoint(x, y);
// Workspace.addComponent(Workspace.copiedItem, pt.x, pt.y, 0, 0);
const myClass = Utils.components[key].className;
const obj = new myClass(window['canvas'], pt.x, pt.y);
window['scope'][key].push(obj);
// obj.copy(Workspace.copiedItem)
}
}
/** Function called to clear output in console */
static ClearConsole() {
const clear = document.getElementById('msg');
let inside: any = clear.firstChild;
while (inside != null) {
if (inside.tagName === 'PRE') {
inside.innerText = '';
inside = inside.nextSibling;
continue;
}
const tmp = inside;
inside = inside.nextSibling;
clear.removeChild(tmp);
}
}
/** Function called to compile code in console */
static CompileCode(api: ApiService, callback: () => void) {
const toSend = {}; // Json Which needs to be Send for compilation
const nameMap = {}; // Create a Mapping id => Arduino
// Check if there is any Programmable Device
const isProgrammable = window.scope.ArduinoUno.length > 0;
if (!isProgrammable) {
window.printConsole('No Programmable Device Found', ConsoleType.INFO);
Workspace.startArduino();
callback();
return;
}
for (const arduino of window.scope.ArduinoUno) {
toSend[arduino.id] = arduino.code;
nameMap[arduino.id] = arduino;
}
window.printConsole('Compiling Source Code', ConsoleType.INFO);
if (window.progLang === 0) {
api.compileCodeINO(toSend).subscribe(v => {
const taskid = v.uuid; // Get Compilation id
const temp = setInterval(() => {
api.getHex(taskid).subscribe(hex => {
if (hex.state === 'SUCCESS' && !hex.details.error) {
clearInterval(temp);
let SUCCESS = true;
for (const k in hex.details) {
if (hex.details[k]) {
const d = hex.details[k];
window.printConsole('For Arduino ' + nameMap[k].name, ConsoleType.INFO);
if (d.output && d.data) {
window.printConsole(d.output, ConsoleType.OUTPUT);
nameMap[k].hex = d.data;
}
if (d.error) {
SUCCESS = false;
window.printConsole(d.error, ConsoleType.ERROR);
}
}
}
if (SUCCESS) {
Workspace.startArduino();
}
callback();
} else if (hex.state === 'FAILED' || hex.details.error) {
clearInterval(temp);
window.printConsole('Failed To Compile: Server Error', ConsoleType.ERROR);
callback();
}
});
}, 2000);
}, error => {
window.printConsole('Error While Compiling the Source Code.', ConsoleType.ERROR);
console.log(error);
callback();
});
} else if (window.progLang === 1) {
api.compileCodeInlineAssembly(toSend).subscribe(v => {
const taskid = v.uuid; // Get Compilation id
const temp = setInterval(() => {
api.getHex(taskid).subscribe(hex => {
if (hex.state === 'SUCCESS' && !hex.details.error) {
clearInterval(temp);
let SUCCESS = true;
for (const k in hex.details) {
if (hex.details[k]) {
const d = hex.details[k];
window.printConsole('For Arduino ' + nameMap[k].name, ConsoleType.INFO);
if (d.output && d.data) {
window.printConsole(d.output, ConsoleType.OUTPUT);
nameMap[k].hex = d.data;
}
if (d.error) {
SUCCESS = false;
window.printConsole(d.error, ConsoleType.ERROR);
}
}
}
if (SUCCESS) {
Workspace.startArduino();
}
callback();
} else if (hex.state === 'FAILED' || hex.details.error) {
clearInterval(temp);
window.printConsole('Failed To Compile: Server Error', ConsoleType.ERROR);
callback();
}
});
}, 2000);
}, error => {
window.printConsole('Error While Compiling the Source Code.', ConsoleType.ERROR);
console.log(error);
callback();
});
}
}
/**
* Start Simulation
*/
static startArduino() {
Workspace.simulationStarted.emit(true);
// Assign id
let gid = 0;
for (const wire of window.scope.wires) {
if (wire.start) {
wire.start.gid = gid++;
}
if (wire.end) {
wire.end.gid = gid++;
}
}
// Sequence to be followed while calling initSimulation
const seqn = ['output', 'general', 'controllers', 'drivers', 'power', 'input', 'misc'];
// For each component call initsimulation function
for (const key of seqn) {
for (const items of Utils.componentBox[key]) {
for (const item of items) {
if (window.scope[item]) {
for (const ele of window.scope[item]) {
if (ele.initSimulation) {
ele.initSimulation();
}
}
}
}
}
}
// // Call init simulation
// for (const key in window.scope) {
// if (window.scope[key] && key !== 'ArduinoUno') {
// for (const ele of window.scope[key]) {
// if (ele.initSimulation) {
// ele.initSimulation();
// }
// }
// }
// }
// for (const comp of window.scope.ArduinoUno) {
// // comp.runner.execute();
// // console.log('s')
// comp.initSimulation();
// }
// Update the simulation status
// Workspace.GetNodeValues();
Workspace.simulating = true;
}
/**
* Function called when StopSimulation button is triggered
* @param callback Callback when simulation is stopped
*/
static stopSimulation(callback: () => void) {
if (!Workspace.simulating) {
callback();
return;
}
// Remove id
for (const wire of window.scope.wires) {
if (wire.start) {
wire.start.value = -1;
}
if (wire.end) {
wire.end.value = -1;
}
}
// Call stop simulation
for (const key in window.scope) {
if (window.scope[key]) {
for (const ele of window.scope[key]) {
if (ele.closeSimulation) {
ele.closeSimulation();
}
}
}
}
// Update state and call callback
Workspace.simulating = false;
Workspace.simulationStopped.emit(true);
callback();
}
/**
* Function to clear the workspace
*/
static ClearWorkspace() {
// Show Loading animation
window.showLoading();
// Remove each component fron the DOM
for (const key in window.scope) {
if (key in window.scope && window.scope[key].length > 0) {
for (const item of window.scope[key]) {
// window.Selected = item;
// this.DeleteComponent();
item.remove();
Workspace.removeMeta(item);
}
// Clear the scope
window.scope[key] = [];
}
}
window.Selected = null;
window.isSelected = false;
// Reinitialize variables
Workspace.initalizeGlobalVariables(window['canvas']);
// Hide Property box
window.hideProperties();
// Hide Loading animation
window.hideLoading();
}
/**
* Function generates a JSON object containing all details of the workspace and downloads it
* @param name string
* @param description string
*/
static SaveJson(name: string = '', description: string = '') {
const id = Date.now();
// Default Save object
const saveObj = {
id,
canvas: {
x: Workspace.translateX,
y: Workspace.translateY,
scale: Workspace.scale
},
project: {
name,
description,
created_at: Date.now(),
}
};
// For each item in the scope
for (const key in window.scope) {
// if atleast one component is present
if (window.scope[key] && window.scope[key].length > 0) {
saveObj[key] = [];
// Add the component to the save object
for (const item of window.scope[key]) {
if (item.save) {
saveObj[key].push(item.save());
}
}
}
}
// Save the Thumbnail for the circuit
Download.ExportImage(ImageType.PNG).then(v => {
saveObj.project['image'] = v; // Add the base64 image
// Export JSON File & Download it
const filename = `${name}.json`;
const jsonStr = JSON.stringify(saveObj);
const element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(jsonStr));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
});
return true;
}
/**
* Function to return if workspace is empty or not
* @returns 'False' if workspace is not empty & 'True' if workspace is empty
*/
static checkIfWorkspaceEmpty() {
for (const key in window.scope) {
if (window.scope[key].length > 0) {
return false;
}
}
return true;
}
// static GetNodeValues() { //waveForm, time) {
// const pointD13 = window.scope[Utils.componentBox['controllers'][0][0]][0].nodes[2];
// const interval = setInterval(() => {
// console.log(pointD13.value);
// // [5, undefined];
// // if (Workspace.isChartDataFull(waveForm, 20)) {
// // Workspace.removeLastElementFromChartDataAndLabel(waveForm, time);
// // }
// // waveForm[0].data.push(window.scope[Utils.componentBox['controllers'][0][0]][0].nodes[2].value);
// // time.push(
// // Workspace.getLabel()
// // );
// if(!Workspace.simulating) {
// clearInterval(interval);
// }
// }, 1);
// }
// static getLabel(){
// return new Date().getSe
gitextract_5zs9hdle/
├── .all-contributorsrc
├── .github/
│ └── workflows/
│ ├── angularTestBuild.yml
│ ├── devDockerCompose.yml
│ ├── dockerTestBackend.yml
│ ├── masterDockerCompose.yml
│ ├── prodContainers.yml
│ ├── reactEslint.yml
│ └── reactTestBuild.yml
├── .gitignore
├── ArduinoFrontend/
│ ├── .editorconfig
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── angular.json
│ ├── e2e/
│ │ ├── protractor-ci.conf.js
│ │ ├── protractor.conf.js
│ │ ├── src/
│ │ │ ├── app.e2e-spec.ts
│ │ │ └── app.po.ts
│ │ └── tsconfig.e2e.json
│ ├── package.json
│ ├── src/
│ │ ├── app/
│ │ │ ├── Libs/
│ │ │ │ ├── AVR8/
│ │ │ │ │ ├── Execute.ts
│ │ │ │ │ ├── IntelHex.ts
│ │ │ │ │ └── Scheduler.ts
│ │ │ │ ├── Battery.ts
│ │ │ │ ├── CircuitElement.spec.ts
│ │ │ │ ├── CircuitElement.ts
│ │ │ │ ├── ConvertJSONFormat.ts
│ │ │ │ ├── Download.ts
│ │ │ │ ├── General.ts
│ │ │ │ ├── Geometry.ts
│ │ │ │ ├── ImageToByteArray.ts
│ │ │ │ ├── Login.ts
│ │ │ │ ├── MathUtils.ts
│ │ │ │ ├── Miscellaneous.ts
│ │ │ │ ├── Point.ts
│ │ │ │ ├── RaphaelUtils.ts
│ │ │ │ ├── SaveOffiline.ts
│ │ │ │ ├── SaveOnline.ts
│ │ │ │ ├── UndoUtils.ts
│ │ │ │ ├── Utils.ts
│ │ │ │ ├── Wire.ts
│ │ │ │ ├── Workspace.ts
│ │ │ │ ├── drivers/
│ │ │ │ │ └── L293D.ts
│ │ │ │ ├── inputs/
│ │ │ │ │ ├── Buttons.ts
│ │ │ │ │ ├── Collision.ts
│ │ │ │ │ ├── GasSensor.ts
│ │ │ │ │ ├── PIRSensor.ts
│ │ │ │ │ ├── PhotoResistor.ts
│ │ │ │ │ ├── Potentiometer.ts
│ │ │ │ │ ├── Relay.ts
│ │ │ │ │ ├── Slider.ts
│ │ │ │ │ ├── TemperatureSensors.ts
│ │ │ │ │ ├── Thermistor.ts
│ │ │ │ │ └── UltrasonicSensor.ts
│ │ │ │ └── outputs/
│ │ │ │ ├── Arduino.ts
│ │ │ │ ├── Buzzer.ts
│ │ │ │ ├── Display.ts
│ │ │ │ ├── LCD/
│ │ │ │ │ ├── LCDPanel.spec.ts
│ │ │ │ │ ├── LCDPanel.ts
│ │ │ │ │ ├── LCDStates.ts
│ │ │ │ │ ├── LCDUtils.ts
│ │ │ │ │ └── MemorySchema.ts
│ │ │ │ ├── Led.ts
│ │ │ │ └── Motors.ts
│ │ │ ├── alert/
│ │ │ │ ├── alert-modal/
│ │ │ │ │ ├── alert-modal.component.css
│ │ │ │ │ ├── alert-modal.component.html
│ │ │ │ │ ├── alert-modal.component.spec.ts
│ │ │ │ │ └── alert-modal.component.ts
│ │ │ │ ├── alert-service/
│ │ │ │ │ ├── alert.service.spec.ts
│ │ │ │ │ └── alert.service.ts
│ │ │ │ ├── confirm-modal/
│ │ │ │ │ ├── confirm-modal.component.css
│ │ │ │ │ ├── confirm-modal.component.html
│ │ │ │ │ ├── confirm-modal.component.spec.ts
│ │ │ │ │ └── confirm-modal.component.ts
│ │ │ │ └── option-modal/
│ │ │ │ ├── option-modal.component.css
│ │ │ │ ├── option-modal.component.html
│ │ │ │ └── option-modal.component.ts
│ │ │ ├── api.service.spec.ts
│ │ │ ├── api.service.ts
│ │ │ ├── app-routing.module.ts
│ │ │ ├── app.component.css
│ │ │ ├── app.component.html
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.module.ts
│ │ │ ├── code-editor/
│ │ │ │ ├── code-editor.component.css
│ │ │ │ ├── code-editor.component.html
│ │ │ │ ├── code-editor.component.spec.ts
│ │ │ │ └── code-editor.component.ts
│ │ │ ├── common/
│ │ │ │ ├── SharedModule.module.ts
│ │ │ │ └── material.module.ts
│ │ │ ├── componentlist/
│ │ │ │ ├── componentlist.component.css
│ │ │ │ ├── componentlist.component.html
│ │ │ │ ├── componentlist.component.spec.ts
│ │ │ │ └── componentlist.component.ts
│ │ │ ├── dashboard/
│ │ │ │ ├── dashboard-routing.module.ts
│ │ │ │ ├── dashboard.component.css
│ │ │ │ ├── dashboard.component.html
│ │ │ │ ├── dashboard.component.spec.ts
│ │ │ │ ├── dashboard.component.ts
│ │ │ │ └── dashboard.module.ts
│ │ │ ├── exit-confirm-dialog/
│ │ │ │ ├── exit-confirm-dialog.component.css
│ │ │ │ ├── exit-confirm-dialog.component.html
│ │ │ │ ├── exit-confirm-dialog.component.spec.ts
│ │ │ │ └── exit-confirm-dialog.component.ts
│ │ │ ├── export-jsondialog/
│ │ │ │ ├── export-jsondialog.component.css
│ │ │ │ ├── export-jsondialog.component.html
│ │ │ │ ├── export-jsondialog.component.spec.ts
│ │ │ │ └── export-jsondialog.component.ts
│ │ │ ├── exportfile/
│ │ │ │ ├── exportfile.component.css
│ │ │ │ ├── exportfile.component.html
│ │ │ │ ├── exportfile.component.spec.ts
│ │ │ │ └── exportfile.component.ts
│ │ │ ├── front-page/
│ │ │ │ ├── front-page.component.css
│ │ │ │ ├── front-page.component.html
│ │ │ │ ├── front-page.component.spec.ts
│ │ │ │ └── front-page.component.ts
│ │ │ ├── gallery/
│ │ │ │ ├── gallery.component.css
│ │ │ │ ├── gallery.component.html
│ │ │ │ ├── gallery.component.spec.ts
│ │ │ │ └── gallery.component.ts
│ │ │ ├── graph/
│ │ │ │ ├── graph.component.css
│ │ │ │ ├── graph.component.html
│ │ │ │ └── graph.component.ts
│ │ │ ├── graph-data.service.ts
│ │ │ ├── graphlist/
│ │ │ │ ├── graphlist.component.css
│ │ │ │ ├── graphlist.component.html
│ │ │ │ └── graphlist.component.ts
│ │ │ ├── header/
│ │ │ │ ├── header.component.css
│ │ │ │ ├── header.component.html
│ │ │ │ ├── header.component.spec.ts
│ │ │ │ └── header.component.ts
│ │ │ ├── layout/
│ │ │ │ ├── ArduinoCanvasInterface.ts
│ │ │ │ ├── Components.ts
│ │ │ │ └── PathUtils.ts
│ │ │ ├── lti-form/
│ │ │ │ ├── lti-form.component.css
│ │ │ │ ├── lti-form.component.html
│ │ │ │ ├── lti-form.component.ts
│ │ │ │ └── view-code/
│ │ │ │ ├── view-code.component.css
│ │ │ │ ├── view-code.component.html
│ │ │ │ └── view-code.component.ts
│ │ │ ├── main-page/
│ │ │ │ ├── main-page.component.css
│ │ │ │ ├── main-page.component.html
│ │ │ │ ├── main-page.component.spec.ts
│ │ │ │ └── main-page.component.ts
│ │ │ ├── side-panel/
│ │ │ │ ├── side-panel.component.css
│ │ │ │ ├── side-panel.component.html
│ │ │ │ ├── side-panel.component.spec.ts
│ │ │ │ └── side-panel.component.ts
│ │ │ ├── simulator/
│ │ │ │ ├── save-project-dialog/
│ │ │ │ │ ├── save-project-dialog.component.html
│ │ │ │ │ ├── save-project-dialog.component.spec.ts
│ │ │ │ │ └── save-project-dialog.component.ts
│ │ │ │ ├── simulator.component.css
│ │ │ │ ├── simulator.component.html
│ │ │ │ ├── simulator.component.spec.ts
│ │ │ │ └── simulator.component.ts
│ │ │ ├── submissionlist/
│ │ │ │ ├── submissionlist.component.css
│ │ │ │ ├── submissionlist.component.html
│ │ │ │ └── submissionlist.component.ts
│ │ │ ├── versioning-panel/
│ │ │ │ ├── create-variation-dialog/
│ │ │ │ │ ├── create-variation-dialog.component.css
│ │ │ │ │ ├── create-variation-dialog.component.html
│ │ │ │ │ └── create-variation-dialog.component.ts
│ │ │ │ ├── versioning-panel.component.css
│ │ │ │ ├── versioning-panel.component.html
│ │ │ │ └── versioning-panel.component.ts
│ │ │ ├── view-component-info/
│ │ │ │ ├── view-component-info.component.css
│ │ │ │ ├── view-component-info.component.html
│ │ │ │ ├── view-component-info.component.spec.ts
│ │ │ │ └── view-component-info.component.ts
│ │ │ └── view-project/
│ │ │ ├── view-project.component.css
│ │ │ ├── view-project.component.html
│ │ │ ├── view-project.component.spec.ts
│ │ │ └── view-project.component.ts
│ │ ├── assets/
│ │ │ ├── .gitkeep
│ │ │ ├── 404page.html
│ │ │ ├── avr8js/
│ │ │ │ └── index.js
│ │ │ ├── canvg/
│ │ │ │ ├── index.babel.js
│ │ │ │ ├── index.es.js
│ │ │ │ ├── index.js
│ │ │ │ └── umd.js
│ │ │ ├── images/
│ │ │ │ ├── ComponentmeasuresForSimulation.txt
│ │ │ │ └── RGB CODE.txt
│ │ │ ├── jsons/
│ │ │ │ ├── Arduino.json
│ │ │ │ ├── Battery9v.json
│ │ │ │ ├── Breadboard.json
│ │ │ │ ├── Buzzer.json
│ │ │ │ ├── CoinCell.json
│ │ │ │ ├── Component.sample.json
│ │ │ │ ├── L293D.json
│ │ │ │ ├── L298N.json
│ │ │ │ ├── LCD16X2.json
│ │ │ │ ├── LED.json
│ │ │ │ ├── MQ2.json
│ │ │ │ ├── Motor.json
│ │ │ │ ├── PIRSensor.json
│ │ │ │ ├── PhotoResistor.json
│ │ │ │ ├── Potentiometer.json
│ │ │ │ ├── PushButton.json
│ │ │ │ ├── RGBLED.json
│ │ │ │ ├── Relay.json
│ │ │ │ ├── Resistor.json
│ │ │ │ ├── ServoMotor.json
│ │ │ │ ├── SevenSegment.json
│ │ │ │ ├── SlideSwitch.json
│ │ │ │ ├── TMP36.json
│ │ │ │ ├── Thermistor.json
│ │ │ │ ├── UltrasonicSensor.json
│ │ │ │ └── help.json
│ │ │ └── samples/
│ │ │ └── Samples.json
│ │ ├── browserslist
│ │ ├── environments/
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── index.html
│ │ ├── karma.conf.js
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ ├── styles.css
│ │ ├── test.ts
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.spec.json
│ │ └── tslint.json
│ ├── tsconfig.json
│ └── tslint.json
├── Assembly_support.md
├── CONFIG.md
├── CONTRIBUTING.md
├── Enhancements/
│ └── Arduino/
│ └── Assembly_support.md
├── JMeter/
│ ├── README.md
│ ├── libAPI.csv
│ ├── libAPI.jmx
│ └── simulationAPI.jmx
├── LICENSE
├── Nginx/
│ ├── conf.d/
│ │ └── local.conf
│ ├── dev.conf.d/
│ │ └── local.conf
│ └── static_pages/
│ └── index/
│ ├── css/
│ │ ├── normalize.css
│ │ └── skeleton.css
│ └── index.html
├── README.md
├── ansible/
│ ├── ansible-playbook.yml
│ ├── configure-containers.yml
│ └── configure-instance.yml
├── docker-compose.dev.yml
├── docker-compose.prod.yml
├── docs/
│ ├── arduino/
│ │ ├── components.rst
│ │ └── index.rst
│ ├── arduinoCloud/
│ │ ├── features.rst
│ │ ├── flow.rst
│ │ ├── index.rst
│ │ └── screenshots.rst
│ ├── conf.py
│ ├── contribute/
│ │ ├── Contributing.rst
│ │ ├── ContributingGuidelines.rst
│ │ ├── NewIssue.rst
│ │ ├── PullRequest.rst
│ │ └── index.rst
│ ├── contributors/
│ │ └── index.rst
│ ├── developerDocs/
│ │ ├── apidocs.rst
│ │ ├── dbswitch.rst
│ │ └── index.rst
│ ├── docker/
│ │ ├── env_variables.rst
│ │ ├── index.rst
│ │ └── installation.rst
│ ├── eSim_on_Cloud/
│ │ ├── eSimGallery.rst
│ │ ├── features.rst
│ │ ├── flow.rst
│ │ ├── index.rst
│ │ └── screenshots.rst
│ ├── index.rst
│ ├── overview/
│ │ └── index.rst
│ ├── requirements.txt
│ └── specs/
│ └── swagger_openapi.yml
├── eda-frontend/
│ ├── .dockerignore
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── package.json
│ ├── public/
│ │ ├── index.html
│ │ └── manifest.json
│ └── src/
│ ├── App.js
│ ├── App.test.js
│ ├── __snapshots__/
│ │ └── App.test.js.snap
│ ├── components/
│ │ ├── Dashboard/
│ │ │ ├── DashboardHome.js
│ │ │ ├── DashboardOtherProjects.js
│ │ │ ├── DashboardSidebar.js
│ │ │ ├── ProgressPanel.js
│ │ │ ├── ProjectCard.js
│ │ │ ├── SchematicCard.js
│ │ │ └── SchematicsList.js
│ │ ├── LTI/
│ │ │ ├── CompareGraph.js
│ │ │ ├── Helper/
│ │ │ │ └── Testcase.js
│ │ │ ├── LTI.css
│ │ │ ├── LTI.js
│ │ │ ├── SubmissionTable.js
│ │ │ └── SubmitResults.js
│ │ ├── Project/
│ │ │ ├── ChangeStatus.js
│ │ │ ├── CreateProject.js
│ │ │ ├── ProjectSimulationParameters.js
│ │ │ ├── ProjectTimeline.js
│ │ │ └── ReportComponent.js
│ │ ├── SchematicEditor/
│ │ │ ├── ComponentProperties.js
│ │ │ ├── ComponentSidebar.js
│ │ │ ├── Header.js
│ │ │ ├── Helper/
│ │ │ │ ├── ComponentDrag.js
│ │ │ │ ├── ComponentParametersData.js
│ │ │ │ ├── KeyboardShorcuts.js
│ │ │ │ ├── KiCadFileUtils.js
│ │ │ │ ├── SchematicEditor.css
│ │ │ │ ├── SideBar.js
│ │ │ │ ├── SvgParser.js
│ │ │ │ └── ToolbarTools.js
│ │ │ ├── PropertiesSidebar.js
│ │ │ ├── RightSidebar.js
│ │ │ ├── SchematicToolbar.js
│ │ │ ├── SideComp.js
│ │ │ ├── SimulationProperties.js
│ │ │ ├── ToolbarExtension.js
│ │ │ └── VersionComponent.js
│ │ ├── Shared/
│ │ │ ├── Graph.js
│ │ │ ├── Layout.js
│ │ │ ├── LayoutMain.js
│ │ │ ├── LayoutSidebar.js
│ │ │ ├── Navbar.js
│ │ │ ├── Notice.js
│ │ │ ├── SimulationScreen.js
│ │ │ ├── Snackbar.js
│ │ │ └── helper/
│ │ │ └── Notice.css
│ │ └── Simulator/
│ │ ├── Editor.js
│ │ ├── NetlistUpload.js
│ │ └── textToFile.js
│ ├── index.css
│ ├── index.js
│ ├── pages/
│ │ ├── Account/
│ │ │ └── ChangePassword.js
│ │ ├── Dashboard.js
│ │ ├── Gallery.js
│ │ ├── Home.js
│ │ ├── LTISetup.js
│ │ ├── Login.js
│ │ ├── NotFound.js
│ │ ├── ProjectPage.js
│ │ ├── Projects.js
│ │ ├── ResetPassword/
│ │ │ ├── Confirmation.js
│ │ │ └── Initiation.js
│ │ ├── SchematiEditor.js
│ │ ├── Simulator.js
│ │ ├── SubmissionPage.js
│ │ └── signUp.js
│ ├── redux/
│ │ ├── actions/
│ │ │ ├── accountActions.js
│ │ │ ├── actions.js
│ │ │ ├── authActions.js
│ │ │ ├── componentPropertiesActions.js
│ │ │ ├── dashboardActions.js
│ │ │ ├── galleryActions.js
│ │ │ ├── index.js
│ │ │ ├── netlistActions.js
│ │ │ ├── projectActions.js
│ │ │ ├── saveSchematicActions.js
│ │ │ ├── schematicEditorActions.js
│ │ │ └── simulationActions.js
│ │ ├── reducers/
│ │ │ ├── accountReducer.js
│ │ │ ├── authReducer.js
│ │ │ ├── componentPropertiesReducer.js
│ │ │ ├── dashboardReducer.js
│ │ │ ├── galleryReducer.js
│ │ │ ├── index.js
│ │ │ ├── netlistReducer.js
│ │ │ ├── projectReducer.js
│ │ │ ├── saveSchematicReducer.js
│ │ │ ├── schematicEditorReducer.js
│ │ │ └── simulationReducer.js
│ │ └── store.js
│ ├── serviceWorker.js
│ ├── setupTests.js
│ ├── theme.js
│ └── utils/
│ └── Api.js
├── esim-cloud-backend/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── arduinoAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── tasks.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── authAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── templates/
│ │ │ ├── activate_user.html
│ │ │ ├── css/
│ │ │ │ ├── normalize.css
│ │ │ │ └── skeleton.css
│ │ │ └── google_callback.html
│ │ ├── tests.py
│ │ ├── token.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── esimCloud/
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── celery.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── generate_svg.sh
│ ├── kicad-symbols/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── additional/
│ │ │ ├── 4xxx.dcm
│ │ │ ├── 4xxx.lib
│ │ │ ├── Analog.dcm
│ │ │ ├── Analog.lib
│ │ │ ├── Device.dcm
│ │ │ ├── Device.lib
│ │ │ ├── Diode.dcm
│ │ │ ├── Diode.lib
│ │ │ ├── LED.dcm
│ │ │ ├── LED.lib
│ │ │ ├── Motor.dcm
│ │ │ ├── Motor.lib
│ │ │ ├── Oscillator.dcm
│ │ │ ├── Oscillator.lib
│ │ │ ├── Transistor_FET.dcm
│ │ │ ├── Transistor_FET.lib
│ │ │ ├── Transistor_IGBT.dcm
│ │ │ ├── Transistor_IGBT.lib
│ │ │ ├── Triac_Thyristor.dcm
│ │ │ ├── Triac_Thyristor.lib
│ │ │ ├── eSim_Hybrid.dcm
│ │ │ └── eSim_Hybrid.lib
│ │ └── default/
│ │ ├── Transistor_BJT.dcm
│ │ ├── Transistor_BJT.lib
│ │ ├── eSim_Sources.dcm
│ │ ├── eSim_Sources.lib
│ │ ├── power.dcm
│ │ ├── power.lib
│ │ ├── pspice.dcm
│ │ └── pspice.lib
│ ├── libAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── forms.py
│ │ ├── helper/
│ │ │ ├── main.py
│ │ │ ├── parser.py
│ │ │ └── plotter.py
│ │ ├── lib_utils.py
│ │ ├── management/
│ │ │ └── commands/
│ │ │ ├── createsuperuser_noinput.py
│ │ │ └── load_default_libs.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── ltiAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── process_submission.py
│ │ ├── serializers.py
│ │ ├── templates/
│ │ │ └── ltiAPI/
│ │ │ ├── config.xml
│ │ │ └── denied.html
│ │ ├── tests.py
│ │ ├── urls.py
│ │ ├── utils.py
│ │ └── views.py
│ ├── manage.py
│ ├── migrations.sh
│ ├── publishAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── signals.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── requirements.txt
│ ├── saveAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── simulationAPI/
│ │ ├── __init__.py
│ │ ├── admin.py
│ │ ├── apps.py
│ │ ├── dbrouters.py
│ │ ├── helpers/
│ │ │ ├── ngspice_helper.py
│ │ │ ├── parse.py
│ │ │ └── sample_files/
│ │ │ ├── RC.cir
│ │ │ ├── data.txt
│ │ │ ├── plot_data_i.txt
│ │ │ └── plot_data_v.txt
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── tasks.py
│ │ ├── templates/
│ │ │ └── admin/
│ │ │ └── runtimeStats.html
│ │ ├── tests.py
│ │ ├── urls.py
│ │ └── views.py
│ └── workflowAPI/
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── fixtures/
│ │ ├── gallery_setup.json
│ │ └── initial_setup.json
│ ├── models.py
│ ├── serializers.py
│ ├── signals/
│ │ ├── __init__.py
│ │ └── handlers.py
│ ├── tests.py
│ ├── urls.py
│ ├── utils.py
│ └── views.py
├── first_run.dev.sh
└── guidelines-checklist/
├── contributing-guidelines.md
├── new-issue-guidelines.md
└── pullrequest-guidelines.md
Showing preview only (230K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2903 symbols across 207 files)
FILE: ArduinoFrontend/e2e/protractor.conf.js
method onPrepare (line 22) | onPrepare() {
FILE: ArduinoFrontend/e2e/src/app.po.ts
class AppPage (line 6) | class AppPage {
method navigateTo (line 10) | navigateTo() {
FILE: ArduinoFrontend/src/app/Libs/AVR8/Execute.ts
type MicroEvent (line 12) | interface MicroEvent {
type ServoEvent (line 42) | interface ServoEvent {
class ArduinoRunner (line 72) | class ArduinoRunner {
method constructor (line 145) | constructor(hex: string) {
method execute (line 164) | execute() {
method getmiliS (line 201) | getmiliS(seconds: number) {
method getMicroSeconds (line 209) | getMicroSeconds(seconds: number) {
method delete (line 215) | delete() {
method stop (line 224) | stop() {
method addMicroEvent (line 231) | addMicroEvent(event: MicroEvent) {
method getMicroEvent (line 238) | getMicroEvent(index: number): MicroEvent {
method addServo (line 249) | addServo(port: string, pin: number, callback: (angle: number, prevAngl...
method serialInput (line 303) | serialInput(inp: string) {
FILE: ArduinoFrontend/src/app/Libs/AVR8/IntelHex.ts
function parseHex (line 9) | function parseHex(source: string, target: Uint8Array) {
function writeText (line 23) | function writeText(data, filename) {
FILE: ArduinoFrontend/src/app/Libs/AVR8/Scheduler.ts
type TaskCallback (line 4) | type TaskCallback = () => void;
class TaskScheduler (line 9) | class TaskScheduler {
method start (line 27) | start() {
method stop (line 37) | stop() {
method postTask (line 45) | postTask(fn: TaskCallback) {
FILE: ArduinoFrontend/src/app/Libs/Battery.ts
class Battery9v (line 6) | class Battery9v extends CircuitElement {
method constructor (line 13) | constructor(public canvas: any, x: number, y: number) {
method init (line 17) | init() {
method properties (line 42) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 54) | initSimulation(): void {
method closeSimulation (line 65) | closeSimulation(): void {
class CoinCell (line 72) | class CoinCell extends CircuitElement {
method constructor (line 79) | constructor(public canvas: any, x: number, y: number) {
method init (line 89) | init() {
method properties (line 104) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 116) | initSimulation(): void {
method closeSimulation (line 122) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/CircuitElement.ts
method constructor (line 68) | constructor(keyName: string, public x: number, public y: number, filenam...
method getBoundingBox (line 120) | getBoundingBox(): BoundingBox {
method DrawNodes (line 130) | DrawNodes(canvas: any, pinData: any, pointHalf: number) {
method DrawElement (line 149) | DrawElement(canvas: any, drawData: any) {
method DrawPolygon (line 199) | DrawPolygon(canvas: any, item: any) {
method DrawPath (line 220) | DrawPath(canvas: any, item: any) {
method calcRelative (line 248) | calcRelative(input: string, pattern: RegExp, canvas: any) {
method setDragListeners (line 283) | setDragListeners() {
method setHoverListener (line 325) | setHoverListener() {
method setClickListener (line 341) | setClickListener(callback: () => void) {
method init (line 360) | init() { }
method save (line 365) | save(): any {
method SaveData (line 383) | SaveData() {
method load (line 389) | load(data: any): void {
method LoadData (line 418) | LoadData(data: any) { }
method getNode (line 422) | getNode(x: number, y: number, id: number = null): Point {
method remove (line 438) | remove(): void {
method delete (line 448) | delete() { }
method getName (line 452) | getName() { return this.title; }
method getNodesCoord (line 458) | getNodesCoord(): number[] {
method dragAlong (line 467) | dragAlong(tmpar: any, fdx: number, fdy: number): any {
method dragAlongStop (line 478) | dragAlongStop(x: number, y: number): void {
method transformPosition (line 489) | transformPosition(fdx: number, fdy: number): void {
FILE: ArduinoFrontend/src/app/Libs/ConvertJSONFormat.ts
class ConvertJSONFormat (line 3) | class ConvertJSONFormat {
method convertToOfflineFormat (line 10) | static async convertToOfflineFormat(id, data) {
method convertToOnlineFormat (line 34) | static convertToOnlineFormat(data) {
method getRandomString (line 59) | static getRandomString(length): string {
FILE: ArduinoFrontend/src/app/Libs/Download.ts
type ImageType (line 2) | enum ImageType { PNG, JPG, SVG }
class Download (line 10) | class Download {
method DownloadImage (line 17) | static DownloadImage(data: any, filename: string, type: ImageType) {
method DownloadText (line 36) | static DownloadText(filename: string, data: any[], options: any) {
method ExportImage (line 54) | static async ExportImage(type: ImageType) {
FILE: ArduinoFrontend/src/app/Libs/General.ts
class BreadboardProximityNodeTuple (line 16) | class BreadboardProximityNodeTuple {
method constructor (line 20) | constructor(breadboardNode: Point, elementNode: Point) {
class Resistor (line 29) | class Resistor extends CircuitElement {
method constructor (line 64) | constructor(public canvas: any, x: number, y: number) {
method init (line 68) | init() {
method SaveData (line 94) | SaveData() {
method LoadData (line 104) | LoadData(data: any) {
method updateColors (line 111) | updateColors() {
method getValue (line 130) | getValue() {
method getPower (line 156) | private getPower(index: number) {
method update (line 167) | update(value: string, unitIndex: number) {
method getInputValues (line 180) | getInputValues() {
method getName (line 202) | getName() {
method properties (line 213) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 268) | initSimulation(): void {
method closeSimulation (line 273) | closeSimulation(): void {
method getResistance (line 279) | getResistance() {
method getID (line 286) | getID() {
class BreadBoard (line 294) | class BreadBoard extends CircuitElement {
method constructor (line 347) | constructor(public canvas: any, x: number, y: number) {
method getRecArduinov2 (line 359) | static getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 430) | static getRecArduinoBreadv2(node: Point, startedOn: string) {
method subsribeToDrag (line 498) | subsribeToDrag(fn) {
method subscribeToDragStop (line 507) | subscribeToDragStop(fn) {
method resetHighlightedPoints (line 514) | resetHighlightedPoints() {
method getSolderedElements (line 524) | getSolderedElements() {
method maybeUnsolderElement (line 532) | private maybeUnsolderElement(element) {
method onOtherComponentDrag (line 546) | onOtherComponentDrag(element) {
method onOtherComponentDragStop (line 580) | onOtherComponentDragStop() {
method init (line 601) | init() {
method transformBoardPosition (line 744) | transformBoardPosition(fdx: number, fdy: number): void {
method properties (line 847) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method reBuildSameNodes (line 860) | reBuildSameNodes() {
method isPointWithinBbox (line 882) | isPointWithinBbox(boundingBox, x, y): boolean {
method shortlistNodes (line 892) | shortlistNodes(x, y) {
method getNearestNodes (line 904) | getNearestNodes(x, y) {
method getSolderedNodes (line 917) | getSolderedNodes() {
method addSolderedNode (line 928) | addSolderedNode(node) {
method initSimulation (line 938) | initSimulation(): void {
method closeSimulation (line 989) | closeSimulation(): void {
method getGroupings (line 995) | getGroupings() {
FILE: ArduinoFrontend/src/app/Libs/Geometry.ts
class BoundingBox (line 3) | class BoundingBox {
method constructor (line 9) | constructor(x: number, y: number, width: number, height: number) {
method loadFromRaphaelBbox (line 16) | static loadFromRaphaelBbox(bBox) {
method getCombinedBBox (line 20) | static getCombinedBBox(bBoxes: BoundingBox[]) {
FILE: ArduinoFrontend/src/app/Libs/ImageToByteArray.ts
class ImageToByteArray (line 1) | class ImageToByteArray {
method getDataURLForm (line 4) | static getDataURLForm(url: string) {
method createImage (line 12) | static createImage(url: string) {
method convertImage (line 19) | static convertImage(image) {
method drawImageToCanvas (line 24) | static drawImageToCanvas(image) {
FILE: ArduinoFrontend/src/app/Libs/Login.ts
class Login (line 6) | class Login {
method getToken (line 10) | static getToken(): string {
method logout (line 16) | static logout() {
method redirectLogin (line 24) | static redirectLogin(isFront: boolean = false): void {
FILE: ArduinoFrontend/src/app/Libs/MathUtils.ts
class MathUtils (line 1) | class MathUtils {
method modulo (line 2) | static modulo(n, m) {
method isPointBetween (line 6) | static isPointBetween(point: [number, number], point1: [number, number...
FILE: ArduinoFrontend/src/app/Libs/Miscellaneous.ts
class Label (line 5) | class Label extends CircuitElement {
method constructor (line 36) | constructor(public canvas: any, x: number, y: number) {
method SaveData (line 48) | SaveData() {
method LoadData (line 61) | LoadData(data: any) {
method update (line 71) | update() {
method changeLabel (line 83) | changeLabel(value: string) {
method properties (line 100) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 199) | initSimulation(): void {
method closeSimulation (line 204) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/Point.ts
class Point (line 17) | class Point {
method constructor (line 100) | constructor(
method isConnected (line 243) | isConnected(): boolean {
method isSoldered (line 247) | isSoldered(): boolean {
method solderWire (line 255) | solderWire(wire?): Wire {
method unsolderWire (line 271) | unsolderWire() {
method connectWire (line 286) | connectWire(wire, pushToUndo = true) {
method startNewWire (line 303) | startNewWire() {
method getBoundingBox (line 312) | getBoundingBox(): BoundingBox {
method setHoverCallback (line 321) | setHoverCallback(callback = null, closeCallback = null) {
method position (line 329) | position() {
method highlight (line 333) | highlight() {
method undoHighlight (line 338) | undoHighlight() {
method outline (line 342) | outline() {
method undoOutline (line 347) | undoOutline() {
method relativeMove (line 357) | relativeMove(dx: number, dy: number) {
method hide (line 370) | hide() {
method remainHidden (line 376) | remainHidden() {
method remainShow (line 382) | remainShow() {
method show (line 389) | show() {
method move (line 399) | move(x: number, y: number) {
method disconnect (line 412) | disconnect() {
method remove (line 422) | remove() {
method addValueListener (line 434) | addValueListener(listener: (val: number, calledby: Point, parent: Poin...
method setValue (line 442) | setValue(value: number, calledby: Point) {
FILE: ArduinoFrontend/src/app/Libs/RaphaelUtils.ts
function areBoundingBoxesIntersecting (line 4) | function areBoundingBoxesIntersecting(box1, box2): boolean {
FILE: ArduinoFrontend/src/app/Libs/SaveOffiline.ts
class SaveOffline (line 10) | class SaveOffline {
method Check (line 15) | static Check(callback: (result: any) => void = null) {
method Save (line 60) | static Save(mydata, callback: (data: any) => void = null) {
method ReadALL (line 95) | static ReadALL(callback: (data: any) => void = null) {
method Delete (line 130) | static Delete(id, callback: () => void = null) {
method Update (line 161) | static Update(mydata, callback: (data: any) => void = null) {
method Read (line 194) | static Read(id, callback: (data: any) => void = null) {
FILE: ArduinoFrontend/src/app/Libs/SaveOnline.ts
class SaveOnline (line 18) | class SaveOnline {
method isUUID (line 23) | static isUUID(input: string) {
method Save (line 37) | static Save(name = '', description = '', api: ApiService, branch, vers...
method staffSaveGallery (line 129) | static staffSaveGallery(name = '', description = '', api: ApiService, ...
method SaveFromDashboard (line 196) | static SaveFromDashboard(data: any, api: ApiService, callback: (data: ...
method CallToAPISaveService (line 248) | static CallToAPISaveService(api: ApiService, saveObj: any, token: stri...
method getRandomString (line 273) | static getRandomString(length) {
FILE: ArduinoFrontend/src/app/Libs/UndoUtils.ts
method workspaceUndo (line 37) | static workspaceUndo() {
method workspaceRedo (line 47) | static workspaceRedo() {
method pushChangeToUndoAndReset (line 58) | static pushChangeToUndoAndReset(ele) {
method pushChangeToRedo (line 92) | static pushChangeToRedo(ele) {
method pushChangeToUndo (line 100) | static pushChangeToUndo(ele) {
method loadChange (line 129) | static async loadChange(ele, operation) {
method getExistingWindowElement (line 327) | static getExistingWindowElement(grup, ele) {
method createElement (line 342) | static createElement(ele) {
method removeElement (line 392) | static removeElement(ele) {
FILE: ArduinoFrontend/src/app/Libs/Utils.ts
class Utils (line 24) | class Utils {
FILE: ArduinoFrontend/src/app/Libs/Wire.ts
class Wire (line 12) | class Wire {
method constructor (line 55) | constructor(public canvas, public start: Point, public existingId = nu...
method getUniqueId (line 72) | getUniqueId(id): number {
method createElement (line 88) | createElement(element) {
method addPoint (line 123) | addPoint(x: number, y: number, isPerpendicular = false, index?) {
method removeAllMiddlePoints (line 146) | removeAllMiddlePoints() {
method togglePerpendicularLine (line 158) | togglePerpendicularLine(toggle: boolean) {
method drawPerpendicular (line 182) | drawPerpendicular(x: number, y: number) {
method draw (line 195) | draw(x: number, y: number) {
method getPerpendicularXY (line 207) | private getPerpendicularXY(x: number, y: number, previousX: number, pr...
method updateWirePath (line 217) | private updateWirePath(newPath: string) {
method drawWire (line 233) | private drawWire(x?: number, y?: number) {
method add (line 253) | private add(x: number, y: number, index?) {
method handleClick (line 266) | handleClick() {
method setColor (line 291) | setColor(color: string) {
method properties (line 303) | properties() {
method connect (line 359) | connect(t: Point, removeLast: boolean = false, hideJoint: boolean = fa...
method removeJoint (line 391) | removeJoint(pointIndex: number) {
method createJoint (line 405) | createJoint(pointIndex: number, hideJoint: boolean = false) {
method isConnected (line 436) | isConnected() {
method update (line 442) | update() {
method deselect (line 456) | deselect() {
method save (line 464) | save() {
method load (line 488) | load(data) {
method removeGlows (line 501) | private removeGlows() {
method remove (line 511) | remove() {
method delete (line 540) | delete() {
FILE: ArduinoFrontend/src/app/Libs/Workspace.ts
type ConsoleType (line 18) | enum ConsoleType { INFO, WARN, ERROR, OUTPUT }
class Workspace (line 22) | class Workspace {
method zoomIn (line 67) | static zoomIn() {
method zoomOut (line 80) | static zoomOut() {
method minMax (line 93) | static minMax(min: number, max: number, value: number) {
method initalizeGlobalVariables (line 106) | static initalizeGlobalVariables(canvas: any) {
method onDragStopEvent (line 156) | static onDragStopEvent(element) {
method onDragEvent (line 165) | static onDragEvent(element) {
method subsribeToDrag (line 175) | static subsribeToDrag(fn) {
method subsribeToDragStop (line 183) | static subsribeToDragStop(fn) {
method initProperty (line 191) | static initProperty(toggle: (state: boolean) => void) {
method initializeGlobalFunctions (line 216) | static initializeGlobalFunctions() {
method BeforeUnload (line 267) | static BeforeUnload(event) {
method bodyMouseMove (line 275) | static bodyMouseMove(event: MouseEvent) {
method bodyMouseUp (line 296) | static bodyMouseUp(event: MouseEvent) {
method mouseDown (line 311) | static mouseDown(event: MouseEvent) {
method click (line 334) | static click(event: MouseEvent) {
method isWireSelected (line 339) | private static isWireSelected(): boolean {
method mouseMove (line 347) | static mouseMove(event: MouseEvent) {
method mouseUp (line 386) | static mouseUp(event: MouseEvent) {
method contextMenu (line 394) | static contextMenu(event: MouseEvent) {
method hideContextMenu (line 404) | static hideContextMenu() {
method copy (line 413) | static copy(event: ClipboardEvent) {
method cut (line 419) | static cut(event: ClipboardEvent) {
method doubleClick (line 426) | static doubleClick(event: MouseEvent) {
method dragLeave (line 440) | static dragLeave(event: DragEvent) {
method dragOver (line 448) | static dragOver(event: DragEvent) {
method drop (line 456) | static drop(event: DragEvent) {
method keyDown (line 468) | static keyDown(event: KeyboardEvent) {
method keyPress (line 480) | static keyPress(event: KeyboardEvent) {
method keyUp (line 486) | static keyUp(event: KeyboardEvent) {
method mouseWheel (line 538) | static mouseWheel(event: WheelEvent) {
method paste (line 550) | static paste(event: ClipboardEvent) {
method addComponent (line 560) | static addComponent(classString: string, x: number, y: number, offsetX...
method updateWires (line 572) | static updateWires() {
method svgPoint (line 582) | static svgPoint(x, y) {
method removeMeta (line 592) | static removeMeta(obj) {
method SaveCircuit (line 608) | static SaveCircuit(name: string = '', description: string = '', callba...
method Load (line 662) | static Load(data) {
method LoadWires (line 729) | static LoadWires(wires: any[], retainId = false, pushUndo = false) {
method DeleteComponent (line 788) | static DeleteComponent(undoReset = true) {
method copyComponent (line 879) | static copyComponent() {
method pasteComponent (line 892) | static pasteComponent() {
method ClearConsole (line 915) | static ClearConsole() {
method CompileCode (line 931) | static CompileCode(api: ApiService, callback: () => void) {
method startArduino (line 1033) | static startArduino() {
method stopSimulation (line 1087) | static stopSimulation(callback: () => void) {
method ClearWorkspace (line 1119) | static ClearWorkspace() {
method SaveJson (line 1153) | static SaveJson(name: string = '', description: string = '') {
method checkIfWorkspaceEmpty (line 1210) | static checkIfWorkspaceEmpty() {
FILE: ArduinoFrontend/src/app/Libs/drivers/L293D.ts
class L293D (line 8) | class L293D extends CircuitElement {
method constructor (line 53) | constructor(public canvas: any, x: number, y: number) {
method init (line 59) | init() {
method update (line 120) | update() {
method properties (line 174) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 187) | initSimulation(): void {
method closeSimulation (line 230) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/Buttons.ts
class PushButton (line 14) | class PushButton extends CircuitElement {
method constructor (line 38) | constructor(public canvas: any, x: number, y: number) {
method init (line 42) | init() {
method properties (line 73) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 85) | initSimulation(): void {
method MouseUp (line 190) | MouseUp(by: number, iniValue: number) {
method closeSimulation (line 201) | closeSimulation(): void {
class SlideSwitch (line 213) | class SlideSwitch extends CircuitElement {
method constructor (line 224) | constructor(public canvas: any, x: number, y: number) {
method init (line 230) | init() {
method anim (line 243) | anim() {
method properties (line 261) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 273) | initSimulation(): void {
method closeSimulation (line 284) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/Collision.ts
type Vector (line 4) | interface Vector {
type Orienation (line 18) | enum Orienation {
class Collision (line 27) | class Collision {
method inLine (line 29) | static inLine(p: Vector, q: Vector, r: Vector) {
method orientation (line 38) | static orientation(p: Vector, q: Vector, r: Vector) {
method isIntersecting (line 46) | static isIntersecting(p1: Vector, q1: Vector, p2: Vector, q2: Vector) {
method isPointInsidePolygon (line 69) | static isPointInsidePolygon(point: number[][], p: number[]) {
method EuclideanDistance (line 97) | static EuclideanDistance(a: Vector, b: Vector) {
FILE: ArduinoFrontend/src/app/Libs/inputs/GasSensor.ts
class MQ2 (line 8) | class MQ2 extends CircuitElement {
method constructor (line 19) | constructor(public canvas: any, x: number, y: number) {
method init (line 25) | init() {
method properties (line 38) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method setValue (line 52) | setValue(tmp: Vector, Center: Vector) {
method initSimulation (line 69) | initSimulation(): void {
method closeSimulation (line 125) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/PIRSensor.ts
class PIRSensor (line 7) | class PIRSensor extends CircuitElement {
method constructor (line 38) | constructor(public canvas: any, x: number, y: number) {
method init (line 42) | init() {
method properties (line 63) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 75) | initSimulation(): void {
method closeSimulation (line 158) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/PhotoResistor.ts
class PhotoResistor (line 6) | class PhotoResistor extends CircuitElement {
method constructor (line 46) | constructor(public canvas: any, x: number, y: number) {
method properties (line 63) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method getValue (line 76) | getValue(r: number) {
method initSimulation (line 82) | initSimulation(): void {
method changeVal (line 114) | changeVal(enable1, v) {
method closeSimulation (line 146) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/Potentiometer.ts
class Potentiometer (line 15) | class Potentiometer extends CircuitElement {
method constructor (line 58) | constructor(public canvas: any, x: number, y: number) {
method init (line 62) | init() {
method svgPoint (line 74) | svgPoint(x, y) {
method rotateDial (line 86) | rotateDial(center: Vector, clientX: number, clientY: number) {
method rotateDialRheostat (line 136) | rotateDialRheostat(center: Vector, clientX: number, clientY: number) {
method properties (line 193) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 221) | initSimulation(): void {
method SaveData (line 281) | SaveData() {
method LoadData (line 290) | LoadData(data: any) {
method closeSimulation (line 300) | closeSimulation(): void {
method areNodesConnectedProperly (line 320) | areNodesConnectedProperly() {
method sendResistance (line 349) | sendResistance(resistance: number) {
method getRecArduinov2 (line 358) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 431) | private getRecArduinoBreadv2(node: Point, startedOn: string) {
method getRecLED (line 498) | getRecLED(node: Point, startedOn: string) {
method getRecLEDBread (line 582) | private getRecLEDBread(node: Point, startedOn: string) {
FILE: ArduinoFrontend/src/app/Libs/inputs/Relay.ts
class Relay (line 6) | class Relay extends CircuitElement {
method constructor (line 13) | constructor(public canvas: any, public x: number, y: number) {
method init (line 19) | init() {
method properties (line 45) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 57) | initSimulation(): void {
method closeSimulation (line 72) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/Slider.ts
class Slider (line 5) | class Slider {
method constructor (line 36) | constructor(public canvas: any, public x: number, public y: number) {
method setGradient (line 70) | setGradient(start: string, end: string) {
method setValueChangeListener (line 79) | setValueChangeListener(listener: (value: number) => void) {
method hide (line 85) | hide() {
method show (line 92) | show() {
method remove (line 99) | remove() {
FILE: ArduinoFrontend/src/app/Libs/inputs/TemperatureSensors.ts
class TMP36 (line 7) | class TMP36 extends CircuitElement {
method constructor (line 22) | constructor(public canvas: any, x: number, y: number) {
method properties (line 32) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method setValue (line 42) | setValue(val: number) {
method initSimulation (line 55) | initSimulation(): void {
method closeSimulation (line 75) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/inputs/Thermistor.ts
class Thermistor (line 12) | class Thermistor extends CircuitElement {
method constructor (line 52) | constructor(public canvas: any, x: number, y: number) {
method properties (line 62) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method getValue (line 75) | getValue(r: number) {
method initSimulation (line 81) | initSimulation(): void {
method closeSimulation (line 112) | closeSimulation(): void {
method changeVal (line 126) | changeVal(enable1, v) {
method getRecResistor (line 166) | getRecResistor(node: Point, startedOn: string) {
method getRecBread (line 237) | getRecBread(node: Point, startedOn: string) {
FILE: ArduinoFrontend/src/app/Libs/inputs/UltrasonicSensor.ts
class UltrasonicSensor (line 9) | class UltrasonicSensor extends CircuitElement {
method constructor (line 54) | constructor(public canvas: any, public x: number, y: number) {
method init (line 59) | init() {
method properties (line 95) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 109) | initSimulation(): void {
method closeSimulation (line 214) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/outputs/Arduino.ts
class ArduinoUno (line 16) | class ArduinoUno extends CircuitElement {
method constructor (line 65) | constructor(public canvas: any, x: number, y: number) {
method init (line 79) | init() {
method SaveData (line 151) | SaveData() {
method LoadData (line 161) | LoadData(data: any) {
method properties (line 168) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method delete (line 199) | delete() {
method initSimulation (line 206) | initSimulation(): void {
method closeSimulation (line 331) | closeSimulation(): void {
method addServo (line 350) | addServo(pin: Point, callback: (angle: number, prevAngle: number) => v...
method addPWM (line 363) | addPWM(pin: Point, callback: (volt: number, prev: number) => void) {
method getPort (line 385) | getPort(pinName: string) {
method EmitValueChangeEvent (line 397) | EmitValueChangeEvent() {
FILE: ArduinoFrontend/src/app/Libs/outputs/Buzzer.ts
class Buzzer (line 14) | class Buzzer extends CircuitElement {
method constructor (line 62) | constructor(private canvas: any, public x: number, public y: number) {
method init (line 66) | init() {
method logic (line 79) | logic(val: number) {
method properties (line 130) | properties() {
method initSimulation (line 142) | initSimulation() {
method closeSimulation (line 188) | closeSimulation() {
method getRecArduinov2 (line 207) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 280) | private getRecArduinoBreadv2(node: Point, startedOn: string) {
FILE: ArduinoFrontend/src/app/Libs/outputs/Display.ts
class LCD16X2 (line 21) | class LCD16X2 extends CircuitElement {
method constructor (line 174) | constructor(public canvas: any, x: number, y: number) {
method properties (line 185) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method getBoundingBox (line 198) | getBoundingBox(): BoundingBox {
method setDisplayOn (line 210) | setDisplayOn(isDisplayOn: boolean) {
method setCursorOn (line 218) | setCursorOn(isCursorOn: boolean) {
method setCursorPositionCharBlink (line 226) | setCursorPositionCharBlink(isCursorPositionCharBlinkOn: boolean) {
method setDdRamAddress (line 234) | setDdRamAddress(address): void {
method getVCC (line 241) | getVCC(): number {
method getGND (line 248) | getGND(): number {
method getV0 (line 255) | getV0(): number {
method getRegisterType (line 262) | getRegisterType(): RegisterType {
method getDataMode (line 269) | getDataMode(): DataMode {
method loadRegisterState (line 276) | private loadRegisterState(): void {
method loadDataMode (line 284) | private loadDataMode(): void {
method setBusyFlag (line 289) | private setBusyFlag(value: boolean): void {
method getActiveRamAndAddress (line 297) | getActiveRamAndAddress(): [RAM, number] {
method getCurrentCharacterPanel (line 307) | getCurrentCharacterPanel() {
method moveCgRamAddress (line 315) | moveCgRamAddress(distance: number) {
method moveCursor (line 323) | moveCursor(direction: 1 | -1) {
method isInSight (line 344) | private isInSight(index: [number, number]) {
method shiftDisplay (line 352) | private shiftDisplay(numSteps: number) {
method scrollDisplayLeft (line 367) | scrollDisplayLeft() {
method scrollDisplayRight (line 374) | scrollDisplayRight() {
method getCharacterPanel (line 382) | getCharacterPanel(address) {
method clearDisplay (line 391) | clearDisplay() {
method v0Listener (line 400) | v0Listener(newValue, prevValue) {
method isPowerSupplyEnough (line 414) | isPowerSupplyEnough() {
method eSignalListener (line 426) | eSignalListener(newValue) {
method getDisplayablePanels (line 450) | getDisplayablePanels(): Set<LCDCharacterPanel> {
method refreshLCD (line 461) | refreshLCD() {
method setBitState (line 498) | setBitState(bitState: BitState) {
method setDataDisplayState (line 505) | setDataDisplayState(dataDisplayState: DataDisplayState, numLines?: num...
method setDataProcessingMode (line 518) | setDataProcessingMode(dataProcessingMode: DataProcessingMode) {
method getInterSpacingHorizontal (line 525) | getInterSpacingHorizontal() {
method getInterSpacingVertical (line 532) | getInterSpacingVertical() {
method reset (line 539) | reset() {
method setDisplayToHome (line 583) | setDisplayToHome() {
method createDdRam (line 597) | createDdRam() {
method createCgRom (line 604) | createCgRom() {
method generateCharacterPanels (line 611) | generateCharacterPanels() {
method destroyCharacterPanels (line 639) | destroyCharacterPanels() {
method init (line 643) | init() {
method logic (line 664) | logic(_, node) {
method initSimulation (line 671) | initSimulation(): void {
method closeSimulation (line 728) | closeSimulation(): void {
class SevenSegment (line 738) | class SevenSegment extends CircuitElement {
method constructor (line 765) | constructor(public canvas: any, x: any, y: any) {
method init (line 769) | init() {
method logic (line 794) | logic(_) {
method animate (line 809) | animate(value: number) {
method properties (line 832) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 844) | initSimulation(): void {
method closeSimulation (line 847) | closeSimulation(): void {
FILE: ArduinoFrontend/src/app/Libs/outputs/LCD/LCDPanel.ts
constant COLOR_SCALING_MAP (line 6) | const COLOR_SCALING_MAP = new LRU({
method length (line 8) | length(n, key) { return n * 2 + key.length; }
method dispose (line 9) | dispose(key, n) { n.close(); }
class LCDPixel (line 16) | class LCDPixel {
method constructor (line 105) | constructor(parentIndex: [number, number], index: [number, number], po...
method fillColor (line 128) | fillColor(color) {
method setContrast (line 136) | setContrast(value) {
method shift (line 149) | shift(distance, hidden) {
method switch (line 175) | switch(value) {
method destroy (line 183) | destroy() {
method getRawColor (line 192) | getRawColor() {
method getColor (line 199) | getColor(rawColor?: string) {
method getName (line 215) | getName() {
method getCanvasRepr (line 222) | getCanvasRepr() {
method show (line 237) | show() {
method hide (line 245) | hide() {
method blinkOn (line 253) | blinkOn() {
method blinkOff (line 263) | blinkOff() {
method refresh (line 275) | refresh() {
class LCDCharacterPanel (line 288) | class LCDCharacterPanel {
method constructor (line 397) | constructor(index: [number, number], N_ROW: number, N_COLUMN: number,
method setContrast (line 424) | setContrast(value) {
method shift (line 434) | shift(distance: number) {
method getBoundingBox (line 439) | getBoundingBox(): BoundingBox {
method shiftPixels (line 449) | private shiftPixels(distance: number) {
method destroy (line 460) | destroy() {
method initialiseLCDPixels (line 467) | initialiseLCDPixels() {
method clear (line 499) | clear() {
method drawCharacter (line 510) | drawCharacter(characterDisplayBytes: number[][]) {
method changeCursorDisplay (line 529) | changeCursorDisplay(show: boolean) {
method blink (line 545) | private blink() {
method setBlinking (line 561) | setBlinking(value: boolean) {
method getCanvasRepr (line 574) | getCanvasRepr(): any[] {
FILE: ArduinoFrontend/src/app/Libs/outputs/LCD/LCDStates.ts
type ActiveAddress (line 5) | enum ActiveAddress {
type RegisterType (line 12) | enum RegisterType {
type DataMode (line 19) | enum DataMode {
type DataProcessingMode (line 26) | interface DataProcessingMode {
class WriteDataProcessingMode (line 33) | class WriteDataProcessingMode implements DataProcessingMode {
method processData (line 36) | processData() {
method constructor (line 40) | constructor(lcd: LCD16X2) {
class ReadDataProcessingMode (line 48) | class ReadDataProcessingMode implements DataProcessingMode {
method processData (line 51) | processData() {
method constructor (line 56) | constructor(lcd: LCD16X2) {
type BitState (line 64) | interface BitState {
class FourBitState (line 76) | class FourBitState implements BitState {
method constructor (line 78) | constructor(lcd: LCD16X2) {
method readData (line 103) | readData(): [number, number] {
method isWaitingForMoreData (line 130) | isWaitingForMoreData() {
class EightBitState (line 138) | class EightBitState implements BitState {
method constructor (line 140) | constructor(lcd: LCD16X2) {
method readData (line 154) | readData(): [number, number] {
method isWaitingForMoreData (line 170) | isWaitingForMoreData() {
type DataDisplayState (line 180) | interface DataDisplayState {
class Font8x5DisplayState (line 193) | class Font8x5DisplayState implements DataDisplayState {
method constructor (line 209) | constructor(lcd: LCD16X2, nLines: number) {
method getPixelRows (line 220) | getPixelRows() {
method getPixelColumns (line 226) | getPixelColumns() {
method getRows (line 233) | getRows() {
method getColumns (line 240) | getColumns() {
method setNLines (line 248) | setNLines(nLines: number) {
method getFontSize (line 257) | getFontSize() {
method displayData (line 265) | displayData(characterDisplayBytes: number[][]) {
class Font10x5DisplayState (line 278) | class Font10x5DisplayState implements DataDisplayState {
method constructor (line 294) | constructor(lcd: LCD16X2, nLines: number) {
method setNLines (line 299) | setNLines(nLines: number) {
method getPixelRows (line 311) | getPixelRows() {
method getPixelColumns (line 317) | getPixelColumns() {
method getRows (line 324) | getRows() {
method getColumns (line 331) | getColumns() {
method getFontSize (line 338) | getFontSize() {
method displayData (line 346) | displayData(characterDisplayBytes: number[][]) {
type RegisterState (line 357) | interface RegisterState {
class DataRegisterState (line 362) | class DataRegisterState implements RegisterState {
method constructor (line 365) | constructor(lcd: LCD16X2) {
method processData (line 369) | processData() {
class InstructionRegisterState (line 415) | class InstructionRegisterState implements RegisterState {
method getInstructionType (line 418) | static getInstructionType(databus: number): InstructionType {
method clearDisplay (line 431) | clearDisplay() {
method setCursorHome (line 435) | setCursorHome() {
method setEntryMode (line 440) | setEntryMode(data) {
method displayOnOff (line 457) | displayOnOff(data) {
method shiftCursorAndDisplay (line 468) | shiftCursorAndDisplay(data) {
method setFunction (line 487) | setFunction(data) {
method setCGRAMAddress (line 514) | setCGRAMAddress(data) {
method setDDRAMAddress (line 519) | setDDRAMAddress(data) {
method processData (line 524) | processData() {
method constructor (line 551) | constructor(lcd: LCD16X2) {
FILE: ArduinoFrontend/src/app/Libs/outputs/LCD/LCDUtils.ts
type InstructionType (line 522) | enum InstructionType {
type FontSize (line 533) | enum FontSize {
function hex2bin (line 538) | function hex2bin(hex, offset = 0) {
class LCDUtils (line 542) | class LCDUtils {
method getDisplayBytes (line 545) | static getDisplayBytes(character: number, fontSize: FontSize = FontSiz...
method convertHexToBinaryArray (line 553) | static convertHexToBinaryArray(hex: number): number[] {
method getBlankDisplayBytes (line 557) | static getBlankDisplayBytes(): number[][] {
FILE: ArduinoFrontend/src/app/Libs/outputs/LCD/MemorySchema.ts
type RAM (line 6) | interface RAM {
class DDRAM (line 14) | class DDRAM implements RAM {
method constructor (line 19) | constructor(N_ROW: number, N_COLUMN: number) {
method createDDRAMForLCD (line 25) | static createDDRAMForLCD(N_ROW) {
method convertIndexToAddress (line 35) | convertIndexToAddress(index: [number, number]): number {
method convertAddressToIndex (line 46) | convertAddressToIndex(address: number): [number, number] {
method validateIndex (line 56) | validateIndex(address: number) {
method read (line 62) | read(address: number): number {
method readAtIndex (line 67) | readAtIndex(index: [number, number]): number {
method write (line 72) | write(address: number, data: number) {
class CGROM (line 82) | class CGROM {
method constructor (line 89) | constructor(fontSize: FontSize) {
method readROM (line 101) | readROM(higherBit: number, lowerBit: number): number[][] {
class CGRAM (line 109) | class CGRAM implements RAM {
method constructor (line 112) | constructor() {}
method validateAddress (line 114) | validateAddress(address) {
method read (line 121) | read(address: number): number[] {
method write (line 129) | write(address: number, data: number) {
FILE: ArduinoFrontend/src/app/Libs/outputs/Led.ts
class LED (line 12) | class LED extends CircuitElement {
method constructor (line 80) | constructor(public canvas: any, x: number, y: number) {
method SaveData (line 84) | SaveData() {
method LoadData (line 93) | LoadData(data: any) {
method init (line 97) | init() {
method fillColor (line 117) | fillColor(color) {
method logic (line 121) | logic(val: number) {
method glowWithAlpha (line 176) | glowWithAlpha(current: number) {
method handleConnectionError (line 199) | handleConnectionError() {
method anim (line 203) | anim() {
method getName (line 209) | getName() {
method properties (line 220) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 250) | initSimulation(): void {
method closeSimulation (line 304) | closeSimulation(): void {
method getID (line 317) | getID() {
method setVariableResistance (line 323) | setVariableResistance(resistance: number) {
method getRecArduinov2 (line 331) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 404) | private getRecArduinoBreadv2(node: Point, startedOn: string) {
method getRecResistance (line 471) | getRecResistance(node: Point, startedOn: string) {
method getRecResistanceBread (line 555) | private getRecResistanceBread(node: Point, startedOn: string) {
class RGBLED (line 624) | class RGBLED extends CircuitElement {
method constructor (line 647) | constructor(public canvas: any, x: number, y: number) {
method init (line 653) | init() {
method logic (line 661) | logic(val: number) {
method anim (line 680) | anim() {
method properties (line 712) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method removeGlow (line 724) | removeGlow() {
method handleConnectionError (line 733) | handleConnectionError() {
method initSimulation (line 739) | initSimulation(): void {
method closeSimulation (line 752) | closeSimulation(): void {
method getRecArduinov2 (line 764) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 834) | private getRecArduinoBreadv2(node: Point, startedOn: string) {
FILE: ArduinoFrontend/src/app/Libs/outputs/Motors.ts
class Motor (line 16) | class Motor extends CircuitElement {
method constructor (line 57) | constructor(public canvas: any, x: number, y: number) {
method init (line 63) | init() {
method setAnimation (line 166) | setAnimation(volt, direction) {
method properties (line 182) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 194) | initSimulation(): void {
method addPwmArduino (line 300) | addPwmArduino(arduino, end) {
method closeSimulation (line 316) | closeSimulation(): void {
method getRecArduinov2 (line 342) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 413) | getRecArduinoBreadv2(node: Point, startedOn: string) {
class L298N (line 482) | class L298N extends CircuitElement {
method constructor (line 511) | constructor(public canvas: any, x: number, y: number) {
method init (line 517) | init() {
method update (line 557) | update() {
method properties (line 611) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method getArduino (line 625) | private getArduino(node: Point) {
method initSimulation (line 645) | initSimulation(): void {
method closeSimulation (line 668) | closeSimulation(): void {
class ServoMotor (line 688) | class ServoMotor extends CircuitElement {
method constructor (line 713) | constructor(public canvas: any, x: number, y: number) {
method init (line 719) | init() {
method animate (line 737) | animate(angle: number, duration: number = 10) {
method properties (line 749) | properties(): { keyName: string; id: number; body: HTMLElement; title:...
method initSimulation (line 761) | initSimulation(): void {
method closeSimulation (line 811) | closeSimulation(): void {
method getRecArduinov2 (line 833) | getRecArduinov2(node: Point, startedOn: string) {
method getRecArduinoBreadv2 (line 906) | getRecArduinoBreadv2(node: Point, startedOn: string) {
method areAllNodesConnected (line 972) | areAllNodesConnected(): boolean {
FILE: ArduinoFrontend/src/app/alert/alert-modal/alert-modal.component.ts
type AlertDialogData (line 9) | interface AlertDialogData {
class AlertModalComponent (line 22) | class AlertModalComponent {
method constructor (line 28) | constructor(public dialogRef: MatDialogRef<AlertModalComponent>, @Inje...
method close (line 30) | close(): void {
FILE: ArduinoFrontend/src/app/alert/alert-service/alert.service.ts
class AlertService (line 10) | class AlertService {
method constructor (line 14) | constructor(public dialog: MatDialog) {
method showAlert (line 18) | static showAlert(message: string, buttonText: string = 'OK') {
method showConfirm (line 25) | static showConfirm(message, yesFunction: () => any, noFunction?: () =>...
method showOptions (line 44) | static showOptions(
method showCustom (line 74) | static showCustom(component, data, subscriber) {
FILE: ArduinoFrontend/src/app/alert/confirm-modal/confirm-modal.component.ts
type ConfirmDialogData (line 12) | interface ConfirmDialogData {
class ConfirmModalComponent (line 30) | class ConfirmModalComponent {
method constructor (line 36) | constructor(public dialogRef: MatDialogRef<ConfirmModalComponent>, @In...
method onConfirm (line 38) | onConfirm(): void {
method onDeny (line 43) | onDeny(): void {
method onCancel (line 48) | onCancel(): void {
FILE: ArduinoFrontend/src/app/alert/option-modal/option-modal.component.ts
type OptionDialogData (line 13) | interface OptionDialogData {
class OptionModalComponent (line 31) | class OptionModalComponent {
method constructor (line 37) | constructor(public dialogRef: MatDialogRef<OptionModalComponent>, @Inj...
method onOption1 (line 39) | onOption1(): void {
method onOption2 (line 44) | onOption2(): void {
method onDismiss (line 49) | onDismiss(): void {
FILE: ArduinoFrontend/src/app/api.service.ts
class ApiService (line 17) | class ApiService {
method constructor (line 29) | constructor(
method httpHeaders (line 39) | httpHeaders(token: string) {
method saveProject (line 71) | saveProject(data: any, token: string) {
method saveProjectToGallery (line 85) | saveProjectToGallery(data: any, token: string) {
method listProject (line 98) | listProject(token) {
method readProject (line 110) | readProject(id: string, branch: string, version: string, token: string) {
method searchProject (line 123) | searchProject(title: string, token: string) {
method updateProject (line 135) | updateProject(id: string, data: any, token: string) {
method deleteProject (line 146) | deleteProject(id, token): Observable<any> {
method compileCodeINO (line 160) | compileCodeINO(data: any): Observable<any> {
method compileCodeInlineAssembly (line 167) | compileCodeInlineAssembly(data: any): Observable<any> {
method getHex (line 174) | getHex(taskId: string): Observable<any> {
method userInfo (line 181) | userInfo(token: string): Observable<any> {
method Sharing (line 192) | Sharing(id: string, branch: string, version: string, on: boolean, toke...
method fetchSamples (line 201) | fetchSamples(): Observable<any> {
method fetchSingleProjectToGallery (line 210) | fetchSingleProjectToGallery(id: any) {
method deleteProjectFromGallery (line 219) | deleteProjectFromGallery(id: any, token: any) {
method listAllVersions (line 232) | listAllVersions(id, token): Observable<any> {
method deleteBranch (line 244) | deleteBranch(id, branch, token) {
method deleteVariation (line 257) | deleteVariation(id, branch, version, token) {
method existLTIURL (line 268) | existLTIURL(id: string, token: string) {
method ArduinoexistLTIURL (line 279) | ArduinoexistLTIURL(id: string, token: string) {
method saveLTIDetails (line 290) | saveLTIDetails(token: string, data: any) {
method saveArduinoLTIDetails (line 301) | saveArduinoLTIDetails(token: string, data: any) {
method viewArduinoCode (line 313) | viewArduinoCode(id, token): Observable<any> {
method removeLTIDetails (line 324) | removeLTIDetails(id: number, token: string) {
method removeArduinoLTIDetails (line 337) | removeArduinoLTIDetails(id: number, token: string) {
method login (line 348) | login() {
method updateLTIDetails (line 372) | updateLTIDetails(token: string, data: any) {
method updateArduinoLTIDetails (line 383) | updateArduinoLTIDetails(token: string, data: any) {
method submitCircuit (line 394) | submitCircuit(token: string, data: any) {
method arduinoSubmitCircuit (line 405) | arduinoSubmitCircuit(token: string, data: any) {
method getSubmissions (line 418) | getSubmissions(id: string, branch: string, version: string, token: str...
method getArduinoSubmissions (line 431) | getArduinoSubmissions(id: string, branch: string, version: string, tok...
method logout (line 440) | logout(token): void {
method getRole (line 455) | getRole(token): Observable<any> {
method storeSimulationData (line 465) | storeSimulationData(id, token, data: object) {
method storeLTISimulationData (line 478) | storeLTISimulationData(id, ltiId: number, token, data: object) {
method getSimulationData (line 485) | getSimulationData(id, version, branch, token: string): Observable<any> {
method getLTISimulationData (line 491) | getLTISimulationData(id, ltiId): Observable<any> {
FILE: ArduinoFrontend/src/app/app-routing.module.ts
class AppRoutingModule (line 27) | class AppRoutingModule { }
FILE: ArduinoFrontend/src/app/app.component.ts
class AppComponent (line 11) | class AppComponent implements AfterViewInit {
method ngAfterViewInit (line 19) | ngAfterViewInit() {
FILE: ArduinoFrontend/src/app/app.module.ts
function onMonacoLoad (line 48) | function onMonacoLoad() { }
class AppModule (line 120) | class AppModule { }
FILE: ArduinoFrontend/src/app/code-editor/code-editor.component.ts
class CodeEditorComponent (line 19) | class CodeEditorComponent {
method reinit (line 118) | set reinit(value: boolean) {
method DownloadCode (line 150) | DownloadCode() {
method Include (line 161) | Include(i) {
method onInit (line 174) | onInit(editor) {
method constructor (line 1198) | constructor() { }
method codeChanged (line 1202) | codeChanged() {
method chooseArduino (line 1209) | chooseArduino(item: HTMLSelectElement) {
method chooseLanguage (line 1216) | chooseLanguage(item: HTMLSelectElement) {
method openFolder (line 1223) | openFolder() {
FILE: ArduinoFrontend/src/app/common/SharedModule.module.ts
class SharedModule (line 20) | class SharedModule { }
FILE: ArduinoFrontend/src/app/common/material.module.ts
class MaterialModule (line 91) | class MaterialModule { }
FILE: ArduinoFrontend/src/app/componentlist/componentlist.component.ts
class ComponentlistComponent (line 17) | class ComponentlistComponent implements OnInit {
method constructor (line 31) | constructor(private dialog: MatDialog, public dialogRef: MatDialogRef<...
method ngOnInit (line 35) | ngOnInit() {
method OpenInfo (line 63) | OpenInfo(key: string) {
method exportCSV (line 78) | exportCSV(filename: string, data: string) {
method DownloadCSV (line 95) | DownloadCSV() {
FILE: ArduinoFrontend/src/app/dashboard/dashboard-routing.module.ts
class DashboardRoutingModule (line 46) | class DashboardRoutingModule { }
FILE: ArduinoFrontend/src/app/dashboard/dashboard.component.ts
class DashboardComponent (line 8) | class DashboardComponent implements OnInit {
method ngOnInit (line 10) | ngOnInit() {
FILE: ArduinoFrontend/src/app/dashboard/dashboard.module.ts
class DashboardModule (line 35) | class DashboardModule { }
FILE: ArduinoFrontend/src/app/exit-confirm-dialog/exit-confirm-dialog.component.ts
class ExitConfirmDialogComponent (line 9) | class ExitConfirmDialogComponent implements OnInit {
method constructor (line 11) | constructor(public dialogRef: MatDialogRef<ExitConfirmDialogComponent>...
method ngOnInit (line 13) | ngOnInit() {
method yesClick (line 17) | yesClick() {
FILE: ArduinoFrontend/src/app/export-jsondialog/export-jsondialog.component.ts
class ExportJSONDialogComponent (line 10) | class ExportJSONDialogComponent implements OnInit {
method constructor (line 15) | constructor(
method ngOnInit (line 22) | ngOnInit() {
method saveProject (line 28) | saveProject() {
FILE: ArduinoFrontend/src/app/exportfile/exportfile.component.ts
class ExportfileComponent (line 19) | class ExportfileComponent {
method constructor (line 25) | constructor(private title: Title, private dialog: MatDialogRef<Exportf...
method Export (line 32) | Export(svg, png, jpg) {
FILE: ArduinoFrontend/src/app/front-page/front-page.component.ts
class FrontPageComponent (line 11) | class FrontPageComponent implements OnInit {
method constructor (line 41) | constructor() { }
method ngOnInit (line 45) | ngOnInit() {
FILE: ArduinoFrontend/src/app/gallery/gallery.component.ts
class GalleryComponent (line 21) | class GalleryComponent implements OnInit {
method constructor (line 36) | constructor(
method ngOnInit (line 45) | ngOnInit() {
method DateTime (line 84) | DateTime(item) {
method getUserInfo (line 88) | getUserInfo() {
method DeleteCircuit (line 97) | DeleteCircuit(saveId: any, name: any) {
method deleteProjectFromGallery (line 113) | deleteProjectFromGallery(id, name) {
FILE: ArduinoFrontend/src/app/graph-data.service.ts
class GraphDataService (line 6) | class GraphDataService {
method constructor (line 12) | constructor() { }
FILE: ArduinoFrontend/src/app/graph/graph.component.ts
class GraphComponent (line 12) | class GraphComponent implements OnInit, AfterViewInit {
method constructor (line 27) | constructor(private graphDataService: GraphDataService) {
method ngOnInit (line 35) | ngOnInit() {
method ngAfterViewInit (line 45) | ngAfterViewInit() {
method clearGraph (line 67) | clearGraph() {
method configChart (line 73) | configChart() {
FILE: ArduinoFrontend/src/app/graphlist/graphlist.component.ts
class GraphlistComponent (line 17) | class GraphlistComponent implements OnInit {
method constructor (line 31) | constructor(
method readPins (line 36) | readPins() {
method ngOnInit (line 53) | ngOnInit() {
method pushPoint (line 111) | pushPoint(arduino, pointId) {
method SaveData (line 120) | SaveData() {
FILE: ArduinoFrontend/src/app/header/header.component.ts
class HeaderComponent (line 16) | class HeaderComponent implements OnInit, OnDestroy {
method constructor (line 55) | constructor(
method ngOnInit (line 61) | ngOnInit() {
method Login (line 70) | Login() {
method Logout (line 76) | Logout() {
method stateChangeUserInfo (line 83) | stateChangeUserInfo() {
method getUserInfo (line 94) | getUserInfo() {
method onChangePassword (line 113) | onChangePassword() {
method ngOnDestroy (line 125) | ngOnDestroy() {
FILE: ArduinoFrontend/src/app/layout/ArduinoCanvasInterface.ts
class PathProblem (line 16) | class PathProblem {
method constructor (line 23) | constructor(source, destination, sourceBlock, destinationBlock, wire) {
class LayoutUtils (line 32) | class LayoutUtils {
method solveAutoLayout (line 40) | static solveAutoLayout() {
method continueSaveLayout (line 59) | private static continueSaveLayout(canvas: Canvas): void {
method generateCanvas (line 76) | static generateCanvas(): Canvas {
method updateWirePath (line 97) | static updateWirePath(wire: Wire, path: Path): void {
method convertCircuitElementToBlock (line 112) | static convertCircuitElementToBlock(element: CircuitElement): Block {
method convertBoundingBoxToBlock (line 122) | static convertBoundingBoxToBlock(boundingBox: BoundingBox, name = 'Unn...
method getSourcesAndDestsToSolve (line 132) | static getSourcesAndDestsToSolve(): PathProblem[] {
method getSourceAndDestinationForWire (line 148) | static getSourceAndDestinationForWire(wire: Wire): [Point, Point] {
method convertWireToPath (line 162) | static convertWireToPath(wire: Wire): Path {
method getAllWires (line 170) | static getAllWires(): Wire[] {
method getAllCircuitElements (line 177) | static getAllCircuitElements(): CircuitElement[] {
FILE: ArduinoFrontend/src/app/layout/Components.ts
class MathHelper (line 4) | class MathHelper {
method areNumbersClose (line 11) | static areNumbersClose(x: number, y: number, decimals: number = 8) {
method modulo (line 23) | static modulo(n: number, m: number) {
type Orientation (line 31) | enum Orientation {
class Vector (line 46) | class Vector {
method constructor (line 57) | constructor(x: number, y: number) {
method getX (line 65) | getX(): number {
method getY (line 72) | getY(): number {
method add (line 80) | add(vector: Vector) {
method subtract (line 88) | subtract(vector: Vector) {
method multiply (line 96) | multiply(factor: number): Vector {
method dotProduct (line 104) | dotProduct(vector: Vector): number {
method getSlope (line 111) | getSlope(): number {
method getApproxOrientation (line 118) | getApproxOrientation(): Orientation {
method getOrientation (line 131) | getOrientation(): Orientation {
class OrientationUtil (line 144) | class OrientationUtil {
method getUnitVector (line 145) | public static getUnitVector(orientation: Orientation) {
method addOrientations (line 163) | public static addOrientations(orientation1: Orientation, orientation2:...
method subtractOrientations (line 172) | public static subtractOrientations(orientation1: Orientation, orientat...
class Point (line 180) | class Point {
method constructor (line 191) | constructor(x: number, y: number) {
method loadFromVector (line 200) | static loadFromVector(vector: Vector) {
method toString (line 207) | toString(): string {
method getX (line 214) | getX(): number {
method getY (line 221) | getY(): number {
method add (line 229) | add(point: Point) {
method subtract (line 237) | subtract(point: Point) {
method getVector (line 244) | getVector(): Vector {
method calculateDistance (line 252) | calculateDistance(point: Point) {
method equals (line 260) | equals(point: Point) {
class Line (line 270) | class Line {
method constructor (line 281) | constructor(point1: Point, point2: Point) {
method toString (line 289) | toString(): string {
method doesLineSuperimpose (line 297) | doesLineSuperimpose(line: Line): boolean {
method doesLineIntersect (line 313) | doesLineIntersect(line: Line): [boolean, Point] {
method getVector (line 338) | getVector(): Vector {
method isHorizontal (line 345) | isHorizontal(): boolean {
method isVertical (line 352) | isVertical(): boolean {
method getEnds (line 359) | getEnds(): [Point, Point] {
method getPoint1 (line 366) | getPoint1(): Point {
method getPoint2 (line 373) | getPoint2(): Point {
method getLength (line 380) | getLength(): number {
method getSlope (line 387) | getSlope(): number {
method containsPoint (line 396) | containsPoint(p: Point): boolean {
method equals (line 404) | equals(line: Line): boolean {
class Path (line 415) | class Path extends CanvasElement {
method constructor (line 421) | constructor(points: Point[] = []) {
method loadFromLine (line 430) | static loadFromLine(line: Line): Path {
method doesPathSuperimpose (line 439) | doesPathSuperimpose(path: Path): [boolean, Line, Line] {
method getName (line 454) | getName(): string {
method mergePoints (line 461) | private mergePoints(): void {
method mergeCollinearPoints (line 478) | private mergeCollinearPoints(): void {
method deleteCycles (line 510) | private deleteCycles(i?) {
method simplify (line 531) | simplify(): void {
method getAllLineSegments (line 539) | getAllLineSegments(): Line[] {
method getNumberOfPoints (line 552) | getNumberOfPoints() {
method getLineSegmentOrientation (line 561) | private getLineSegmentOrientation(pointIndex1, pointIndex2) {
method toString (line 572) | toString(): string {
method containsPoint (line 580) | containsPoint(point: Point): boolean {
method getLastVectorOrientation (line 592) | getLastVectorOrientation(): Orientation {
method getFirstVectorOrientation (line 603) | getFirstVectorOrientation(): Orientation {
method addPath (line 615) | addPath(path: Path): Path {
method reverse (line 622) | reverse(): Path {
method getAllPoints (line 629) | getAllPoints(): Point[] {
method addPoint (line 637) | addPoint(point: Point): void {
method addPoints (line 645) | addPoints(points: Point[]): void {
class Block (line 650) | class Block extends CanvasElement {
method constructor (line 684) | constructor(point1: Point, point3: Point, isChildBlock = false, name?) {
method getBoundary (line 694) | getBoundary(): Path {
method isChild (line 699) | isChild(): boolean {
method getName (line 703) | getName(): string {
method containsPoint (line 711) | containsPoint(p: Point): boolean {
method getAllVertices (line 719) | getAllVertices(): Point[] {
method getPoint1 (line 723) | getPoint1(): Point {
method getPoint2 (line 727) | getPoint2(): Point {
method getPoint3 (line 731) | getPoint3(): Point {
method getPoint4 (line 735) | getPoint4(): Point {
method getMinX (line 739) | getMinX(): number {
method getMaxX (line 743) | getMaxX(): number {
method getMinY (line 747) | getMinY(): number {
method getMaxY (line 751) | getMaxY(): number {
method getOtherTwoPoints (line 758) | getOtherTwoPoints(): [Point, Point] {
method getDiagonals (line 765) | getDiagonals(): [Vector, Vector] {
method getCenter (line 772) | getCenter(): Point {
method getRelativeOrientation (line 782) | getRelativeOrientation(point: Point): Orientation {
method getRelativeOrientationUnitVector (line 801) | getRelativeOrientationUnitVector(point: Point): Vector {
method getPointAwayFromPort (line 811) | getPointAwayFromPort(point: Point, distance: number, canvas?: Canvas):...
class Canvas (line 822) | class Canvas {
method constructor (line 828) | constructor(elements: CanvasElement[] = []) {
method addElement (line 832) | addElement(element: CanvasElement): void {
method removeElement (line 836) | removeElement(element: CanvasElement): void {
method getElements (line 840) | getElements(): CanvasElement[] {
method getBlocks (line 844) | getBlocks(): Block[] {
method getParentBlocks (line 848) | getParentBlocks(): Block[] {
method getPaths (line 853) | getPaths(): Path[] {
class CanvasUtils (line 859) | class CanvasUtils {
method doElementsIntersect (line 860) | static doElementsIntersect(element1: CanvasElement, element2: CanvasEl...
method doesBlockAndPathIntersects (line 874) | private static doesBlockAndPathIntersects(path: Path, block: Block): [...
method doBlocksIntersect (line 886) | private static doBlocksIntersect(block1: Block, block2: Block): [boole...
method getBoundary (line 899) | static getBoundary(element: CanvasElement): Path {
method arePointsAligned (line 907) | static arePointsAligned(point1: Point, point2: Point): boolean {
method appendPaths (line 911) | static appendPaths(...paths: Path[]): Path {
method getSubCanvasIntersectingCanvas (line 916) | static getSubCanvasIntersectingCanvas(canvas: Canvas, block: Block): C...
method doesPointLieOnCanvaspath (line 920) | static doesPointLieOnCanvaspath(canvas: Canvas, point: Point): boolean {
method getCompactPath (line 930) | static getCompactPath(canvas: Canvas, path: Path): Path {
function test (line 936) | function test() {
FILE: ArduinoFrontend/src/app/layout/PathUtils.ts
constant DELTA_DISTANCE (line 6) | const DELTA_DISTANCE = 15;
constant PATH_PRIORITY (line 10) | const PATH_PRIORITY = {
class Utils (line 17) | class Utils {
method getOptimalPath (line 27) | static getOptimalPath(src: Point, dest: Point, srcParentBlock: Block, ...
method isCanvasInvalid (line 55) | static isCanvasInvalid(canvas: Canvas): [boolean, CanvasElement, Canva...
method getDirectPaths (line 82) | private static getDirectPaths(src: Point, dest: Point): Path[] {
method checkObstacles (line 98) | static checkObstacles(path: Path, canvas: Canvas): [boolean, Line, Can...
method getIntermediaryLines (line 123) | static getIntermediaryLines(point1: Point, point2: Point, canvas: Canv...
method chooseLine (line 235) | static chooseLine(lineList: Line[], isOrientationHorizontal: boolean):...
method getPointAwayFromPort (line 280) | static getPointAwayFromPort(point: Point, parentBlock: Block, canvas: ...
method getOptimalPathRecursive (line 298) | private static getOptimalPathRecursive(src: Point, dest: Point, srcOri...
FILE: ArduinoFrontend/src/app/lti-form/lti-form.component.ts
type Circuit (line 12) | interface Circuit {
type LTIDetails (line 25) | interface LTIDetails {
class LTIFormComponent (line 51) | class LTIFormComponent implements OnInit {
method constructor (line 59) | constructor(
method ngOnInit (line 154) | ngOnInit() {
method setForm (line 229) | setForm(res: any) {
method gettestCaseSelectChange (line 245) | gettestCaseSelectChange(value) {
method ontestCaseSelectChanges (line 253) | ontestCaseSelectChanges(event) {
method getModelCircuitChange (line 257) | getModelCircuitChange(value) {
method onModelCircuitChange (line 262) | onModelCircuitChange(event) {
method getStudentSimulation (line 271) | getStudentSimulation(value) {
method onStudentSelectChanges (line 279) | onStudentSelectChanges(event) {
method conCodeWeight (line 284) | conCodeWeight(event) {
method onSubmit (line 292) | onSubmit() {
method onDelete (line 351) | onDelete() {
method onUpdate (line 395) | onUpdate() {
method onClear (line 453) | onClear() {
method setConsumerError (line 460) | setConsumerError(err) {
method copyURL (line 479) | copyURL() {
method getAllVersions (line 490) | getAllVersions() {
method getTestCases (line 509) | getTestCases() {
method compareIds (line 550) | compareIds(id1, id2) {
method getFormattedDate (line 559) | getFormattedDate(date: string) {
FILE: ArduinoFrontend/src/app/lti-form/view-code/view-code.component.ts
class ViewCodeComponent (line 13) | class ViewCodeComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 55) | ngOnInit() {
method getCode (line 69) | getCode(dataDump) {
method setCode (line 85) | setCode(event) {
FILE: ArduinoFrontend/src/app/main-page/main-page.component.ts
class MainPageComponent (line 26) | class MainPageComponent implements OnInit {
method onCloudClick (line 104) | onCloudClick() {
method onTempCircuitClick (line 113) | onTempCircuitClick() {
method onLTIAppsClick (line 122) | onLTIAppsClick() {
method onLTISubmissionsClick (line 131) | onLTISubmissionsClick() {
method getInitials (line 138) | getInitials(nameString, i) {
method closeProject (line 144) | closeProject() {
method openProject (line 154) | openProject(id, offline = false) {
method constructor (line 173) | constructor(
method ngOnInit (line 186) | ngOnInit() {
method checkUrl (line 201) | checkUrl() {
method userInfo (line 223) | userInfo(token) {
method readRoles (line 241) | readRoles(token: string) {
method readOnCloudItems (line 252) | readOnCloudItems() {
method filterOnlineProjects (line 275) | filterOnlineProjects(val) {
method readTempItems (line 290) | readTempItems() {
method deleteCircuitConfirm (line 314) | private deleteCircuitConfirm(id, offline, index) {
method DeleteCircuit (line 352) | DeleteCircuit(id, offline, index) {
method DisableSharing (line 361) | DisableSharing(item: any) {
method DateDiff (line 373) | DateDiff(item: any, time) {
method ExpandDate (line 380) | ExpandDate(item) {
method CopyUrlToClipBoard (line 389) | CopyUrlToClipBoard(url) {
method EnableSharing (line 414) | EnableSharing(circuit, token, callback: any, enable: boolean = true) {
method ShareCircuit (line 430) | ShareCircuit(selected, index) {
method ImportCircuit (line 521) | ImportCircuit(event) {
method ExportCircuit (line 543) | ExportCircuit(selected, offline) {
method DownloadFile (line 600) | DownloadFile(data) {
method SaveCircuit (line 616) | SaveCircuit(fileData) {
method getUrl (line 655) | getUrl(circuit) {
method DeleteLTI (line 666) | DeleteLTI(selected) {
method getNormalCircuits (line 686) | getNormalCircuits() {
method getLTIApps (line 694) | getLTIApps() {
method getLTISubmissions (line 702) | getLTISubmissions() {
FILE: ArduinoFrontend/src/app/side-panel/side-panel.component.ts
class SidePanelComponent (line 13) | class SidePanelComponent implements OnInit {
method constructor (line 33) | constructor(
method ngOnInit (line 38) | ngOnInit() {
method userInfo (line 50) | userInfo(token) {
method readRoles (line 68) | readRoles(token: string) {
FILE: ArduinoFrontend/src/app/simulator/save-project-dialog/save-project-dialog.component.ts
type DialogData (line 5) | interface DialogData {
class SaveProjectDialogComponent (line 17) | class SaveProjectDialogComponent {
method constructor (line 26) | constructor(public dialogRef: MatDialogRef<SaveProjectDialogComponent>...
method onChange (line 31) | onChange(e): void {
method onSave (line 35) | onSave(): void {
method onCancel (line 39) | onCancel(): void {
FILE: ArduinoFrontend/src/app/simulator/simulator.component.spec.ts
function onMonacoLoad (line 18) | function onMonacoLoad() { }
FILE: ArduinoFrontend/src/app/simulator/simulator.component.ts
class SimulatorComponent (line 37) | class SimulatorComponent implements OnInit, OnDestroy {
method constructor (line 163) | constructor(
method makeSVGg (line 176) | makeSVGg() {
method ngOnDestroy (line 185) | ngOnDestroy() {
method ngOnInit (line 197) | ngOnInit() {
method isLoaded (line 309) | isLoaded() {
method startPropertyDrag (line 315) | startPropertyDrag() {
method propertyMouseDown (line 322) | propertyMouseDown(event: MouseEvent) {
method Collapse (line 332) | Collapse(block: HTMLElement) {
method getSimRecSelectChange (line 344) | getSimRecSelectChange(value) {
method onSelectionChanges (line 351) | onSelectionChanges(event) {
method showCode (line 358) | showCode(ltiID) {
method StartSimulation (line 372) | StartSimulation() {
method hidesimload (line 406) | hidesimload() {
method toggleCodeEditor (line 414) | toggleCodeEditor(elem: HTMLElement) {
method minimizeConsole (line 420) | minimizeConsole() {
method expandConsole (line 436) | expandConsole() {
method clearConsole (line 453) | clearConsole() {
method PrintToConsole (line 460) | PrintToConsole(sin: HTMLInputElement) {
method onFocusOut (line 476) | onFocusOut(evt) {
method componentdbClick (line 489) | componentdbClick(key: string) {
method dragStart (line 497) | dragStart(event: DragEvent, key: string) {
method zoom (line 506) | zoom(x: number) {
method autoLayout (line 514) | autoLayout() {
method openInfo (line 521) | openInfo() {
method openDailog (line 528) | openDailog() {
method openview (line 533) | openview() {
method delete (line 540) | delete() {
method paste (line 545) | paste() {
method copy (line 550) | copy() {
method SaveProject (line 555) | SaveProject() {
method SaveProjectOff (line 641) | SaveProjectOff(callback = null) {
method addToGallery (line 675) | addToGallery() {
method ClearProject (line 682) | ClearProject() {
method LoadOnlineProject (line 691) | LoadOnlineProject(id, offline) {
method LoadProject (line 726) | LoadProject(data: any) {
method closeProject (line 735) | closeProject() {
method openProject (line 742) | openProject() {
method Login (line 749) | Login() {
method Logout (line 755) | Logout() {
method RouteToSimulator (line 759) | RouteToSimulator() {
method RouteToFunction (line 767) | RouteToFunction(routeLink, isAbsolute = false) {
method HandleRouter (line 779) | HandleRouter(callback) {
method OpenGallery (line 815) | OpenGallery(index: string, id: any) {
method exportJson (line 847) | exportJson() {
method importJson (line 863) | importJson(file) {
method exitProject (line 875) | exitProject() {
method enableButton (line 892) | enableButton(type) {
method undoChange (line 906) | undoChange() {
method redoChange (line 912) | redoChange() {
method createNewBranch (line 919) | createNewBranch(obj) {
method getRandomString (line 951) | getRandomString(length) {
method showGraph (line 962) | showGraph() {
method SaveLTISubmission (line 969) | SaveLTISubmission() {
method getFormattedDate (line 1017) | getFormattedDate(date: string) {
method callGetSimRecord (line 1024) | callGetSimRecord($event) {
method getSimRecord (line 1033) | getSimRecord() {
FILE: ArduinoFrontend/src/app/submissionlist/submissionlist.component.ts
type Submission (line 7) | interface Submission {
class SubmissionlistComponent (line 26) | class SubmissionlistComponent implements OnInit {
method constructor (line 72) | constructor(
method ngOnInit (line 81) | ngOnInit() {
method setUpTable (line 105) | setUpTable() {
method searchNFilter (line 128) | searchNFilter(searchString: string) {
method PopulateSubmissions (line 138) | PopulateSubmissions() {
method getFormattedDate (line 165) | getFormattedDate(date: string) {
method getHostFromUrl (line 172) | getHostFromUrl(url: string) {
FILE: ArduinoFrontend/src/app/versioning-panel/create-variation-dialog/create-variation-dialog.component.ts
class CreateVariationDialogComponent (line 10) | class CreateVariationDialogComponent implements OnInit {
method constructor (line 21) | constructor(
method ngOnInit (line 28) | ngOnInit() {
method createVariation (line 34) | createVariation() {
FILE: ArduinoFrontend/src/app/versioning-panel/versioning-panel.component.ts
class DeleteObj (line 8) | class DeleteObj {
class VersioningPanelComponent (line 17) | class VersioningPanelComponent implements OnInit {
method constructor (line 59) | constructor(
method ngOnInit (line 69) | ngOnInit() {
method getAllVersions (line 96) | getAllVersions() {
method createBranch (line 172) | createBranch() {
method deleteVariation (line 185) | deleteVariation(variation) {
method deleteBranch (line 194) | deleteBranch(branch) {
method switchVersion (line 204) | switchVersion(variation, event: Event) {
method setStep (line 217) | setStep(index) {
method delete (line 225) | delete(type, data) {
method confirmDelete (line 236) | confirmDelete() {
FILE: ArduinoFrontend/src/app/view-component-info/view-component-info.component.ts
class ViewComponentInfoComponent (line 12) | class ViewComponentInfoComponent implements OnInit {
method constructor (line 34) | constructor(public dialogRef: MatDialogRef<ViewComponentInfoComponent>...
method ngOnInit (line 39) | ngOnInit() {
method close (line 70) | close() {
FILE: ArduinoFrontend/src/app/view-project/view-project.component.ts
class ViewProjectComponent (line 20) | class ViewProjectComponent implements OnInit {
method constructor (line 28) | constructor(
method redirect (line 48) | private redirect() {
method setMetaTags (line 56) | setMetaTags(data: any) {
method ngOnInit (line 101) | ngOnInit() {
FILE: ArduinoFrontend/src/assets/avr8js/index.js
function f (line 5) | function f(t, n) {
class s (line 68) | class s {
method constructor (line 69) | constructor(s, e = 8192) {
method reset (line 84) | reset() {
method readData (line 87) | readData(t) {
method writeData (line 92) | writeData(t, s) {
method SP (line 96) | get SP() {
method SP (line 99) | set SP(t) {
method SREG (line 102) | get SREG() {
method interruptsEnabled (line 105) | get interruptsEnabled() {
function a (line 116) | function a(a) {
function t (line 124) | function t(t) {
method constructor (line 1590) | constructor(t) {
method setAnalogValue (line 1613) | setAnalogValue(t, s) {
function t (line 790) | function t(t, e) {
method constructor (line 1590) | constructor(t) {
method setAnalogValue (line 1613) | setAnalogValue(t, s) {
class R (line 861) | class R {
method constructor (line 862) | constructor(t, o) {
method addListener (line 920) | addListener(t) {
method removeListener (line 923) | removeListener(t) {
method pinState (line 926) | pinState(t) {
method setPin (line 938) | setPin(t, o) {
method updatePinRegister (line 947) | updatePinRegister(t, o) {
method writeGpio (line 950) | writeGpio(t, o) {
function R (line 1097) | function R(t) {
method constructor (line 862) | constructor(t, o) {
method addListener (line 920) | addListener(t) {
method removeListener (line 923) | removeListener(t) {
method pinState (line 926) | pinState(t) {
method setPin (line 938) | setPin(t, o) {
method updatePinRegister (line 947) | updatePinRegister(t, o) {
method writeGpio (line 950) | writeGpio(t, o) {
class g (line 1109) | class g {
method constructor (line 1110) | constructor(t, i) {
method reset (line 1170) | reset() {
method TIFR (line 1173) | get TIFR() {
method TIFR (line 1176) | set TIFR(t) {
method TCCRA (line 1179) | get TCCRA() {
method TCCRB (line 1182) | get TCCRB() {
method TIMSK (line 1185) | get TIMSK() {
method CS (line 1188) | get CS() {
method WGM (line 1191) | get WGM() {
method TOP (line 1195) | get TOP() {
method updateWGMConfig (line 1205) | updateWGMConfig() {
method tick (line 1210) | tick() {
method phasePwmCount (line 1243) | phasePwmCount(t, e) {
method timerUpdated (line 1253) | timerUpdated() {
method updateCompPin (line 1265) | updateCompPin(t, i) {
method updateCompA (line 1282) | updateCompA(t) {
method updateCompB (line 1287) | updateCompB(t) {
class H (line 1339) | class H {
method constructor (line 1340) | constructor(t, i, s) {
method tick (line 1367) | tick() {
method baudRate (line 1394) | get baudRate() {
method bitsPerChar (line 1401) | get bitsPerChar() {
class y (line 1469) | class y {
method constructor (line 1470) | constructor(t) {
method start (line 1473) | start() {
method stop (line 1476) | stop() {
method connectToSlave (line 1479) | connectToSlave() {
method writeByte (line 1482) | writeByte() {
method readByte (line 1485) | readByte() {
class B (line 1490) | class B {
method constructor (line 1491) | constructor(t, c, n) {
method tick (line 1523) | tick() {
method prescaler (line 1534) | get prescaler() {
method sclFrequency (line 1547) | get sclFrequency() {
method completeStart (line 1553) | completeStart() {
method completeStop (line 1556) | completeStop() {
method completeConnect (line 1559) | completeConnect(t) {
method completeWrite (line 1564) | completeWrite(t) {
method completeRead (line 1567) | completeRead(t) {
method status (line 1571) | get status() {
method updateStatus (line 1574) | updateStatus(t) {
class t (line 1589) | class t {
method constructor (line 1590) | constructor(t) {
method setAnalogValue (line 1613) | setAnalogValue(t, s) {
FILE: ArduinoFrontend/src/assets/canvg/index.babel.js
function compressSpaces (line 9) | function compressSpaces(str) {
function trimLeft (line 16) | function trimLeft(str) {
function trimRight (line 23) | function trimRight(str) {
function toNumbers (line 30) | function toNumbers(str) {
function normalizeAttributeName (line 40) | function normalizeAttributeName(name) {
function parseExternalUrl (line 50) | function parseExternalUrl(url) {
function findSelectorMatch (line 67) | function findSelectorMatch(selector, regex) {
function getSelectorSpecificity (line 84) | function getSelectorSpecificity(selector) {
constant PSEUDO_ZERO (line 110) | const PSEUDO_ZERO = .00000001;
function vectorMagnitude (line 114) | function vectorMagnitude(v) {
function vectorsRatio (line 120) | function vectorsRatio(u, v) {
function vectorsAngle (line 126) | function vectorsAngle(u, v) {
function CB1 (line 129) | function CB1(t) {
function CB2 (line 132) | function CB2(t) {
function CB3 (line 135) | function CB3(t) {
function CB4 (line 138) | function CB4(t) {
function QB1 (line 141) | function QB1(t) {
function QB2 (line 144) | function QB2(t) {
function QB3 (line 147) | function QB3(t) {
class Property (line 151) | class Property {
method constructor (line 152) | constructor(document, name, value) {
method empty (line 157) | static empty(document) {
method hasValue (line 160) | hasValue() {
method isString (line 167) | isString(regexp) {
method isUrlDefinition (line 175) | isUrlDefinition() {
method isPixels (line 178) | isPixels() {
method setValue (line 191) | setValue(value) {
method getValue (line 195) | getValue(def) {
method getNumber (line 201) | getNumber(def) {
method getString (line 215) | getString(def) {
method getDpi (line 223) | getDpi() {
method getRem (line 226) | getRem() {
method getEm (line 229) | getEm() {
method getUnits (line 232) | getUnits() {
method getPixels (line 235) | getPixels(axisOrIsFontSize, processPercent = false) {
method getMilliseconds (line 291) | getMilliseconds() {
method getRadians (line 300) | getRadians() {
method getDefinition (line 315) | getDefinition() {
method getFillStyleDefinition (line 326) | getFillStyleDefinition(element, opacity) {
method getTextBaseline (line 348) | getTextBaseline() {
method addOpacity (line 354) | addOpacity(opacity) {
class ViewPort (line 390) | class ViewPort {
method constructor (line 391) | constructor() {
method clear (line 394) | clear() {
method setCurrent (line 397) | setCurrent(width, height) {
method removeCurrent (line 403) | removeCurrent() {
method getCurrent (line 406) | getCurrent() {
method width (line 410) | get width() {
method height (line 413) | get height() {
method computeSize (line 416) | computeSize(d) {
class Point (line 430) | class Point {
method constructor (line 431) | constructor(x, y) {
method parse (line 435) | static parse(point, defaultValue = 0) {
method parsePath (line 439) | static parsePath(path) {
method angleTo (line 448) | angleTo(point) {
method applyTransform (line 451) | applyTransform(transform) {
class Mouse (line 460) | class Mouse {
method constructor (line 461) | constructor(screen) {
method isWorking (line 469) | isWorking() {
method start (line 472) | start() {
method stop (line 482) | stop() {
method hasEvents (line 491) | hasEvents() {
method runEvents (line 494) | runEvents() {
method checkPath (line 514) | checkPath(element, ctx) {
method checkBoundingBox (line 525) | checkBoundingBox(element, boundingBox) {
method mapXY (line 536) | mapXY(x, y) {
method onClick (line 553) | onClick(evt) {
method onMouseMove (line 566) | onMouseMove(evt) {
class Screen (line 587) | class Screen {
method constructor (line 588) | constructor(ctx, { fetch = defaultFetch, window = defaultWindow } = {}) {
method wait (line 605) | wait(checker) {
method ready (line 608) | ready() {
method isReady (line 614) | isReady() {
method setDefaults (line 628) | setDefaults(ctx) {
method setViewBox (line 635) | setViewBox({ document, ctx, aspectRatio, width, desiredWidth, height, ...
method start (line 706) | start(element, { enableRedraw = false, ignoreMouse = false, ignoreAnim...
method stop (line 739) | stop() {
method shouldUpdate (line 746) | shouldUpdate(ignoreAnimation, forceRedraw) {
method render (line 768) | render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight...
class Parser (line 860) | class Parser {
method constructor (line 862) | constructor({ fetch = defaultFetch$1, DOMParser = DefaultDOMParser
method parse (line 869) | async parse(resource) {
method parseFromString (line 875) | parseFromString(xml) {
method load (line 885) | async load(url) {
class Element (line 892) | class Element {
method constructor (line 893) | constructor(document, node, captureTextNodes = false) {
method getAttribute (line 948) | getAttribute(name, createIfNotExists = false) {
method getHrefAttribute (line 957) | getHrefAttribute() {
method getStyle (line 965) | getStyle(name, createIfNotExists = false, skipAncestors = false) {
method render (line 991) | render(ctx) {
method setContext (line 1018) | setContext(_) { }
method clearContext (line 1019) | clearContext(_) { }
method renderChildren (line 1020) | renderChildren(ctx) {
method addChild (line 1025) | addChild(childNode) {
method matchesSelector (line 1034) | matchesSelector(selector) {
method addStylesFromStyleDefinition (line 1049) | addStylesFromStyleDefinition() {
class UnknownElement (line 1075) | class UnknownElement extends Element {
method constructor (line 1076) | constructor(document, node, captureTextNodes) {
function wrapFontFamily (line 1083) | function wrapFontFamily(fontFamily) {
function prepareFontFamily (line 1089) | function prepareFontFamily(fontFamily) {
class Font (line 1098) | class Font {
method constructor (line 1099) | constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, ...
method parse (line 1111) | static parse(font = '', inherit) {
method toString (line 1164) | toString() {
class BoundingBox (line 1179) | class BoundingBox {
method constructor (line 1180) | constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Nu...
method x (line 1188) | get x() {
method y (line 1191) | get y() {
method width (line 1194) | get width() {
method height (line 1197) | get height() {
method addPoint (line 1200) | addPoint(x, y) {
method addX (line 1226) | addX(x) {
method addY (line 1229) | addY(y) {
method addBoundingBox (line 1232) | addBoundingBox({ x1, y1, x2, y2 }) {
method sumCubic (line 1236) | sumCubic(t, p0, p1, p2, p3) {
method bezierCurveAdd (line 1242) | bezierCurveAdd(forX, p0, p1, p2, p3) {
method addBezierCurve (line 1285) | addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {
method addQuadraticCurve (line 1291) | addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {
method isPointInBox (line 1298) | isPointInBox(x, y) {
class Translate (line 1307) | class Translate {
method constructor (line 1308) | constructor(_, point) {
method apply (line 1313) | apply(ctx) {
method unapply (line 1317) | unapply(ctx) {
method applyToPoint (line 1321) | applyToPoint(point) {
class Rotate (line 1334) | class Rotate {
method constructor (line 1335) | constructor(document, rotate, transformOrigin = []) {
method apply (line 1345) | apply(ctx) {
method unapply (line 1351) | unapply(ctx) {
method applyToPoint (line 1357) | applyToPoint(point) {
class Scale (line 1390) | class Scale {
method constructor (line 1391) | constructor(_, scale) {
method apply (line 1403) | apply(ctx) {
method unapply (line 1407) | unapply(ctx) {
method applyToPoint (line 1411) | applyToPoint(point) {
class Matrix (line 1424) | class Matrix {
method constructor (line 1425) | constructor(_, matrix) {
method apply (line 1430) | apply(ctx) {
method unapply (line 1434) | unapply(ctx) {
method applyToPoint (line 1448) | applyToPoint(point) {
class Skew (line 1453) | class Skew extends Matrix {
method constructor (line 1454) | constructor(document, skew) {
class SkewX (line 1462) | class SkewX extends Skew {
method constructor (line 1463) | constructor(document, skew) {
class SkewY (line 1477) | class SkewY extends Skew {
method constructor (line 1478) | constructor(document, skew) {
function parseTransforms (line 1492) | function parseTransforms(transform) {
function parseTransform (line 1499) | function parseTransform(transform) {
class Transform (line 1506) | class Transform {
method constructor (line 1507) | constructor(document, transform, transformOrigin) {
method fromElement (line 1525) | static fromElement(document, element) {
method apply (line 1533) | apply(ctx) {
method unapply (line 1540) | unapply(ctx) {
method applyToPoint (line 1548) | applyToPoint(point) {
class RenderedElement (line 1565) | class RenderedElement extends Element {
method constructor (line 1566) | constructor() {
method calculateOpacity (line 1570) | calculateOpacity() {
method setContext (line 1583) | setContext(ctx, fromMeasure = false) {
method clearContext (line 1725) | clearContext(ctx) {
class TextElement (line 1733) | class TextElement extends RenderedElement {
method constructor (line 1734) | constructor(document, node, captureTextNodes) {
method setContext (line 1743) | setContext(ctx, fromMeasure = false) {
method initializeCoordinates (line 1751) | initializeCoordinates(ctx) {
method getBoundingBox (line 1764) | getBoundingBox(ctx) {
method getFontSize (line 1781) | getFontSize() {
method getTElementBoundingBox (line 1787) | getTElementBoundingBox(ctx) {
method getGlyph (line 1791) | getGlyph(font, text, i) {
method getText (line 1823) | getText() {
method getTextFromNode (line 1826) | getTextFromNode(node) {
method renderChildren (line 1843) | renderChildren(ctx) {
method renderTElementChildren (line 1858) | renderTElementChildren(ctx) {
method getAnchorDelta (line 1914) | getAnchorDelta(ctx, parent, startI) {
method adjustChildCoordinates (line 1933) | adjustChildCoordinates(ctx, textParent, parent, i) {
method getChildBoundingBox (line 1993) | getChildBoundingBox(ctx, textParent, parent, i) {
method renderChild (line 2002) | renderChild(ctx, textParent, parent, i) {
method measureTextRecursive (line 2009) | measureTextRecursive(ctx) {
method measureText (line 2013) | measureText(ctx) {
method measureTargetText (line 2023) | measureTargetText(ctx, targetText) {
class TSpanElement (line 2059) | class TSpanElement extends TextElement {
method constructor (line 2060) | constructor(document, node, captureTextNodes) {
method getText (line 2070) | getText() {
class TextNode (line 2075) | class TextNode extends TSpanElement {
method constructor (line 2076) | constructor() {
function preparePath (line 2082) | function preparePath(path) {
class PathParser (line 2096) | class PathParser {
method constructor (line 2097) | constructor(path) {
method reset (line 2109) | reset() {
method isEnd (line 2119) | isEnd() {
method isCommandOrEnd (line 2123) | isCommandOrEnd() {
method isRelativeCommand (line 2130) | isRelativeCommand() {
method getToken (line 2147) | getToken() {
method getScalar (line 2151) | getScalar() {
method nextCommand (line 2154) | nextCommand() {
method getPoint (line 2158) | getPoint() {
method getAsControlPoint (line 2162) | getAsControlPoint() {
method getAsCurrentPoint (line 2167) | getAsCurrentPoint() {
method getReflectedControlPoint (line 2172) | getReflectedControlPoint() {
method makeAbsolute (line 2185) | makeAbsolute(point) {
method addMarker (line 2193) | addMarker(point, from, priorTo) {
method addMarkerAngle (line 2201) | addMarkerAngle(point, angle) {
method getMarkerPoints (line 2205) | getMarkerPoints() {
method getMarkerAngles (line 2208) | getMarkerAngles() {
class PathElement (line 2225) | class PathElement extends RenderedElement {
method constructor (line 2226) | constructor(document, node, captureTextNodes) {
method path (line 2232) | path(ctx) {
method getBoundingBox (line 2286) | getBoundingBox(_) {
method getMarkers (line 2289) | getMarkers() {
method renderChildren (line 2299) | renderChildren(ctx) {
method pathM (line 2339) | pathM(ctx, boundingBox) {
method pathL (line 2359) | pathL(ctx, boundingBox) {
method pathH (line 2372) | pathH(ctx, boundingBox) {
method pathV (line 2388) | pathV(ctx, boundingBox) {
method pathC (line 2404) | pathC(ctx, boundingBox) {
method pathS (line 2418) | pathS(ctx, boundingBox) {
method pathQ (line 2432) | pathQ(ctx, boundingBox) {
method pathT (line 2445) | pathT(ctx, boundingBox) {
method pathA (line 2459) | pathA(ctx, boundingBox) {
method pathZ (line 2529) | pathZ(ctx, boundingBox) {
class SVGElement (line 2542) | class SVGElement extends RenderedElement {
method constructor (line 2543) | constructor() {
method clearContext (line 2548) | clearContext(ctx) {
method setContext (line 2552) | setContext(ctx) {
method resize (line 2641) | resize(width, height = width, preserveAspectRatio = false) {
class RectElement (line 2677) | class RectElement extends PathElement {
method constructor (line 2678) | constructor() {
method path (line 2682) | path(ctx) {
method getMarkers (line 2717) | getMarkers() {
class CircleElement (line 2722) | class CircleElement extends PathElement {
method constructor (line 2723) | constructor() {
method path (line 2727) | path(ctx) {
method getMarkers (line 2738) | getMarkers() {
class EllipseElement (line 2743) | class EllipseElement extends PathElement {
method constructor (line 2744) | constructor() {
method path (line 2748) | path(ctx) {
method getMarkers (line 2765) | getMarkers() {
class LineElement (line 2770) | class LineElement extends PathElement {
method constructor (line 2771) | constructor() {
method getPoints (line 2775) | getPoints() {
method path (line 2781) | path(ctx) {
method getMarkers (line 2790) | getMarkers() {
class PolylineElement (line 2800) | class PolylineElement extends PathElement {
method constructor (line 2801) | constructor(document, node, captureTextNodes) {
method path (line 2807) | path(ctx) {
method getMarkers (line 2823) | getMarkers() {
class PolygonElement (line 2846) | class PolygonElement extends PolylineElement {
method constructor (line 2847) | constructor() {
method path (line 2851) | path(ctx) {
class PatternElement (line 2862) | class PatternElement extends Element {
method constructor (line 2863) | constructor() {
method createPattern (line 2867) | createPattern(ctx, _, parentOpacityProp) {
class MarkerElement (line 2905) | class MarkerElement extends Element {
method constructor (line 2906) | constructor() {
method render (line 2910) | render(ctx, point, angle) {
class DefsElement (line 2949) | class DefsElement extends Element {
method constructor (line 2950) | constructor() {
method render (line 2954) | render() {
class GElement (line 2959) | class GElement extends RenderedElement {
method constructor (line 2960) | constructor() {
method getBoundingBox (line 2964) | getBoundingBox(ctx) {
class GradientElement (line 2973) | class GradientElement extends Element {
method constructor (line 2974) | constructor(document, node, captureTextNodes) {
method getGradientUnits (line 2987) | getGradientUnits() {
method createGradient (line 2990) | createGradient(ctx, element, parentOpacityProp) {
method inheritStopContainer (line 3032) | inheritStopContainer(stopsContainer) {
method addParentOpacity (line 3041) | addParentOpacity(parentOpacityProp, color) {
class LinearGradientElement (line 3050) | class LinearGradientElement extends GradientElement {
method constructor (line 3051) | constructor(document, node, captureTextNodes) {
method getGradient (line 3056) | getGradient(ctx, element) {
class RadialGradientElement (line 3088) | class RadialGradientElement extends GradientElement {
method constructor (line 3089) | constructor(document, node, captureTextNodes) {
method getGradient (line 3094) | getGradient(ctx, element) {
class StopElement (line 3131) | class StopElement extends Element {
method constructor (line 3132) | constructor(document, node, captureTextNodes) {
class AnimateElement (line 3149) | class AnimateElement extends Element {
method constructor (line 3150) | constructor(document, node, captureTextNodes) {
method getProperty (line 3168) | getProperty() {
method calcValue (line 3176) | calcValue() {
method update (line 3186) | update(delta) {
method getProgress (line 3232) | getProgress() {
class AnimateColorElement (line 3253) | class AnimateColorElement extends AnimateElement {
method constructor (line 3254) | constructor() {
method calcValue (line 3258) | calcValue() {
class AnimateTransformElement (line 3274) | class AnimateTransformElement extends AnimateElement {
method constructor (line 3275) | constructor() {
method calcValue (line 3279) | calcValue() {
class FontElement (line 3292) | class FontElement extends Element {
method constructor (line 3293) | constructor(document, node, captureTextNodes) {
method render (line 3331) | render() {
class FontFaceElement (line 3336) | class FontFaceElement extends Element {
method constructor (line 3337) | constructor(document, node, captureTextNodes) {
class MissingGlyphElement (line 3346) | class MissingGlyphElement extends PathElement {
method constructor (line 3347) | constructor() {
class GlyphElement (line 3354) | class GlyphElement extends PathElement {
method constructor (line 3355) | constructor(document, node, captureTextNodes) {
class TRefElement (line 3364) | class TRefElement extends TextElement {
method constructor (line 3365) | constructor() {
method getText (line 3369) | getText() {
class AElement (line 3381) | class AElement extends TextElement {
method constructor (line 3382) | constructor(document, node, captureTextNodes) {
method getText (line 3394) | getText() {
method renderChildren (line 3397) | renderChildren(ctx) {
method onClick (line 3417) | onClick() {
method onMouseMove (line 3423) | onMouseMove() {
class TextPathElement (line 3429) | class TextPathElement extends TextElement {
method constructor (line 3430) | constructor(document, node, captureTextNodes) {
method getText (line 3443) | getText() {
method path (line 3446) | path(ctx) {
method renderChildren (line 3504) | renderChildren(ctx) {
method getLetterSpacingAt (line 3552) | getLetterSpacingAt(idx = 0) {
method findSegmentToFitChar (line 3555) | findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spaces...
method measureText (line 3577) | measureText(ctx, text) {
method setTextData (line 3590) | setTextData(ctx) {
method parsePathData (line 3663) | parsePathData(path) {
method pathM (line 3743) | pathM(pathParser, points) {
method pathL (line 3754) | pathL(pathParser, points) {
method pathH (line 3761) | pathH(pathParser, points) {
method pathV (line 3772) | pathV(pathParser, points) {
method pathC (line 3783) | pathC(pathParser, points) {
method pathS (line 3791) | pathS(pathParser, points) {
method pathQ (line 3800) | pathQ(pathParser, points) {
method pathT (line 3807) | pathT(pathParser, points) {
method pathA (line 3816) | pathA(pathParser) {
method calcLength (line 3883) | calcLength(x, y, cmd, points) {
method getPointOnLine (line 3946) | getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX = P1x, fromY = P1y) {
method getPointOnPath (line 3992) | getPointOnPath(distance) {
method getLineLength (line 4049) | getLineLength(x1, y1, x2, y2) {
method getPathLength (line 4053) | getPathLength() {
method getPointOnCubicBezier (line 4061) | getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {
method getPointOnQuadraticBezier (line 4069) | getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {
method getPointOnEllipticalArc (line 4077) | getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {
method buildEquidistantCache (line 4090) | buildEquidistantCache(inputStep, inputPrecision) {
method getEquidistantPointOnPath (line 4123) | getEquidistantPointOnPath(targetDistance, step, precision) {
class ImageElement (line 4136) | class ImageElement extends RenderedElement {
method constructor (line 4137) | constructor(document, node, captureTextNodes) {
method loadImage (line 4155) | async loadImage(href) {
method loadSvg (line 4166) | async loadSvg(href) {
method renderChildren (line 4178) | renderChildren(ctx) {
method getBoundingBox (line 4219) | getBoundingBox() {
class SymbolElement (line 4228) | class SymbolElement extends RenderedElement {
method constructor (line 4229) | constructor() {
method render (line 4233) | render(_) {
class SVGFontLoader (line 4238) | class SVGFontLoader {
method constructor (line 4239) | constructor(document) {
method load (line 4244) | async load(fontFamily, url) {
class StyleElement (line 4262) | class StyleElement extends Element {
method constructor (line 4263) | constructor(document, node, captureTextNodes) {
class UseElement (line 4314) | class UseElement extends RenderedElement {
method constructor (line 4315) | constructor() {
method setContext (line 4319) | setContext(ctx) {
method path (line 4330) | path(ctx) {
method renderChildren (line 4336) | renderChildren(ctx) {
method getBoundingBox (line 4365) | getBoundingBox(ctx) {
method elementTransform (line 4372) | elementTransform() {
method element (line 4376) | get element() {
function imGet (line 4384) | function imGet(img, x, y, width, _, rgba) {
function imSet (line 4387) | function imSet(img, x, y, width, _, rgba, val) {
function m (line 4390) | function m(matrix, i, v) {
function c (line 4394) | function c(a, m1, m2, m3) {
class FeColorMatrixElement (line 4397) | class FeColorMatrixElement extends Element {
method constructor (line 4398) | constructor(document, node, captureTextNodes) {
method apply (line 4438) | apply(ctx, _, __, width, height) {
class MaskElement (line 4467) | class MaskElement extends Element {
method constructor (line 4468) | constructor() {
method apply (line 4472) | apply(ctx, element) {
method render (line 4519) | render(_) {
class ClipPathElement (line 4525) | class ClipPathElement extends Element {
method constructor (line 4526) | constructor() {
method apply (line 4530) | apply(ctx) {
method render (line 4567) | render(_) {
class FilterElement (line 4572) | class FilterElement extends Element {
method constructor (line 4573) | constructor() {
method apply (line 4577) | apply(ctx, element) {
method render (line 4611) | render(_) {
class FeDropShadowElement (line 4616) | class FeDropShadowElement extends Element {
method constructor (line 4617) | constructor(document, node, captureTextNodes) {
method apply (line 4622) | apply(_, __, ___, ____, _____) {
class FeMorphologyElement (line 4627) | class FeMorphologyElement extends Element {
method constructor (line 4628) | constructor() {
method apply (line 4632) | apply(_, __, ___, ____, _____) {
class FeCompositeElement (line 4637) | class FeCompositeElement extends Element {
method constructor (line 4638) | constructor() {
method apply (line 4642) | apply(_, __, ___, ____, _____) {
class FeGaussianBlurElement (line 4647) | class FeGaussianBlurElement extends Element {
method constructor (line 4648) | constructor(document, node, captureTextNodes) {
method apply (line 4654) | apply(ctx, x, y, width, height) {
class TitleElement (line 4673) | class TitleElement extends Element {
method constructor (line 4674) | constructor() {
class DescElement (line 4680) | class DescElement extends Element {
method constructor (line 4681) | constructor() {
function createCanvas (line 4731) | function createCanvas(width, height) {
function createImage (line 4737) | async function createImage(src) {
class Document (line 4750) | class Document {
method constructor (line 4751) | constructor(canvg, { rootEmSize = 12, emSize = 12, createCanvas = Docu...
method window (line 4768) | get window() {
method fetch (line 4771) | get fetch() {
method ctx (line 4774) | get ctx() {
method emSize (line 4777) | get emSize() {
method emSize (line 4781) | set emSize(value) {
method popEmSize (line 4785) | popEmSize() {
method getUniqueId (line 4789) | getUniqueId() {
method isImagesLoaded (line 4792) | isImagesLoaded() {
method isFontsLoaded (line 4795) | isFontsLoaded() {
method createDocumentElement (line 4798) | createDocumentElement(document) {
method createElement (line 4805) | createElement(node) {
method createTextNode (line 4813) | createTextNode(node) {
method setViewBox (line 4816) | setViewBox(config) {
class Canvg (line 4830) | class Canvg {
method constructor (line 4837) | constructor(ctx, svg, options = {}) {
method from (line 4852) | static async from(ctx, svg, options = {}) {
method fromString (line 4863) | static fromString(ctx, svg, options = {}) {
method fork (line 4874) | fork(ctx, svg, options = {}) {
method forkString (line 4886) | forkString(ctx, svg, options = {}) {
method ready (line 4895) | ready() {
method isReady (line 4901) | isReady() {
method render (line 4908) | async render(options = {}) {
method start (line 4922) | start(options = {}) {
method stop (line 4933) | stop() {
method resize (line 4942) | resize(width, height = width, preserveAspectRatio = false) {
function offscreen (line 4950) | function offscreen() {
function node (line 4974) | function node({ DOMParser, canvas, fetch }) {
FILE: ArduinoFrontend/src/assets/canvg/index.es.js
function compressSpaces (line 60) | function compressSpaces(str) {
function trimLeft (line 68) | function trimLeft(str) {
function trimRight (line 76) | function trimRight(str) {
function toNumbers (line 84) | function toNumbers(str) {
function normalizeAttributeName (line 95) | function normalizeAttributeName(name) {
function parseExternalUrl (line 107) | function parseExternalUrl(url) {
function findSelectorMatch (line 125) | function findSelectorMatch(selector, regex) {
function getSelectorSpecificity (line 140) | function getSelectorSpecificity(selector) {
function vectorMagnitude (line 210) | function vectorMagnitude(v) {
function vectorsRatio (line 217) | function vectorsRatio(u, v) {
function vectorsAngle (line 224) | function vectorsAngle(u, v) {
function CB1 (line 227) | function CB1(t) {
function CB2 (line 230) | function CB2(t) {
function CB3 (line 233) | function CB3(t) {
function CB4 (line 236) | function CB4(t) {
function QB1 (line 239) | function QB1(t) {
function QB2 (line 242) | function QB2(t) {
function QB3 (line 245) | function QB3(t) {
function createCommonjsModule (line 249) | function createCommonjsModule(fn, module) {
function wrap (line 271) | function wrap(innerFn, outerFn, self, tryLocsList) {
function tryCatch (line 293) | function tryCatch(fn, obj, arg) {
function Generator (line 318) | function Generator() {}
function GeneratorFunction (line 320) | function GeneratorFunction() {}
function GeneratorFunctionPrototype (line 322) | function GeneratorFunctionPrototype() {} // This is a polyfill for %Iter...
function defineIteratorMethods (line 347) | function defineIteratorMethods(prototype) {
function AsyncIterator (line 387) | function AsyncIterator(generator, PromiseImpl) {
function makeInvokeMethod (line 469) | function makeInvokeMethod(innerFn, self, context) {
function maybeInvokeDelegate (line 547) | function maybeInvokeDelegate(delegate, context) {
function pushTryEntry (line 640) | function pushTryEntry(locs) {
function resetTryEntry (line 657) | function resetTryEntry(entry) {
function Context (line 664) | function Context(tryLocsList) {
function values (line 704) | function values(iterable) {
function doneResult (line 744) | function doneResult() {
function handle (line 792) | function handle(loc, caught) {
function Property (line 962) | function Property(document, name, value) {
function ViewPort (line 1289) | function ViewPort() {
function Point (line 1352) | function Point(x, y) {
function Mouse (line 1407) | function Mouse(screen) {
function Screen (line 1590) | function Screen(ctx) {
function Parser (line 1997) | function Parser() {
function parse (line 2036) | function parse(_x) {
function load (line 2083) | function load(_x2) {
function Element (line 2095) | function Element(document, node) {
function _createSuper (line 2345) | function _createSuper(Derived) { return function () { var Super = _getPr...
function _isNativeReflectConstruct (line 2347) | function _isNativeReflectConstruct() { if (typeof Reflect === "undefined...
function UnknownElement (line 2354) | function UnknownElement(document, node, captureTextNodes) {
function wrapFontFamily (line 2368) | function wrapFontFamily(fontFamily) {
function prepareFontFamily (line 2373) | function prepareFontFamily(fontFamily) {
function Font (line 2378) | function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, ...
function BoundingBox (line 2474) | function BoundingBox() {
function Translate (line 2656) | function Translate(_, point) {
function Rotate (line 2694) | function Rotate(document, rotate) {
function Scale (line 2751) | function Scale(_, scale) {
function Matrix (line 2796) | function Matrix(_, matrix) {
function _createSuper$1 (line 2836) | function _createSuper$1(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$1 (line 2838) | function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefin...
function Skew (line 2845) | function Skew(document, skew) {
function _createSuper$2 (line 2860) | function _createSuper$2(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$2 (line 2862) | function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefin...
function SkewX (line 2869) | function SkewX(document, skew) {
function _createSuper$3 (line 2883) | function _createSuper$3(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$3 (line 2885) | function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefin...
function SkewY (line 2892) | function SkewY(document, skew) {
function parseTransforms (line 2906) | function parseTransforms(transform) {
function parseTransform (line 2910) | function parseTransform(transform) {
function Transform (line 2920) | function Transform(document, transform, transformOrigin) {
function _createSuper$4 (line 3003) | function _createSuper$4(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$4 (line 3005) | function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefin...
function RenderedElement (line 3012) | function RenderedElement() {
function _createSuper$5 (line 3217) | function _createSuper$5(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$5 (line 3219) | function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefin...
function TextElement (line 3226) | function TextElement(document, node, captureTextNodes) {
function _createSuper$6 (line 3651) | function _createSuper$6(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$6 (line 3653) | function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefin...
function TSpanElement (line 3660) | function TSpanElement(document, node, captureTextNodes) {
function _createSuper$7 (line 3682) | function _createSuper$7(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$7 (line 3684) | function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefin...
function TextNode (line 3691) | function TextNode() {
function preparePath (line 3704) | function preparePath(path) {
function PathParser (line 3720) | function PathParser(path) {
function _createSuper$8 (line 3901) | function _createSuper$8(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$8 (line 3903) | function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefin...
function PathElement (line 3910) | function PathElement(document, node, captureTextNodes) {
function _createSuper$9 (line 4310) | function _createSuper$9(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$9 (line 4312) | function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefin...
function SVGElement (line 4319) | function SVGElement() {
function _createSuper$a (line 4491) | function _createSuper$a(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$a (line 4493) | function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefin...
function RectElement (line 4500) | function RectElement() {
function _createSuper$b (line 4563) | function _createSuper$b(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$b (line 4565) | function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefin...
function CircleElement (line 4572) | function CircleElement() {
function _createSuper$c (line 4607) | function _createSuper$c(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$c (line 4609) | function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefin...
function EllipseElement (line 4616) | function EllipseElement() {
function _createSuper$d (line 4657) | function _createSuper$d(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$d (line 4659) | function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefin...
function LineElement (line 4666) | function LineElement() {
function _createSuper$e (line 4717) | function _createSuper$e(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$e (line 4719) | function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefin...
function PolylineElement (line 4726) | function PolylineElement(document, node, captureTextNodes) {
function _createSuper$f (line 4791) | function _createSuper$f(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$f (line 4793) | function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefin...
function PolygonElement (line 4800) | function PolygonElement() {
function _createSuper$g (line 4832) | function _createSuper$g(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$g (line 4834) | function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefin...
function PatternElement (line 4841) | function PatternElement() {
function _createSuper$h (line 4897) | function _createSuper$h(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$h (line 4899) | function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefin...
function MarkerElement (line 4906) | function MarkerElement() {
function _createSuper$i (line 4968) | function _createSuper$i(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$i (line 4970) | function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefin...
function DefsElement (line 4977) | function DefsElement() {
function _createSuper$j (line 4996) | function _createSuper$j(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$j (line 4998) | function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefin...
function GElement (line 5005) | function GElement() {
function _createSuper$k (line 5029) | function _createSuper$k(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$k (line 5031) | function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefin...
function GradientElement (line 5038) | function GradientElement(document, node, captureTextNodes) {
function _createSuper$l (line 5148) | function _createSuper$l(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$l (line 5150) | function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefin...
function LinearGradientElement (line 5157) | function LinearGradientElement(document, node, captureTextNodes) {
function _createSuper$m (line 5198) | function _createSuper$m(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$m (line 5200) | function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefin...
function RadialGradientElement (line 5207) | function RadialGradientElement(document, node, captureTextNodes) {
function _createSuper$n (line 5259) | function _createSuper$n(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$n (line 5261) | function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefin...
function StopElement (line 5268) | function StopElement(document, node, captureTextNodes) {
function _createSuper$o (line 5297) | function _createSuper$o(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$o (line 5299) | function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefin...
function AnimateElement (line 5306) | function AnimateElement(document, node, captureTextNodes) {
function _createSuper$p (line 5442) | function _createSuper$p(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$p (line 5444) | function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefin...
function AnimateColorElement (line 5451) | function AnimateColorElement() {
function _createSuper$q (line 5488) | function _createSuper$q(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$q (line 5490) | function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefin...
function AnimateTransformElement (line 5497) | function AnimateTransformElement() {
function _createForOfIteratorHelper (line 5529) | function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefine...
function _unsupportedIterableToArray (line 5531) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty...
function _arrayLikeToArray (line 5533) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng...
function _createSuper$r (line 5535) | function _createSuper$r(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$r (line 5537) | function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefin...
function FontElement (line 5544) | function FontElement(document, node, captureTextNodes) {
function _createSuper$s (line 5623) | function _createSuper$s(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$s (line 5625) | function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefin...
function FontFaceElement (line 5632) | function FontFaceElement(document, node, captureTextNodes) {
function _createSuper$t (line 5648) | function _createSuper$t(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$t (line 5650) | function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefin...
function MissingGlyphElement (line 5657) | function MissingGlyphElement() {
function _createSuper$u (line 5671) | function _createSuper$u(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$u (line 5673) | function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefin...
function GlyphElement (line 5680) | function GlyphElement(document, node, captureTextNodes) {
function _createSuper$v (line 5696) | function _createSuper$v(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$v (line 5698) | function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefin...
function TRefElement (line 5705) | function TRefElement() {
function _createSuper$w (line 5735) | function _createSuper$w(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$w (line 5737) | function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefin...
function AElement (line 5744) | function AElement(document, node, captureTextNodes) {
function _createForOfIteratorHelper$1 (line 5810) | function _createForOfIteratorHelper$1(o) { if (typeof Symbol === "undefi...
function _unsupportedIterableToArray$1 (line 5812) | function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (...
function _arrayLikeToArray$1 (line 5814) | function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.le...
function _createSuper$x (line 5816) | function _createSuper$x(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$x (line 5818) | function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefin...
function TextPathElement (line 5825) | function TextPathElement(document, node, captureTextNodes) {
function _createSuper$y (line 6704) | function _createSuper$y(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$y (line 6706) | function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefin...
function ImageElement (line 6713) | function ImageElement(document, node, captureTextNodes) {
function loadImage (line 6777) | function loadImage(_x) {
function loadSvg (line 6824) | function loadSvg(_x2) {
function _createSuper$z (line 6891) | function _createSuper$z(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$z (line 6893) | function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefin...
function SymbolElement (line 6900) | function SymbolElement() {
function SVGFontLoader (line 6920) | function SVGFontLoader(document) {
function load (line 6969) | function load(_x, _x2) {
function _createSuper$A (line 6980) | function _createSuper$A(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$A (line 6982) | function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefin...
function StyleElement (line 6989) | function StyleElement(document, node, captureTextNodes) {
function _createSuper$B (line 7054) | function _createSuper$B(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$B (line 7056) | function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefin...
function UseElement (line 7063) | function UseElement() {
function _createSuper$C (line 7167) | function _createSuper$C(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$C (line 7169) | function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefin...
function imGet (line 7171) | function imGet(img, x, y, width, _, rgba) {
function imSet (line 7175) | function imSet(img, x, y, width, _, rgba, val) {
function m (line 7179) | function m(matrix, i, v) {
function c (line 7184) | function c(a, m1, m2, m3) {
function FeColorMatrixElement (line 7193) | function FeColorMatrixElement(document, node, captureTextNodes) {
function _createSuper$D (line 7267) | function _createSuper$D(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$D (line 7269) | function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefin...
function MaskElement (line 7276) | function MaskElement() {
function _createSuper$E (line 7349) | function _createSuper$E(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$E (line 7351) | function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefin...
function ClipPathElement (line 7360) | function ClipPathElement() {
function _createSuper$F (line 7426) | function _createSuper$F(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$F (line 7428) | function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefin...
function FilterElement (line 7435) | function FilterElement() {
function _createSuper$G (line 7490) | function _createSuper$G(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$G (line 7492) | function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefin...
function FeDropShadowElement (line 7499) | function FeDropShadowElement(document, node, captureTextNodes) {
function _createSuper$H (line 7521) | function _createSuper$H(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$H (line 7523) | function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefin...
function FeMorphologyElement (line 7530) | function FeMorphologyElement() {
function _createSuper$I (line 7549) | function _createSuper$I(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$I (line 7551) | function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefin...
function FeCompositeElement (line 7558) | function FeCompositeElement() {
function _createSuper$J (line 7577) | function _createSuper$J(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$J (line 7579) | function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefin...
function FeGaussianBlurElement (line 7586) | function FeGaussianBlurElement(document, node, captureTextNodes) {
function _createSuper$K (line 7624) | function _createSuper$K(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$K (line 7626) | function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefin...
function TitleElement (line 7633) | function TitleElement() {
function _createSuper$L (line 7646) | function _createSuper$L(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$L (line 7648) | function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefin...
function DescElement (line 7655) | function DescElement() {
function ownKeys (line 7712) | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object...
function _objectSpread (line 7714) | function _objectSpread(target) { for (var i = 1; i < arguments.length; i...
function createCanvas (line 7716) | function createCanvas(width, height) {
function createImage (line 7723) | function createImage(_x) {
function _createImage (line 7727) | function _createImage() {
function Document (line 7759) | function Document(canvg) {
function ownKeys$1 (line 7880) | function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(obje...
function _objectSpread$1 (line 7882) | function _objectSpread$1(target) { for (var i = 1; i < arguments.length;...
function Canvg (line 7894) | function Canvg(ctx, svg) {
function render (line 7994) | function render() {
function from (line 8068) | function from(_x, _x2) {
function offscreen (line 8097) | function offscreen() {
function node (line 8147) | function node(_ref) {
FILE: ArduinoFrontend/src/assets/canvg/index.js
function _interopDefault (line 5) | function _interopDefault (ex) { return (ex && (typeof ex === 'object') &...
function compressSpaces (line 66) | function compressSpaces(str) {
function trimLeft (line 74) | function trimLeft(str) {
function trimRight (line 82) | function trimRight(str) {
function toNumbers (line 90) | function toNumbers(str) {
function normalizeAttributeName (line 101) | function normalizeAttributeName(name) {
function parseExternalUrl (line 113) | function parseExternalUrl(url) {
function findSelectorMatch (line 131) | function findSelectorMatch(selector, regex) {
function getSelectorSpecificity (line 146) | function getSelectorSpecificity(selector) {
function vectorMagnitude (line 216) | function vectorMagnitude(v) {
function vectorsRatio (line 223) | function vectorsRatio(u, v) {
function vectorsAngle (line 230) | function vectorsAngle(u, v) {
function CB1 (line 233) | function CB1(t) {
function CB2 (line 236) | function CB2(t) {
function CB3 (line 239) | function CB3(t) {
function CB4 (line 242) | function CB4(t) {
function QB1 (line 245) | function QB1(t) {
function QB2 (line 248) | function QB2(t) {
function QB3 (line 251) | function QB3(t) {
function createCommonjsModule (line 255) | function createCommonjsModule(fn, module) {
function wrap (line 277) | function wrap(innerFn, outerFn, self, tryLocsList) {
function tryCatch (line 299) | function tryCatch(fn, obj, arg) {
function Generator (line 324) | function Generator() {}
function GeneratorFunction (line 326) | function GeneratorFunction() {}
function GeneratorFunctionPrototype (line 328) | function GeneratorFunctionPrototype() {} // This is a polyfill for %Iter...
function defineIteratorMethods (line 353) | function defineIteratorMethods(prototype) {
function AsyncIterator (line 393) | function AsyncIterator(generator, PromiseImpl) {
function makeInvokeMethod (line 475) | function makeInvokeMethod(innerFn, self, context) {
function maybeInvokeDelegate (line 553) | function maybeInvokeDelegate(delegate, context) {
function pushTryEntry (line 646) | function pushTryEntry(locs) {
function resetTryEntry (line 663) | function resetTryEntry(entry) {
function Context (line 670) | function Context(tryLocsList) {
function values (line 710) | function values(iterable) {
function doneResult (line 750) | function doneResult() {
function handle (line 798) | function handle(loc, caught) {
function Property (line 968) | function Property(document, name, value) {
function ViewPort (line 1295) | function ViewPort() {
function Point (line 1358) | function Point(x, y) {
function Mouse (line 1413) | function Mouse(screen) {
function Screen (line 1596) | function Screen(ctx) {
function Parser (line 2003) | function Parser() {
function parse (line 2042) | function parse(_x) {
function load (line 2089) | function load(_x2) {
function Element (line 2101) | function Element(document, node) {
function _createSuper (line 2351) | function _createSuper(Derived) { return function () { var Super = _getPr...
function _isNativeReflectConstruct (line 2353) | function _isNativeReflectConstruct() { if (typeof Reflect === "undefined...
function UnknownElement (line 2360) | function UnknownElement(document, node, captureTextNodes) {
function wrapFontFamily (line 2374) | function wrapFontFamily(fontFamily) {
function prepareFontFamily (line 2379) | function prepareFontFamily(fontFamily) {
function Font (line 2384) | function Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, ...
function BoundingBox (line 2480) | function BoundingBox() {
function Translate (line 2662) | function Translate(_, point) {
function Rotate (line 2700) | function Rotate(document, rotate) {
function Scale (line 2757) | function Scale(_, scale) {
function Matrix (line 2802) | function Matrix(_, matrix) {
function _createSuper$1 (line 2842) | function _createSuper$1(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$1 (line 2844) | function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefin...
function Skew (line 2851) | function Skew(document, skew) {
function _createSuper$2 (line 2866) | function _createSuper$2(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$2 (line 2868) | function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefin...
function SkewX (line 2875) | function SkewX(document, skew) {
function _createSuper$3 (line 2889) | function _createSuper$3(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$3 (line 2891) | function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefin...
function SkewY (line 2898) | function SkewY(document, skew) {
function parseTransforms (line 2912) | function parseTransforms(transform) {
function parseTransform (line 2916) | function parseTransform(transform) {
function Transform (line 2926) | function Transform(document, transform, transformOrigin) {
function _createSuper$4 (line 3009) | function _createSuper$4(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$4 (line 3011) | function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefin...
function RenderedElement (line 3018) | function RenderedElement() {
function _createSuper$5 (line 3223) | function _createSuper$5(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$5 (line 3225) | function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefin...
function TextElement (line 3232) | function TextElement(document, node, captureTextNodes) {
function _createSuper$6 (line 3657) | function _createSuper$6(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$6 (line 3659) | function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefin...
function TSpanElement (line 3666) | function TSpanElement(document, node, captureTextNodes) {
function _createSuper$7 (line 3688) | function _createSuper$7(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$7 (line 3690) | function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefin...
function TextNode (line 3697) | function TextNode() {
function preparePath (line 3710) | function preparePath(path) {
function PathParser (line 3726) | function PathParser(path) {
function _createSuper$8 (line 3907) | function _createSuper$8(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$8 (line 3909) | function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefin...
function PathElement (line 3916) | function PathElement(document, node, captureTextNodes) {
function _createSuper$9 (line 4316) | function _createSuper$9(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$9 (line 4318) | function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefin...
function SVGElement (line 4325) | function SVGElement() {
function _createSuper$a (line 4497) | function _createSuper$a(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$a (line 4499) | function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefin...
function RectElement (line 4506) | function RectElement() {
function _createSuper$b (line 4569) | function _createSuper$b(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$b (line 4571) | function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefin...
function CircleElement (line 4578) | function CircleElement() {
function _createSuper$c (line 4613) | function _createSuper$c(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$c (line 4615) | function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefin...
function EllipseElement (line 4622) | function EllipseElement() {
function _createSuper$d (line 4663) | function _createSuper$d(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$d (line 4665) | function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefin...
function LineElement (line 4672) | function LineElement() {
function _createSuper$e (line 4723) | function _createSuper$e(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$e (line 4725) | function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefin...
function PolylineElement (line 4732) | function PolylineElement(document, node, captureTextNodes) {
function _createSuper$f (line 4797) | function _createSuper$f(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$f (line 4799) | function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefin...
function PolygonElement (line 4806) | function PolygonElement() {
function _createSuper$g (line 4838) | function _createSuper$g(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$g (line 4840) | function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefin...
function PatternElement (line 4847) | function PatternElement() {
function _createSuper$h (line 4903) | function _createSuper$h(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$h (line 4905) | function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefin...
function MarkerElement (line 4912) | function MarkerElement() {
function _createSuper$i (line 4974) | function _createSuper$i(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$i (line 4976) | function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefin...
function DefsElement (line 4983) | function DefsElement() {
function _createSuper$j (line 5002) | function _createSuper$j(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$j (line 5004) | function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefin...
function GElement (line 5011) | function GElement() {
function _createSuper$k (line 5035) | function _createSuper$k(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$k (line 5037) | function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefin...
function GradientElement (line 5044) | function GradientElement(document, node, captureTextNodes) {
function _createSuper$l (line 5154) | function _createSuper$l(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$l (line 5156) | function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefin...
function LinearGradientElement (line 5163) | function LinearGradientElement(document, node, captureTextNodes) {
function _createSuper$m (line 5204) | function _createSuper$m(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$m (line 5206) | function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefin...
function RadialGradientElement (line 5213) | function RadialGradientElement(document, node, captureTextNodes) {
function _createSuper$n (line 5265) | function _createSuper$n(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$n (line 5267) | function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefin...
function StopElement (line 5274) | function StopElement(document, node, captureTextNodes) {
function _createSuper$o (line 5303) | function _createSuper$o(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$o (line 5305) | function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefin...
function AnimateElement (line 5312) | function AnimateElement(document, node, captureTextNodes) {
function _createSuper$p (line 5448) | function _createSuper$p(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$p (line 5450) | function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefin...
function AnimateColorElement (line 5457) | function AnimateColorElement() {
function _createSuper$q (line 5494) | function _createSuper$q(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$q (line 5496) | function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefin...
function AnimateTransformElement (line 5503) | function AnimateTransformElement() {
function _createForOfIteratorHelper (line 5535) | function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefine...
function _unsupportedIterableToArray (line 5537) | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (ty...
function _arrayLikeToArray (line 5539) | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.leng...
function _createSuper$r (line 5541) | function _createSuper$r(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$r (line 5543) | function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefin...
function FontElement (line 5550) | function FontElement(document, node, captureTextNodes) {
function _createSuper$s (line 5629) | function _createSuper$s(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$s (line 5631) | function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefin...
function FontFaceElement (line 5638) | function FontFaceElement(document, node, captureTextNodes) {
function _createSuper$t (line 5654) | function _createSuper$t(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$t (line 5656) | function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefin...
function MissingGlyphElement (line 5663) | function MissingGlyphElement() {
function _createSuper$u (line 5677) | function _createSuper$u(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$u (line 5679) | function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefin...
function GlyphElement (line 5686) | function GlyphElement(document, node, captureTextNodes) {
function _createSuper$v (line 5702) | function _createSuper$v(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$v (line 5704) | function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefin...
function TRefElement (line 5711) | function TRefElement() {
function _createSuper$w (line 5741) | function _createSuper$w(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$w (line 5743) | function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefin...
function AElement (line 5750) | function AElement(document, node, captureTextNodes) {
function _createForOfIteratorHelper$1 (line 5816) | function _createForOfIteratorHelper$1(o) { if (typeof Symbol === "undefi...
function _unsupportedIterableToArray$1 (line 5818) | function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (...
function _arrayLikeToArray$1 (line 5820) | function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.le...
function _createSuper$x (line 5822) | function _createSuper$x(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$x (line 5824) | function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefin...
function TextPathElement (line 5831) | function TextPathElement(document, node, captureTextNodes) {
function _createSuper$y (line 6710) | function _createSuper$y(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$y (line 6712) | function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefin...
function ImageElement (line 6719) | function ImageElement(document, node, captureTextNodes) {
function loadImage (line 6783) | function loadImage(_x) {
function loadSvg (line 6830) | function loadSvg(_x2) {
function _createSuper$z (line 6897) | function _createSuper$z(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$z (line 6899) | function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefin...
function SymbolElement (line 6906) | function SymbolElement() {
function SVGFontLoader (line 6926) | function SVGFontLoader(document) {
function load (line 6975) | function load(_x, _x2) {
function _createSuper$A (line 6986) | function _createSuper$A(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$A (line 6988) | function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefin...
function StyleElement (line 6995) | function StyleElement(document, node, captureTextNodes) {
function _createSuper$B (line 7060) | function _createSuper$B(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$B (line 7062) | function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefin...
function UseElement (line 7069) | function UseElement() {
function _createSuper$C (line 7173) | function _createSuper$C(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$C (line 7175) | function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefin...
function imGet (line 7177) | function imGet(img, x, y, width, _, rgba) {
function imSet (line 7181) | function imSet(img, x, y, width, _, rgba, val) {
function m (line 7185) | function m(matrix, i, v) {
function c (line 7190) | function c(a, m1, m2, m3) {
function FeColorMatrixElement (line 7199) | function FeColorMatrixElement(document, node, captureTextNodes) {
function _createSuper$D (line 7273) | function _createSuper$D(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$D (line 7275) | function _isNativeReflectConstruct$D() { if (typeof Reflect === "undefin...
function MaskElement (line 7282) | function MaskElement() {
function _createSuper$E (line 7355) | function _createSuper$E(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$E (line 7357) | function _isNativeReflectConstruct$E() { if (typeof Reflect === "undefin...
function ClipPathElement (line 7366) | function ClipPathElement() {
function _createSuper$F (line 7432) | function _createSuper$F(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$F (line 7434) | function _isNativeReflectConstruct$F() { if (typeof Reflect === "undefin...
function FilterElement (line 7441) | function FilterElement() {
function _createSuper$G (line 7496) | function _createSuper$G(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$G (line 7498) | function _isNativeReflectConstruct$G() { if (typeof Reflect === "undefin...
function FeDropShadowElement (line 7505) | function FeDropShadowElement(document, node, captureTextNodes) {
function _createSuper$H (line 7527) | function _createSuper$H(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$H (line 7529) | function _isNativeReflectConstruct$H() { if (typeof Reflect === "undefin...
function FeMorphologyElement (line 7536) | function FeMorphologyElement() {
function _createSuper$I (line 7555) | function _createSuper$I(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$I (line 7557) | function _isNativeReflectConstruct$I() { if (typeof Reflect === "undefin...
function FeCompositeElement (line 7564) | function FeCompositeElement() {
function _createSuper$J (line 7583) | function _createSuper$J(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$J (line 7585) | function _isNativeReflectConstruct$J() { if (typeof Reflect === "undefin...
function FeGaussianBlurElement (line 7592) | function FeGaussianBlurElement(document, node, captureTextNodes) {
function _createSuper$K (line 7630) | function _createSuper$K(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$K (line 7632) | function _isNativeReflectConstruct$K() { if (typeof Reflect === "undefin...
function TitleElement (line 7639) | function TitleElement() {
function _createSuper$L (line 7652) | function _createSuper$L(Derived) { return function () { var Super = _get...
function _isNativeReflectConstruct$L (line 7654) | function _isNativeReflectConstruct$L() { if (typeof Reflect === "undefin...
function DescElement (line 7661) | function DescElement() {
function ownKeys (line 7718) | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object...
function _objectSpread (line 7720) | function _objectSpread(target) { for (var i = 1; i < arguments.length; i...
function createCanvas (line 7722) | function createCanvas(width, height) {
function createImage (line 7729) | function createImage(_x) {
function _createImage (line 7733) | function _createImage() {
function Document (line 7765) | function Document(canvg) {
function ownKeys$1 (line 7886) | function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(obje...
function _objectSpread$1 (line 7888) | function _objectSpread$1(target) { for (var i = 1; i < arguments.length;...
function Canvg (line 7900) | function Canvg(ctx, svg) {
function render (line 8000) | function render() {
function from (line 8074) | function from(_x, _x2) {
function offscreen (line 8103) | function offscreen() {
function node (line 8153) | function node(_ref) {
FILE: ArduinoFrontend/src/assets/canvg/umd.js
function t (line 1) | function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}
function n (line 1) | function n(e,t){return RegExp(e,t)}
function r (line 1) | function r(e){return e.replace(/(?!\u3000)\s+/gm," ")}
function a (line 1) | function a(e){return e.replace(/^[\n \t]+/,"")}
function o (line 1) | function o(e){return e.replace(/[\n \t]+$/,"")}
function l (line 1) | function l(e){var t=(e||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\...
function s (line 1) | function s(e){return Ka.test(e)?e.toLowerCase():e}
function u (line 1) | function u(e){var t=e.match(/url\(('([^']+)'|"([^"]+)"|([^'"\)]+))\)/)||...
function d (line 1) | function d(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object...
function g (line 1) | function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(...
function p (line 1) | function p(e,t){return no(e)||ro(e,t)||oo(e,t)||io()}
function y (line 1) | function y(e,t){var n=e.match(t);return n?[e.replace(t," "),n.length]:[e...
function h (line 1) | function h(e){var t=[0,0,0],n=e.replace(/:not\(([^\)]*)\)/g," $1 ")....
function x (line 1) | function x(e){return mn(xn(e[0],2)+xn(e[1],2))}
function b (line 1) | function b(e,t){return(e[0]*t[0]+e[1]*t[1])/(x(e)*x(t))}
function S (line 1) | function S(e,t){var n=Math.acos;return(e[0]*t[1]<e[1]*t[0]?-1:1)*n(b(e,t))}
function k (line 1) | function k(e){return e*e*e}
function A (line 1) | function A(e){return 3*e*e*(1-e)}
function P (line 1) | function P(e){return 3*e*(1-e)*(1-e)}
function E (line 1) | function E(e){return(1-e)*(1-e)*(1-e)}
function T (line 1) | function T(e){return e*e}
function C (line 1) | function C(e){return 2*e*(1-e)}
function w (line 1) | function w(e){return(1-e)*(1-e)}
function O (line 1) | function O(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return vo...
function V (line 1) | function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enume...
function L (line 1) | function L(e,t){for(var n=0,r;n<t.length;n++)r=t[n],r.enumerable=r.enume...
function R (line 1) | function R(){throw new Error("setTimeout has not been defined")}
function I (line 1) | function I(){throw new Error("clearTimeout has not been defined")}
function D (line 1) | function D(t){if(rc===setTimeout)return setTimeout(t,0);if((rc===R||!rc)...
function N (line 1) | function N(t){if(ac===clearTimeout)return clearTimeout(t);if((ac===I||!a...
function M (line 1) | function M(){ic&&sc&&(ic=!1,sc.length?oc=sc.concat(oc):lc=-1,oc.length&&...
function B (line 1) | function B(){if(!ic){var e=D(M);ic=!0;for(var t=oc.length;t;){for(sc=oc,...
function _ (line 1) | function _(e){var t=Array(arguments.length-1);if(1<arguments.length)for(...
function z (line 1) | function z(e,t){this.fun=e,this.array=t}
function F (line 1) | function F(){}
function G (line 1) | function G(){throw new Error("process.binding is not supported")}
function H (line 1) | function H(){return"/"}
function U (line 1) | function U(){throw new Error("process.chdir is not supported")}
function Y (line 1) | function Y(){return 0}
function $ (line 1) | function $(e){var t=1e-3*hc.call(yc),n=fn(t),r=fn(1e9*(t%1));return e&&(...
function W (line 1) | function W(){var e=new Date;return(e-fc)/1e3}
function X (line 1) | function X(e){return function(){var t=cu(e),n;if(q()){var r=cu(this).con...
function q (line 1) | function q(){if("undefined"==typeof Reflect||!Reflect.construct)return!1...
function Q (line 1) | function Q(e){var t=e.trim();return /^('|")/.test(t)?t:"\"".concat(t,"\"")}
function K (line 1) | function K(e){return"undefined"==typeof process?e:e.trim().split(",").ma...
function Z (line 1) | function Z(e){return function(){var t=cu(e),n;if(J()){var r=cu(this).con...
function J (line 1) | function J(){if("undefined"==typeof Reflect||!Reflect.construct)return!1...
function ee (line 1) | function ee(e){return function(){var t=cu(e),n;if(te()){var r=cu(this).c...
function te (line 1) | function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ne (line 1) | function ne(e){return function(){var t=cu(e),n;if(re()){var r=cu(this).c...
function re (line 1) | function re(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ae (line 1) | function ae(e){return r(e).trim().replace(/\)([a-zA-Z])/g,") $1").replac...
function oe (line 1) | function oe(e){var t=e.split("("),n=lo(t,2),r=n[0],a=n[1];return[r.trim(...
function ie (line 1) | function ie(e){return function(){var t=cu(e),n;if(le()){var r=cu(this).c...
function le (line 1) | function le(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function se (line 1) | function se(e){return function(){var t=cu(e),n;if(ce()){var r=cu(this).c...
function ce (line 1) | function ce(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ue (line 1) | function ue(e){return function(){var t=cu(e),n;if(de()){var r=cu(this).c...
function de (line 1) | function de(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ge (line 1) | function ge(e){return function(){var t=cu(e),n;if(pe()){var r=cu(this).c...
function pe (line 1) | function pe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ye (line 1) | function ye(e){var t=e.replace(/,/gm," ").replace(/([MmZzLlHhVvCcSsQqTtA...
function he (line 1) | function he(e){return function(){var t=cu(e),n;if(fe()){var r=cu(this).c...
function fe (line 1) | function fe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function me (line 1) | function me(e){return function(){var t=cu(e),n;if(xe()){var r=cu(this).c...
function xe (line 1) | function xe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function be (line 1) | function be(e){return function(){var t=cu(e),n;if(ve()){var r=cu(this).c...
function ve (line 1) | function ve(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Se (line 1) | function Se(e){return function(){var t=cu(e),n;if(ke()){var r=cu(this).c...
function ke (line 1) | function ke(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ae (line 1) | function Ae(e){return function(){var t=cu(e),n;if(Pe()){var r=cu(this).c...
function Pe (line 1) | function Pe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ee (line 1) | function Ee(e){return function(){var t=cu(e),n;if(Te()){var r=cu(this).c...
function Te (line 1) | function Te(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ce (line 1) | function Ce(e){return function(){var t=cu(e),n;if(we()){var r=cu(this).c...
function we (line 1) | function we(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Oe (line 1) | function Oe(e){return function(){var t=cu(e),n;if(Ve()){var r=cu(this).c...
function Ve (line 1) | function Ve(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Le (line 1) | function Le(e){return function(){var t=cu(e),n;if(Re()){var r=cu(this).c...
function Re (line 1) | function Re(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ie (line 1) | function Ie(e){return function(){var t=cu(e),n;if(De()){var r=cu(this).c...
function De (line 1) | function De(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ne (line 1) | function Ne(e){return function(){var t=cu(e),n;if(Me()){var r=cu(this).c...
function Me (line 1) | function Me(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Be (line 1) | function Be(e){return function(){var t=cu(e),n;if(_e()){var r=cu(this).c...
function _e (line 1) | function _e(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ze (line 1) | function ze(e){return function(){var t=cu(e),n;if(Fe()){var r=cu(this).c...
function Fe (line 1) | function Fe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function je (line 1) | function je(e){return function(){var t=cu(e),n;if(Ge()){var r=cu(this).c...
function Ge (line 1) | function Ge(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function He (line 1) | function He(e){return function(){var t=cu(e),n;if(Ue()){var r=cu(this).c...
function Ue (line 1) | function Ue(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ye (line 1) | function Ye(e){return function(){var t=cu(e),n;if($e()){var r=cu(this).c...
function $e (line 1) | function $e(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function We (line 1) | function We(e){return function(){var t=cu(e),n;if(Xe()){var r=cu(this).c...
function Xe (line 1) | function Xe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function qe (line 1) | function qe(e){return function(){var t=cu(e),n;if(Qe()){var r=cu(this).c...
function Qe (line 1) | function Qe(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ke (line 1) | function Ke(e){return function(){var t=cu(e),n;if(Ze()){var r=cu(this).c...
function Ze (line 1) | function Ze(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Je (line 1) | function Je(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){...
function et (line 1) | function et(e,t){if(e){if("string"==typeof e)return tt(e,t);var r=Object...
function tt (line 1) | function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array...
function nt (line 1) | function nt(e){return function(){var t=cu(e),n;if(rt()){var r=cu(this).c...
function rt (line 1) | function rt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function at (line 1) | function at(e){return function(){var t=cu(e),n;if(ot()){var r=cu(this).c...
function ot (line 1) | function ot(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function it (line 1) | function it(e){return function(){var t=cu(e),n;if(lt()){var r=cu(this).c...
function lt (line 1) | function lt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function st (line 1) | function st(e){return function(){var t=cu(e),n;if(ct()){var r=cu(this).c...
function ct (line 1) | function ct(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function ut (line 1) | function ut(e){return function(){var t=cu(e),n;if(dt()){var r=cu(this).c...
function dt (line 1) | function dt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function gt (line 1) | function gt(e){return function(){var t=cu(e),n;if(pt()){var r=cu(this).c...
function pt (line 1) | function pt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function yt (line 1) | function yt(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){...
function ht (line 1) | function ht(e,t){if(e){if("string"==typeof e)return ft(e,t);var r=Object...
function ft (line 1) | function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array...
function mt (line 1) | function mt(e){return function(){var t=cu(e),n;if(xt()){var r=cu(this).c...
function xt (line 1) | function xt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function bt (line 1) | function bt(e){return function(){var t=cu(e),n;if(vt()){var r=cu(this).c...
function vt (line 1) | function vt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function St (line 1) | function St(e){return function(){var t=cu(e),n;if(kt()){var r=cu(this).c...
function kt (line 1) | function kt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function At (line 1) | function At(e){return function(){var t=cu(e),n;if(Pt()){var r=cu(this).c...
function Pt (line 1) | function Pt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Et (line 1) | function Et(e){return function(){var t=cu(e),n;if(Tt()){var r=cu(this).c...
function Tt (line 1) | function Tt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ct (line 1) | function Ct(e){return function(){var t=cu(e),n;if(wt()){var r=cu(this).c...
function wt (line 1) | function wt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ot (line 1) | function Ot(e,t,n,r,a,o){return e[4*(n*r)+4*t+o]}
function Vt (line 1) | function Vt(e,t,n,r,a,o,i){e[4*(n*r)+4*t+o]=i}
function Lt (line 1) | function Lt(e,t,n){var r=e[t];return r*(0>r?n-255:n)}
function m (line 1) | function m(e,t,n,r){return t+hn(e)*n+yn(e)*r}
function c (line 1) | function c(e){return function(){var t=cu(e),n;if(v()){var r=cu(this).con...
function v (line 1) | function v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1...
function Rt (line 1) | function Rt(e){return function(){var t=cu(e),n;if(It()){var r=cu(this).c...
function It (line 1) | function It(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Dt (line 1) | function Dt(e){return function(){var t=cu(e),n;if(Nt()){var r=cu(this).c...
function Nt (line 1) | function Nt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Mt (line 1) | function Mt(e){return function(){var t=cu(e),n;if(Bt()){var r=cu(this).c...
function Bt (line 1) | function Bt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function _t (line 1) | function _t(e){return function(){var t=cu(e),n;if(zt()){var r=cu(this).c...
function zt (line 1) | function zt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Ft (line 1) | function Ft(e){return function(){var t=cu(e),n;if(jt()){var r=cu(this).c...
function jt (line 1) | function jt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Gt (line 1) | function Gt(e){return Gt="function"==typeof Symbol&&"symbol"==typeof Sym...
function Ht (line 1) | function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a...
function Ut (line 1) | function Ut(e,t,n,r,a){if("string"==typeof e&&(e=document.getElementById...
function Yt (line 1) | function Yt(e,t,n,r,a,o){if(!(isNaN(o)||1>o)){o|=0;var i=Ut(e,t,n,r,a);i...
function $t (line 1) | function $t(e,t,n,r,a,o){var l=e.data,s=r-1,c=a-1,u=o+1,d=u*(u+1)/2,g=ne...
function Wt (line 1) | function Wt(e){return function(){var t=cu(e),n;if(Xt()){var r=cu(this).c...
function Xt (line 1) | function Xt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function qt (line 1) | function qt(e){return function(){var t=cu(e),n;if(Qt()){var r=cu(this).c...
function Qt (line 1) | function Qt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Kt (line 1) | function Kt(e){return function(){var t=cu(e),n;if(Zt()){var r=cu(this).c...
function Zt (line 1) | function Zt(){if("undefined"==typeof Reflect||!Reflect.construct)return!...
function Jt (line 1) | function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){v...
function en (line 1) | function en(e){for(var t=1,n;t<arguments.length;t++)n=null==arguments[t]...
function tn (line 1) | function tn(){return nn.apply(this,arguments)}
function nn (line 1) | function nn(){return nn=_i(Mi.mark(function e(t){var n;return Mi.wrap(fu...
function rn (line 1) | function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){v...
function an (line 1) | function an(e){for(var t=1,n;t<arguments.length;t++)n=null==arguments[t]...
function a (line 1) | function a(e,r,a,o,i,l){var s=a+e.length,c=o.length,n=/\$([$&'`]|\d\d?)/...
function t (line 1) | function t(e,t,n,a){var o=t&&t.prototype instanceof r?t:r,i=Object.creat...
function n (line 1) | function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){ret...
function r (line 1) | function r(){}
function a (line 1) | function a(){}
function o (line 1) | function o(){}
function i (line 1) | function i(e){["next","throw","return"].forEach(function(t){e[t]=functio...
function l (line 1) | function l(e,t){function r(a,o,i,l){var s=n(e[a],e,o);if("throw"===s.typ...
function s (line 1) | function s(e,t,r){var a="suspendedStart";return function(o,i){if("execut...
function c (line 1) | function c(e,t){var r=e.iterator[t.method];if(r===S){if(t.delegate=null,...
function u (line 1) | function u(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.f...
function d (line 1) | function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.comp...
function g (line 1) | function g(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(u,this),this.r...
function p (line 1) | function p(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==type...
function y (line 1) | function y(){return{value:S,done:!0}}
function t (line 1) | function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="nex...
function t (line 1) | function t(e,t,n,a){var o=t&&t.prototype instanceof r?t:r,i=Object.creat...
function n (line 1) | function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){ret...
function r (line 1) | function r(){}
function a (line 1) | function a(){}
function o (line 1) | function o(){}
function i (line 1) | function i(e){["next","throw","return"].forEach(function(t){e[t]=functio...
function l (line 1) | function l(e,t){function r(a,o,i,l){var s=n(e[a],e,o);if("throw"===s.typ...
function s (line 1) | function s(e,t,r){var a="suspendedStart";return function(o,i){if("execut...
function c (line 1) | function c(e,t){var r=e.iterator[t.method];if(r===S){if(t.delegate=null,...
function u (line 1) | function u(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.f...
function d (line 1) | function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.comp...
function g (line 1) | function g(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(u,this),this.r...
function p (line 1) | function p(e){if(e){var t=e[x];if(t)return t.call(e);if("function"==type...
function y (line 1) | function y(){return{value:S,done:!0}}
function t (line 1) | function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="nex...
function o (line 1) | function o(e){O(l,r,a,o,i,"next",e)}
function i (line 1) | function i(e){O(l,r,a,o,i,"throw",e)}
function e (line 1) | function e(t,n,r){Fi(this,e),this.document=t,this.name=n,this.value=r}
function e (line 1) | function e(){Fi(this,e),this.viewPorts=[]}
function e (line 1) | function e(t,n){Fi(this,e),this.x=t,this.y=n}
function e (line 1) | function e(t){Fi(this,e),this.screen=t,this.working=!1,this.events=[],th...
function e (line 1) | function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[...
function e (line 1) | function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0...
function e (line 1) | function e(){}
function t (line 1) | function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){...
function t (line 1) | function t(n){"@babel/helpers - typeof";return e.exports="function"==typ...
function t (line 1) | function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototy...
function e (line 1) | function e(){}
function e (line 1) | function e(t,n){var r=this,a=!!(2<arguments.length&&void 0!==arguments[2...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),console.w...
function t (line 1) | function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototy...
function t (line 1) | function t(n,r,a){return e.exports="undefined"!=typeof Reflect&&Reflect....
function e (line 1) | function e(t,n,r,a,o,i){Fi(this,e);var l=i?"string"==typeof i?e.parse(i)...
function e (line 1) | function e(){var t=Number.NaN,n=0<arguments.length&&void 0!==arguments[0...
function e (line 1) | function e(t,n){Fi(this,e),this.type="translate",this.point=null,this.po...
function e (line 1) | function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?argument...
function e (line 1) | function e(t,n){Fi(this,e),this.type="scale",this.scale=null;var r=_c.pa...
function e (line 1) | function e(t,n){Fi(this,e),this.type="matrix",this.matrix=[],this.matrix...
function t (line 1) | function t(e,r){var a;return Fi(this,t),a=n.call(this,e,r),a.type="skew"...
function t (line 1) | function t(e,r){var a;return Fi(this,t),a=n.call(this,e,r),a.type="skewX...
function t (line 1) | function t(e,r){var a;return Fi(this,t),a=n.call(this,e,r),a.type="skewY...
function e (line 1) | function e(t,n,r){var a=this;Fi(this,e),this.document=t,this.transforms=...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.modifie...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,(this instan...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,(this instan...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="t...
function e (line 1) | function e(t){Fi(this,e),this.control=null,this.start=null,this.current=...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="p...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="s...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="r...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="c...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="e...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="l...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="p...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="p...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="p...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="m...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="d...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="g...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.attributesToIn...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="l...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="r...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.type="stop";va...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="a...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="a...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="a...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.type="font",o....
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="f...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="m...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="g...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="t...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.type="a";var i...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.type="textPath...
function t (line 1) | function t(e,r,a){var o;Fi(this,t),o=n.call(this,e,r,a),o.type="image",o...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="s...
function e (line 1) | function e(t){Fi(this,e),this.document=t,this.loaded=!1,t.fonts.push(this)}
function t (line 1) | function t(e,a,o){var i;Fi(this,t),i=n.call(this,e,a,o),i.type="style";v...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="u...
function t (line 1) | function t(e,r,o){var i;Fi(this,t),i=n.call(this,e,r,o),i.type="feColorM...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="m...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="c...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="f...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="f...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="f...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="f...
function t (line 1) | function t(e,r,a){var o;return Fi(this,t),o=n.call(this,e,r,a),o.type="f...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="t...
function t (line 1) | function t(){var e;return Fi(this,t),e=n.apply(this,arguments),e.type="d...
function e (line 1) | function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[...
function e (line 1) | function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?argument...
FILE: eda-frontend/src/App.js
function PrivateRoute (line 28) | function PrivateRoute ({ component: Component, ...rest }) {
function PublicRoute (line 53) | function PublicRoute ({ component: Component, restricted, nav, ...rest }) {
function App (line 72) | function App () {
FILE: eda-frontend/src/App.test.js
function Button (line 6) | function Button (props) {
FILE: eda-frontend/src/components/Dashboard/DashboardHome.js
function MainCard (line 30) | function MainCard () {
function DashboardHome (line 58) | function DashboardHome ({ ltiDetails = null }) {
FILE: eda-frontend/src/components/Dashboard/DashboardOtherProjects.js
function TabPanel (line 37) | function TabPanel (props) {
function DashboardOtherProjects (line 54) | function DashboardOtherProjects () {
FILE: eda-frontend/src/components/Dashboard/DashboardSidebar.js
function DashSidebar (line 47) | function DashSidebar (props) {
FILE: eda-frontend/src/components/Dashboard/ProgressPanel.js
function TabPanel (line 19) | function TabPanel (props) {
function a11yProps (line 45) | function a11yProps (index) {
function ProgressPanel (line 52) | function ProgressPanel ({ ltiDetails = null }) {
FILE: eda-frontend/src/components/Dashboard/ProjectCard.js
function ProjectCard (line 30) | function ProjectCard ({ pub, is_review }) {
FILE: eda-frontend/src/components/Dashboard/SchematicCard.js
function timeSince (line 63) | function timeSince (jsonDate) {
function getDate (line 95) | function getDate (jsonDate) {
function SchematicCard (line 104) | function SchematicCard ({ sch }) {
FILE: eda-frontend/src/components/Dashboard/SchematicsList.js
function TabPanel (line 45) | function TabPanel (props) {
function MainCard (line 65) | function MainCard () {
function SchematicsList (line 96) | function SchematicsList ({ ltiDetails = null }) {
FILE: eda-frontend/src/components/LTI/CompareGraph.js
function CompareGraph (line 34) | function CompareGraph ({ expected, given }) {
FILE: eda-frontend/src/components/LTI/Helper/Testcase.js
function ErcCheck (line 22) | function ErcCheck() {
function ErcCheckNets (line 73) | function ErcCheckNets(graph) {
function GenerateNetList (line 115) | function GenerateNetList(graph=graph) {
function annotate (line 331) | function annotate(graph) {
function GenerateNodeList (line 443) | function GenerateNodeList(graph=graph) {
function GenerateCompList (line 470) | function GenerateCompList(graph=graph) {
function renderXML (line 493) | function renderXML() {
function parseXmlToGraph (line 500) | function parseXmlToGraph(xmlDoc, graph) {
FILE: eda-frontend/src/components/LTI/LTI.js
function LTIConfig (line 57) | function LTIConfig () {
FILE: eda-frontend/src/components/LTI/SubmissionTable.js
function SubmissionTable (line 43) | function SubmissionTable () {
FILE: eda-frontend/src/components/LTI/SubmitResults.js
function SubmitResults (line 37) | function SubmitResults ({ show, setResults, results }) {
FILE: eda-frontend/src/components/Project/ChangeStatus.js
function ChangeStatus (line 8) | function ChangeStatus ({ project, changedStatus }) {
FILE: eda-frontend/src/components/Project/CreateProject.js
function CreateProject (line 70) | function CreateProject () {
FILE: eda-frontend/src/components/Project/ProjectSimulationParameters.js
function TabPanel (line 14) | function TabPanel (props) {
function ProjectSimulationParameters (line 40) | function ProjectSimulationParameters (props) {
FILE: eda-frontend/src/components/Project/ProjectTimeline.js
function getDate (line 23) | function getDate (jsonDate) {
function ProjectTimeline (line 35) | function ProjectTimeline ({ history, isOwner }) {
FILE: eda-frontend/src/components/Project/ReportComponent.js
function TabPanel (line 37) | function TabPanel (props) {
function a11yProps (line 61) | function a11yProps (index) {
function ReportComponent (line 68) | function ReportComponent (props) {
FILE: eda-frontend/src/components/SchematicEditor/ComponentProperties.js
function ComponentProperties (line 8) | function ComponentProperties () {
FILE: eda-frontend/src/components/SchematicEditor/ComponentSidebar.js
constant COMPONENTS_PER_ROW (line 30) | const COMPONENTS_PER_ROW = 3
function ComponentSidebar (line 57) | function ComponentSidebar ({ compRef, ltiSimResult, setLtiSimResult }) {
FILE: eda-frontend/src/components/SchematicEditor/Header.js
function SimpleSnackbar (line 76) | function SimpleSnackbar ({ open, close, message }) {
function Header (line 106) | function Header ({ gridRef }) {
FILE: eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
function LoadGrid (line 48) | function LoadGrid (container, sidebar, outline) {
FILE: eda-frontend/src/components/SchematicEditor/Helper/KeyboardShorcuts.js
function KeyboardShortcuts (line 11) | function KeyboardShortcuts (graph) {
FILE: eda-frontend/src/components/SchematicEditor/Helper/KiCadFileUtils.js
function KiCadFileUtils (line 28) | function KiCadFileUtils (grid) {
function importSCHFile (line 376) | function importSCHFile (fileContents) {
FILE: eda-frontend/src/components/SchematicEditor/Helper/SideBar.js
function SideBar (line 14) | function SideBar (getGraph) {
function AddComponent (line 18) | function AddComponent (component, imgref) {
FILE: eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js
function extractData (line 18) | function extractData (xml) {
function getSvgMetadata (line 60) | function getSvgMetadata (graph, parent, evt, target, x, y, component, ro...
FILE: eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js
function ToolbarTools (line 25) | function ToolbarTools(grid, unredo) {
function dispGraph (line 37) | function dispGraph () {
function Save (line 45) | function Save() {
function clearHistory (line 54) | function clearHistory() {
function Undo (line 67) | function Undo() {
function Redo (line 104) | function Redo() {
function ZoomIn (line 146) | function ZoomIn() {
function ZoomOut (line 151) | function ZoomOut() {
function ZoomAct (line 156) | function ZoomAct() {
function DeleteComp (line 161) | function DeleteComp() {
function ClearGrid (line 166) | function ClearGrid() {
function rotateCell (line 170) | function rotateCell (cell, rot_ang) {
function rotate (line 186) | function rotate (rot_ang) {
function Rotate (line 195) | function Rotate() {
function RotateACW (line 200) | function RotateACW() {
function PrintPreview (line 205) | function PrintPreview() {
function ErcCheck (line 269) | function ErcCheck() {
function ErcCheckNets (line 320) | function ErcCheckNets() {
function GenerateNetList (line 364) | function GenerateNetList() {
class Stack (line 581) | class Stack {
method constructor (line 582) | constructor(){
method push (line 586) | push(element) {
method length (line 590) | length() {
method peek (line 593) | peek() {
method isEmpty (line 596) | isEmpty() {
method pop (line 599) | pop() {
method print (line 605) | print() {
method reverse (line 614) | reverse() {
method _reverse (line 617) | _reverse(index) {
function traverseWire (line 625) | function traverseWire(edge, vis) {
function annotate (line 650) | function annotate(graph) {
function GenerateNodeList (line 826) | function GenerateNodeList() {
function GenerateCompList (line 844) | function GenerateCompList() {
function GenerateDetailedCompList (line 867) | function GenerateDetailedCompList() {
function renderXML (line 883) | function renderXML() {
function parseXmlToGraph (line 890) | function parseXmlToGraph(xmlDoc, graph) {
function renderGalleryXML (line 1016) | function renderGalleryXML(xml) {
function XMLWireConnections (line 1023) | function XMLWireConnections() {
FILE: eda-frontend/src/components/SchematicEditor/PropertiesSidebar.js
function GridProperties (line 64) | function GridProperties ({ gridRef }) {
function PropertiesSidebar (line 127) | function PropertiesSidebar ({ gridRef, outlineRef }) {
FILE: eda-frontend/src/components/SchematicEditor/RightSidebar.js
function RightSidebar (line 22) | function RightSidebar ({ window, mobileOpen, mobileClose, children }) {
FILE: eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
function SimpleSnackbar (line 108) | function SimpleSnackbar ({ open, close, message }) {
function SchematicToolbar (line 143) | function SchematicToolbar ({
FILE: eda-frontend/src/components/SchematicEditor/SideComp.js
function SideComp (line 23) | function SideComp ({ isFavourite = false, favourite, setFavourite, compo...
FILE: eda-frontend/src/components/SchematicEditor/SimulationProperties.js
function Alert (line 54) | function Alert (props) {
function SimulationProperties (line 57) | function SimulationProperties (props) {
FILE: eda-frontend/src/components/SchematicEditor/ToolbarExtension.js
function NetlistModal (line 63) | function NetlistModal ({ open, close, netlist }) {
function HelpScreen (line 145) | function HelpScreen ({ open, close }) {
function ImageExportDialog (line 420) | function ImageExportDialog (props) {
function HomeDialog (line 462) | function HomeDialog ({ open, gridRef, routeVal, onClose, schSave }) {
function SchematicNameDialog (line 549) | function SchematicNameDialog ({ open, gridRef, routeVal, onClose, schSav...
function OpenSchDialog (line 714) | function OpenSchDialog (props) {
function SimpleSnackbar (line 887) | function SimpleSnackbar ({ open, close, message }) {
function TabPanel (line 917) | function TabPanel (props) {
function LibraryRow (line 943) | function LibraryRow ({ library }) {
function SelectLibrariesModal (line 1011) | function SelectLibrariesModal ({ open, close }) {
FILE: eda-frontend/src/components/SchematicEditor/VersionComponent.js
function VersionComponent (line 17) | function VersionComponent ({
FILE: eda-frontend/src/components/Shared/Graph.js
class Graph (line 11) | class Graph extends Component {
method componentDidMount (line 14) | componentDidMount () {
method componentDidUpdate (line 18) | componentDidUpdate () {
method render (line 151) | render () {
FILE: eda-frontend/src/components/Shared/Layout.js
function Layout (line 24) | function Layout ({ header, resToolbar, sidebar }) {
FILE: eda-frontend/src/components/Shared/LayoutMain.js
function LayoutMain (line 16) | function LayoutMain ({ children }) {
FILE: eda-frontend/src/components/Shared/LayoutSidebar.js
function LayoutSidebar (line 22) | function LayoutSidebar ({ window, mobileOpen, mobileClose, children }) {
FILE: eda-frontend/src/components/Shared/Navbar.js
function Header (line 59) | function Header () {
function Navbar (line 305) | function Navbar () {
FILE: eda-frontend/src/components/Shared/Notice.js
function ScrollDialog (line 16) | function ScrollDialog (txt) {
function Notice (line 68) | function Notice ({ status, msg, open, close }) {
FILE: eda-frontend/src/components/Shared/SimulationScreen.js
function SimulationScreen (line 60) | function SimulationScreen ({ open, close, isResult, taskId, simType = 'N...
FILE: eda-frontend/src/components/Shared/Snackbar.js
function Alert (line 10) | function Alert (props) {
function SimpleSnackbar (line 15) | function SimpleSnackbar ({ open, close, sch, confirmation }) {
FILE: eda-frontend/src/components/Simulator/Editor.js
function Editor (line 7) | function Editor (props) {
FILE: eda-frontend/src/components/Simulator/NetlistUpload.js
class NetlistUpload (line 28) | class NetlistUpload extends Component {
method constructor (line 29) | constructor (props) {
method onChange (line 43) | onChange (e) {
method onFormSubmit (line 50) | onFormSubmit (e) {
method netlistUpload (line 65) | netlistUpload (file) {
method simulationResult (line 81) | simulationResult (url) {
method render (line 119) | render () {
FILE: eda-frontend/src/components/Simulator/textToFile.js
function textToFile (line 3) | function textToFile (data) {
FILE: eda-frontend/src/pages/Account/ChangePassword.js
function ChangePassword (line 41) | function ChangePassword (props) {
FILE: eda-frontend/src/pages/Dashboard.js
function Dashboard (line 25) | function Dashboard () {
FILE: eda-frontend/src/pages/Gallery.js
function SchematicCard (line 50) | function SchematicCard ({ sch }) {
function MainCard (line 126) | function MainCard () {
function Gallery (line 146) | function Gallery () {
FILE: eda-frontend/src/pages/Home.js
function Home (line 17) | function Home () {
FILE: eda-frontend/src/pages/LTISetup.js
function LTISetup (line 25) | function LTISetup () {
FILE: eda-frontend/src/pages/Login.js
function SignIn (line 52) | function SignIn (props) {
FILE: eda-frontend/src/pages/NotFound.js
function NotFound (line 13) | function NotFound () {
FILE: eda-frontend/src/pages/ProjectPage.js
function Alert (line 65) | function Alert (props) {
function ProjectPage (line 68) | function ProjectPage (props) {
FILE: eda-frontend/src/pages/Projects.js
function MainCard (line 48) | function MainCard () {
function PublicProjects (line 65) | function PublicProjects (props) {
FILE: eda-frontend/src/pages/ResetPassword/Confirmation.js
function ResetPasswordConfirm (line 42) | function ResetPasswordConfirm ({ match }) {
FILE: eda-frontend/src/pages/ResetPassword/Initiation.js
function ResetPassword (line 37) | function ResetPassword () {
FILE: eda-frontend/src/pages/SchematiEditor.js
function SchematiEditor (line 30) | function SchematiEditor (props) {
FILE: eda-frontend/src/pages/Simulator.js
function Simulator (line 27) | function Simulator () {
FILE: eda-frontend/src/pages/SubmissionPage.js
function Submissions (line 25) | function Submissions () {
FILE: eda-frontend/src/pages/signUp.js
function SignUp (line 47) | function SignUp () {
FILE: eda-frontend/src/redux/actions/actions.js
constant FETCH_LIBRARIES (line 2) | const FETCH_LIBRARIES = 'FETCH_LIBRARIES'
constant FETCH_LIBRARY (line 3) | const FETCH_LIBRARY = 'FETCH_LIBRARY'
constant REMOVE_LIBRARY (line 4) | const REMOVE_LIBRARY = 'REMOVE_LIBRARY'
constant FETCH_ALL_LIBRARIES (line 5) | const FETCH_ALL_LIBRARIES = 'FETCH_ALL_LIBRARIES'
constant FETCH_CUSTOM_LIBRARIES (line 6) | const FETCH_CUSTOM_LIBRARIES = 'FETCH_CUSTOM_LIBRARIES'
constant DELETE_LIBRARY (line 7) | const DELETE_LIBRARY = 'DELETE_LIBRARY'
constant UPLOAD_LIBRARIES (line 8) | const UPLOAD_LIBRARIES = 'UPLOAD_LIBRARIES'
constant RESET_UPLOAD_SUCCESS (line 9) | const RESET_UPLOAD_SUCCESS = 'RESET_UPLOAD_SUCCESS'
constant TOGGLE_COLLAPSE (line 10) | const TOGGLE_COLLAPSE = 'TOGGLE_COLLAPSE'
constant FETCH_COMPONENTS (line 11) | const FETCH_COMPONENTS = 'FETCH_COMPONENTS'
constant TOGGLE_SIMULATE (line 12) | const TOGGLE_SIMULATE = 'TOGGLE_SIMULATE'
constant GET_COMP_PROPERTIES (line 15) | const GET_COMP_PROPERTIES = 'GET_COMP_PROPERTIES'
constant SET_COMP_PROPERTIES (line 16) | const SET_COMP_PROPERTIES = 'SET_COMP_PROPERTIES'
constant CLOSE_COMP_PROPERTIES (line 17) | const CLOSE_COMP_PROPERTIES = 'CLOSE_COMP_PROPERTIES'
constant CLOSE_COMP_PROPERTIES_TEMP (line 18) | const CLOSE_COMP_PROPERTIES_TEMP = 'CLOSE_COMP_PROPERTIES_TEMP'
constant SET_NETLIST (line 21) | const SET_NETLIST = 'SET_NETLIST'
constant SET_TITLE (line 22) | const SET_TITLE = 'SET_TITLE'
constant SET_MODEL (line 23) | const SET_MODEL = 'SET_MODEL'
constant SET_CONTROL_LINE (line 24) | const SET_CONTROL_LINE = 'SET_CONTROL_LINE'
constant SET_CONTROL_BLOCK (line 25) | const SET_CONTROL_BLOCK = 'SET_CONTROL_BLOCK'
constant SET_RESULT_TITLE (line 28) | const SET_RESULT_TITLE = 'SET_RESULT_TITLE'
constant SET_RESULT_GRAPH (line 29) | const SET_RESULT_GRAPH = 'SET_RESULT_GRAPH'
constant SET_RESULT_TEXT (line 30) | const SET_RESULT_TEXT = 'SET_RESULT_TEXT'
constant USER_LOADING (line 33) | const USER_LOADING = 'USER_LOADING'
constant USER_LOADED (line 34) | const USER_LOADED = 'USER_LOADED'
constant LOGIN_SUCCESSFUL (line 35) | const LOGIN_SUCCESSFUL = 'LOGIN_SUCCESSFUL'
constant AUTHENTICATION_ERROR (line 36) | const AUTHENTICATION_ERROR = 'AUTHENTICATION_ERROR'
constant LOGIN_FAILED (line 37) | const LOGIN_FAILED = 'LOGIN_FAILED'
constant LOGOUT_SUCCESSFUL (line 38) | const LOGOUT_SUCCESSFUL = 'LOGOUT_SUCCESSFUL'
constant LOADING_FAILED (line 39) | const LOADING_FAILED = 'LOADING_FAILED'
constant SIGNUP_SUCCESSFUL (line 40) | const SIGNUP_SUCCESSFUL = 'SIGNUP_SUCCESSFUL'
constant SIGNUP_FAILED (line 41) | const SIGNUP_FAILED = 'SIGNUP_FAILED'
constant DEFAULT_STORE (line 42) | const DEFAULT_STORE = 'DEFAULT_STORE'
constant RESET_PASSWORD_SUCCESSFUL (line 43) | const RESET_PASSWORD_SUCCESSFUL = 'RESET_PASSWORD_SUCCESSFUL'
constant RESET_PASSWORD_FAILED (line 44) | const RESET_PASSWORD_FAILED = 'RESET_PASSWORD_FAILED'
constant RESET_PASSWORD_CONFIRM_SUCCESSFUL (line 45) | const RESET_PASSWORD_CONFIRM_SUCCESSFUL = 'RESET_PASSWORD_CONFIRM_SUCCES...
constant RESET_PASSWORD_CONFIRM_FAILED (line 46) | const RESET_PASSWORD_CONFIRM_FAILED = 'RESET_PASSWORD_CONFIRM_FAILED'
constant ROLE_LOADED (line 47) | const ROLE_LOADED = 'ROLE_LOADED'
constant SAVE_SCHEMATICS (line 50) | const SAVE_SCHEMATICS = 'SAVE_SCHEMATICS'
constant SET_SCH_SAVED (line 51) | const SET_SCH_SAVED = 'SET_SCH_SAVED'
constant SET_SCH_TITLE (line 52) | const SET_SCH_TITLE = 'SET_SCH_TITLE'
constant SET_SCH_DESCRIPTION (line 53) | const SET_SCH_DESCRIPTION = 'SET_SCH_DESCRIPTION'
constant SET_SCH_XML_DATA (line 54) | const SET_SCH_XML_DATA = 'SET_SCH_XML_DATA'
constant SET_SCH_SHARED (line 55) | const SET_SCH_SHARED = 'SET_SCH_SHARED'
constant CLEAR_DETAILS (line 56) | const CLEAR_DETAILS = 'CLEAR_DETAILS'
constant FETCH_SCHEMATICS (line 59) | const FETCH_SCHEMATICS = 'FETCH_SCHEMATICS'
constant FETCH_GALLERY (line 62) | const FETCH_GALLERY = 'FETCH_GALLERY'
constant CHANGE_PASSWORD_SUCCESS (line 65) | const CHANGE_PASSWORD_SUCCESS = 'CHANGE_PASSWORD_SUCCESS'
constant CHANGE_PASSWORD_FAILED (line 66) | const CHANGE_PASSWORD_FAILED = 'CHANGE_PASSWORD_FAILED'
constant FETCH_MY_PROJECTS (line 68) | const FETCH_MY_PROJECTS = 'FETCH_MY_PROJECTS'
constant FETCH_PUBLIC_PROJECTS (line 69) | const FETCH_PUBLIC_PROJECTS = 'FETCH_PUBLIC_PROJECTS'
constant FETCH_OTHER_PROJECTS (line 70) | const FETCH_OTHER_PROJECTS = 'FETCH_OTHER_PROJECTS'
constant SET_CURRENT_PROJECT (line 73) | const SET_CURRENT_PROJECT = 'SET_CURRENT_PROJECT'
constant DELETE_PROJECT (line 74) | const DELETE_PROJECT = 'DELETE_PROJECT'
constant FETCH_REPORTS (line 75) | const FETCH_REPORTS = 'FETCH_REPORTS'
constant RESOLVE_REPORTS (line 76) | const RESOLVE_REPORTS = 'RESOLVE_REPORTS'
constant GET_STATES (line 77) | const GET_STATES = 'GET_STATES'
constant SET_STATE (line 78) | const SET_STATE = 'SET_STATE'
FILE: eda-frontend/src/serviceWorker.js
function register (line 23) | function register (config) {
function registerValidSW (line 57) | function registerValidSW (swUrl, config) {
function checkValidServiceWorker (line 101) | function checkValidServiceWorker (swUrl, config) {
function unregister (line 131) | function unregister () {
FILE: esim-cloud-backend/arduinoAPI/apps.py
class ArduinoapiConfig (line 4) | class ArduinoapiConfig(AppConfig):
FILE: esim-cloud-backend/arduinoAPI/tasks.py
function saveFiles (line 19) | def saveFiles(data, langIndex):
function CompileINO (line 56) | def CompileINO(filenames):
function CompileInlineAssembly (line 115) | def CompileInlineAssembly(filenames):
function compile_sketch_task (line 175) | def compile_sketch_task(task_id, data, langIndex):
FILE: esim-cloud-backend/arduinoAPI/views.py
class CompileSketchINO (line 9) | class CompileSketchINO(APIView):
method post (line 10) | def post(self, request):
class CompileSketchInlineAssembly (line 33) | class CompileSketchInlineAssembly(APIView):
method post (line 34) | def post(self, request):
class CompilationStatus (line 56) | class CompilationStatus(APIView):
method get (line 61) | def get(self, request):
FILE: esim-cloud-backend/authAPI/apps.py
class AuthapiConfig (line 4) | class AuthapiConfig(AppConfig):
FILE: esim-cloud-backend/authAPI/models.py
class User (line 6) | class User(AbstractUser):
FILE: esim-cloud-backend/authAPI/serializers.py
class TokenCreateSerializer (line 9) | class TokenCreateSerializer(serializers.Serializer):
method __init__ (line 20) | def __init__(self, *args, **kwargs):
method validate (line 25) | def validate(self, attrs):
FILE: esim-cloud-backend/authAPI/token.py
class TokenStrategy (line 1) | class TokenStrategy:
method obtain (line 3) | def obtain(cls, user):
FILE: esim-cloud-backend/authAPI/views.py
function activate_user (line 17) | def activate_user(request, uid, token):
function GoogleOAuth2 (line 35) | def GoogleOAuth2(request):
class CustomTokenCreateView (line 80) | class CustomTokenCreateView(utils.ActionViewMixin, generics.GenericAPIVi...
method _action (line 88) | def _action(self, serializer):
FILE: esim-cloud-backend/esimCloud/celery.py
function debug_task (line 13) | def debug_task(self):
FILE: esim-cloud-backend/libAPI/admin.py
class LibraryComponentAdmin (line 18) | class LibraryComponentAdmin(admin.ModelAdmin):
class ComponentInline (line 25) | class ComponentInline(admin.TabularInline):
class LibraryAdmin (line 31) | class LibraryAdmin(admin.ModelAdmin):
class LibraryInline (line 35) | class LibraryInline(InlineActionsMixin, admin.TabularInline):
method toggle_default (line 41) | def toggle_default(self, request, obj, parent_obj=None):
method get_toggle_default_label (line 61) | def get_toggle_default_label(self, obj):
class LibrarySetAdmin (line 67) | class LibrarySetAdmin(InlineActionsModelAdminMixin, admin.ModelAdmin):
method get_form (line 72) | def get_form(self, request, obj=None, **kwargs):
method save_model (line 75) | def save_model(self, request, obj, form, change):
class FavouriteComponentAdmin (line 107) | class FavouriteComponentAdmin(admin.ModelAdmin):
FILE: esim-cloud-backend/libAPI/apps.py
class LibapiConfig (line 4) | class LibapiConfig(AppConfig):
FILE: esim-cloud-backend/libAPI/dbrouters.py
class mongoRouter (line 1) | class mongoRouter:
method db_for_read (line 8) | def db_for_read(self, model, **hints):
method db_for_write (line 16) | def db_for_write(self, model, **hints):
method allow_relation (line 24) | def allow_relation(self, obj1, obj2, **hints):
method allow_migrate (line 36) | def allow_migrate(self, db, app_label, model_name=None, **hints):
FILE: esim-cloud-backend/libAPI/forms.py
class LibrarySetForm (line 5) | class LibrarySetForm(forms.ModelForm):
method __init__ (line 11) | def __init__(self, *args, **kwargs):
class Meta (line 19) | class Meta:
FILE: esim-cloud-backend/libAPI/helper/main.py
class SvgGenerator (line 10) | class SvgGenerator:
method __init__ (line 11) | def __init__(self):
method match_part_dmg (line 37) | def match_part_dmg(self, part, dmg):
method save_svg (line 47) | def save_svg(self, d, name_of_symbol, save_path, pin_number_positions,
method generate_svg_from_lib (line 93) | def generate_svg_from_lib(self, file_path, output_path):
function generate_svg_and_save_to_folder (line 576) | def generate_svg_and_save_to_folder(input_file, output_folder):
FILE: esim-cloud-backend/libAPI/helper/parser.py
class Parser (line 4) | class Parser:
method extract_data_from_lib (line 5) | def extract_data_from_lib(self, filename):
method extract_data_from_dcm (line 45) | def extract_data_from_dcm(self, filename):
FILE: esim-cloud-backend/libAPI/helper/plotter.py
class SvgPlotter (line
Condensed preview — 522 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,390K chars).
[
{
"path": ".all-contributorsrc",
"chars": 3907,
"preview": "{\n \"files\": [\n \"README.md\"\n ],\n \"imageSize\": 100,\n \"commit\": false,\n \"contributors\": [\n {\n \"login\": \"dar"
},
{
"path": ".github/workflows/angularTestBuild.yml",
"chars": 541,
"preview": "name: Angular Build and Tests\n\non:\n push:\n paths: [ 'ArduinoFrontend/**' ]\n pull_request:\n paths: [ 'ArduinoFron"
},
{
"path": ".github/workflows/devDockerCompose.yml",
"chars": 879,
"preview": "name: Containers\n\non:\n push:\n #Until changes are merged to master initially\n branches: [ develop, docker-images ]"
},
{
"path": ".github/workflows/dockerTestBackend.yml",
"chars": 728,
"preview": "name: Django Build and Tests\n\non:\n push:\n paths: [ 'esim-cloud-backend/**' ]\n pull_request:\n paths: [ 'esim-clou"
},
{
"path": ".github/workflows/masterDockerCompose.yml",
"chars": 915,
"preview": "name: Containers\n\non:\n push:\n branches: [ master, devops ]\n\njobs:\n\n build:\n\n runs-on: ubuntu-latest\n\n steps:\n"
},
{
"path": ".github/workflows/prodContainers.yml",
"chars": 868,
"preview": "name: Master Containers\n\non:\n push:\n branches: [ master ]\n\njobs:\n publish:\n runs-on: ubuntu-latest\n steps:\n "
},
{
"path": ".github/workflows/reactEslint.yml",
"chars": 308,
"preview": "name: ESLint eda-frontend\n\non:\n push:\n paths: [ 'eda-frontend/**' ]\n\njobs:\n eslint:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/reactTestBuild.yml",
"chars": 547,
"preview": "name: React Build and Tests\n\non:\n push:\n paths: [ 'eda-frontend/**' ]\n pull_request:\n paths: [ 'eda-frontend/**'"
},
{
"path": ".gitignore",
"chars": 168,
"preview": "redis_data/\nmysql_data/\n.vscode\nvenv\nenv\n*.sqlite3\n.env.prod\nmongo_data/\nsample_lib/\nsymbols/*\n.DS_Store\nmigrations\nsymb"
},
{
"path": "ArduinoFrontend/.editorconfig",
"chars": 246,
"preview": "# Editor configuration, see https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size ="
},
{
"path": "ArduinoFrontend/.gitignore",
"chars": 649,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# compiled output\n/dist\n/doc\n/documentation\n/"
},
{
"path": "ArduinoFrontend/Dockerfile",
"chars": 141,
"preview": "FROM node:10-alpine3.11\n\nRUN mkdir /code\nWORKDIR /code\n\nCOPY package.json /code/package.json\nCOPY package-lock.json /cod"
},
{
"path": "ArduinoFrontend/README.md",
"chars": 306,
"preview": "# ArduinoFrontend\n\n## Instructions\n\n* Install Packages\n\n```bash\nnpm install\n```\n\n* Run Server\n\n```bash\nng serve\n```\n\n* A"
},
{
"path": "ArduinoFrontend/angular.json",
"chars": 4736,
"preview": "{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \""
},
{
"path": "ArduinoFrontend/e2e/protractor-ci.conf.js",
"chars": 266,
"preview": "\nconst config = require('./protractor.conf').config;\n\nconfig.capabilities = {\n browserName: 'chrome',\n chromeOptions: "
},
{
"path": "ArduinoFrontend/e2e/protractor.conf.js",
"chars": 752,
"preview": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib"
},
{
"path": "ArduinoFrontend/e2e/src/app.e2e-spec.ts",
"chars": 496,
"preview": "import { AppPage } from './app.po';\nimport { browser, logging } from 'protractor';\n\ndescribe('workspace-project App', ()"
},
{
"path": "ArduinoFrontend/e2e/src/app.po.ts",
"chars": 231,
"preview": "import { browser, by, element } from 'protractor';\n\n/**\n * AppPage End to End Testing\n */\nexport class AppPage {\n /**\n "
},
{
"path": "ArduinoFrontend/e2e/tsconfig.e2e.json",
"chars": 213,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"module\": \"commonjs\",\n "
},
{
"path": "ArduinoFrontend/package.json",
"chars": 2008,
"preview": "{\n \"name\": \"arduino-frontend\",\n \"version\": \"0.8.0\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve --disableHos"
},
{
"path": "ArduinoFrontend/src/app/Libs/AVR8/Execute.ts",
"chars": 7180,
"preview": "import { TaskScheduler } from './Scheduler';\nimport { parseHex } from './IntelHex';\n\n/**\n * AVR8 Global Variable\n */\ndec"
},
{
"path": "ArduinoFrontend/src/app/Libs/AVR8/IntelHex.ts",
"chars": 819,
"preview": "import { saveAs } from 'file-saver';\n/**\n * PART OF AVR8js (Minimal Hex Parser)\n * To Understand Proper Working visit\n *"
},
{
"path": "ArduinoFrontend/src/app/Libs/AVR8/Scheduler.ts",
"chars": 1664,
"preview": "/**\n * Type Definition of Task Callback aka Job that needs to be executed\n */\nexport type TaskCallback = () => void;\n/**"
},
{
"path": "ArduinoFrontend/src/app/Libs/Battery.ts",
"chars": 3217,
"preview": "import { CircuitElement } from './CircuitElement';\n\n/**\n * Battery9V class\n */\nexport class Battery9v extends CircuitEle"
},
{
"path": "ArduinoFrontend/src/app/Libs/CircuitElement.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/Libs/CircuitElement.ts",
"chars": 13970,
"preview": "import { Point } from './Point';\nimport { Wire } from './Wire';\nimport { isNull } from 'util';\nimport { BoundingBox } fr"
},
{
"path": "ArduinoFrontend/src/app/Libs/ConvertJSONFormat.ts",
"chars": 2282,
"preview": "import { ImageToByteArray } from './ImageToByteArray';\n\nexport class ConvertJSONFormat {\n /**\n * Converts JSON of clo"
},
{
"path": "ArduinoFrontend/src/app/Libs/Download.ts",
"chars": 4851,
"preview": "// Declare an Enumeration For Image Type\nexport enum ImageType { PNG, JPG, SVG }\n/**\n * Canvg used For Rendering SVG\n */"
},
{
"path": "ArduinoFrontend/src/app/Libs/General.ts",
"chars": 31233,
"preview": "import { CircuitElement } from './CircuitElement';\nimport { Point } from './Point';\nimport { areBoundingBoxesIntersectin"
},
{
"path": "ArduinoFrontend/src/app/Libs/Geometry.ts",
"chars": 785,
"preview": "import _ from 'lodash';\n\nexport class BoundingBox {\n x: number;\n y: number;\n height: number;\n width: number;"
},
{
"path": "ArduinoFrontend/src/app/Libs/ImageToByteArray.ts",
"chars": 894,
"preview": "export class ImageToByteArray {\n static result = '';\n\n static getDataURLForm(url: string) {\n this.result = "
},
{
"path": "ArduinoFrontend/src/app/Libs/Login.ts",
"chars": 1094,
"preview": "import { environment } from '../../environments/environment';\n\n/**\n * Class For handling Login & Logout\n */\nexport class"
},
{
"path": "ArduinoFrontend/src/app/Libs/MathUtils.ts",
"chars": 317,
"preview": "export class MathUtils {\n static modulo(n, m) {\n return ((n % m) + m) % m;\n }\n\n static isPointBetween(point: [nu"
},
{
"path": "ArduinoFrontend/src/app/Libs/Miscellaneous.ts",
"chars": 5174,
"preview": "import { CircuitElement } from './CircuitElement';\n/**\n * Label class\n */\nexport class Label extends CircuitElement {\n "
},
{
"path": "ArduinoFrontend/src/app/Libs/Point.ts",
"chars": 11556,
"preview": "import { Wire } from './Wire';\nimport { CircuitElement } from './CircuitElement';\nimport { isNull } from 'util';\nimport "
},
{
"path": "ArduinoFrontend/src/app/Libs/RaphaelUtils.ts",
"chars": 293,
"preview": "/**\n * Checks if two raphael element's bounding boxes intersect\n */\nexport function areBoundingBoxesIntersecting(box1, b"
},
{
"path": "ArduinoFrontend/src/app/Libs/SaveOffiline.ts",
"chars": 6153,
"preview": "import { AlertService } from '../alert/alert-service/alert.service';\n\n/**\n * Declare window so that custom created funct"
},
{
"path": "ArduinoFrontend/src/app/Libs/SaveOnline.ts",
"chars": 8851,
"preview": "import { isNull } from 'util';\nimport { Login } from './Login';\nimport { Download, ImageType } from './Download';\nimport"
},
{
"path": "ArduinoFrontend/src/app/Libs/UndoUtils.ts",
"chars": 17980,
"preview": "import { Utils } from './Utils';\nimport { Workspace } from './Workspace';\nimport { isNull } from 'util';\n\ndeclare var wi"
},
{
"path": "ArduinoFrontend/src/app/Libs/Utils.ts",
"chars": 5087,
"preview": "import { Buzzer } from './outputs/Buzzer';\nimport { Battery9v, CoinCell } from './Battery';\nimport { PushButton, SlideSw"
},
{
"path": "ArduinoFrontend/src/app/Libs/Wire.ts",
"chars": 14442,
"preview": "import { Point } from './Point';\nimport _ from 'lodash';\nimport { UndoUtils } from './UndoUtils';\n\n/**\n * To prevent win"
},
{
"path": "ArduinoFrontend/src/app/Libs/Workspace.ts",
"chars": 37537,
"preview": "import { Utils } from './Utils';\nimport { Wire } from './Wire';\nimport { ArduinoUno } from './outputs/Arduino';\nimport {"
},
{
"path": "ArduinoFrontend/src/app/Libs/drivers/L293D.ts",
"chars": 8680,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { BreadBoard } from '../General';\nimport { Point } from '../P"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Buttons.ts",
"chars": 9009,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { BreadBoard } from '../General';\nimport { Point } from '../P"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Collision.ts",
"chars": 3083,
"preview": "/**\n * Position as a Vector\n */\nexport interface Vector {\n /**\n * X Position\n */\n x: number;\n /**\n * Y Positon\n"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/GasSensor.ts",
"chars": 3221,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Collision, Vector } from './Collision';\n\n/// TODO: Handle t"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/PIRSensor.ts",
"chars": 4942,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Collision } from './Collision';\nimport { isNull } from 'uti"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/PhotoResistor.ts",
"chars": 4280,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Slider } from './Slider';\n/**\n * Class Photoresistor\n */\nex"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Potentiometer.ts",
"chars": 25007,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { BreadBoard } from '../General';\nimport { Vector } from './C"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Relay.ts",
"chars": 1885,
"preview": "import { CircuitElement } from '../CircuitElement';\n\n/**\n * Relay Module Class\n */\nexport class Relay extends CircuitEle"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Slider.ts",
"chars": 2255,
"preview": "/**\n * Class for adding a Slider during simulation.\n * Used by temperature sensor and photo resistor\n */\nexport class Sl"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/TemperatureSensors.ts",
"chars": 2247,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Point } from '../Point';\nimport { Slider } from './Slider';"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/Thermistor.ts",
"chars": 11858,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Slider } from './Slider';\nimport { Point } from '../Point';"
},
{
"path": "ArduinoFrontend/src/app/Libs/inputs/UltrasonicSensor.ts",
"chars": 6479,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Collision } from './Collision';\nimport { Point } from '../P"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/Arduino.ts",
"chars": 11473,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { ArduinoRunner } from '../AVR8/Execute';\nimport { isUndefine"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/Buzzer.ts",
"chars": 12771,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { Point } from '../Point';\nimport { ArduinoUno } from '../out"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/Display.ts",
"chars": 22652,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport {\n DataDisplayState, DataProcessingMode, BitState,\n Font8x5"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/LCD/LCDPanel.spec.ts",
"chars": 957,
"preview": "// import { LCDPixel } from './LCDPanel';\n// import { LCD16X2 } from '../Display';\n\n// declare var Raphael;\n\n// describ"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/LCD/LCDPanel.ts",
"chars": 13046,
"preview": "import { LCDUtils } from './LCDUtils';\nimport chroma from 'chroma-js';\nimport LRU from 'lru-cache';\nimport { BoundingBox"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/LCD/LCDStates.ts",
"chars": 12490,
"preview": "import { LCDCharacterPanel } from './LCDPanel';\nimport { LCD16X2 } from '../Display';\nimport { InstructionType, FontSize"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/LCD/LCDUtils.ts",
"chars": 35503,
"preview": "// import _ from 'lodash';\nimport _ from 'lodash-transpose';\n\n// https://mil.ufl.edu/3744/docs/lcdmanual/commands.html\n/"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/LCD/MemorySchema.ts",
"chars": 3418,
"preview": "import _ from 'lodash-transpose';\nimport { LCDUtils, FontSize } from './LCDUtils';\n\n// https://www.8051projects.net/lcd-"
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/Led.ts",
"chars": 34822,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { BreadBoard, Resistor } from '../General';\nimport { Point } "
},
{
"path": "ArduinoFrontend/src/app/Libs/outputs/Motors.ts",
"chars": 33528,
"preview": "import { CircuitElement } from '../CircuitElement';\nimport { ArduinoUno } from './Arduino';\nimport { Point } from '../Po"
},
{
"path": "ArduinoFrontend/src/app/alert/alert-modal/alert-modal.component.css",
"chars": 79,
"preview": ".close-button{\n margin: auto;\n}\n\n.content-message{\n text-align: center;\n}"
},
{
"path": "ArduinoFrontend/src/app/alert/alert-modal/alert-modal.component.html",
"chars": 216,
"preview": "<div class=\"content-message\" mat-dialog-content>\n {{ data.message }}\n</div>\n<div mat-dialog-actions>\n <button class="
},
{
"path": "ArduinoFrontend/src/app/alert/alert-modal/alert-modal.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/alert/alert-modal/alert-modal.component.ts",
"chars": 914,
"preview": "import { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\n\n/"
},
{
"path": "ArduinoFrontend/src/app/alert/alert-service/alert.service.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/alert/alert-service/alert.service.ts",
"chars": 2134,
"preview": "import { Injectable } from '@angular/core';\nimport { AlertModalComponent } from '../alert-modal/alert-modal.component';\n"
},
{
"path": "ArduinoFrontend/src/app/alert/confirm-modal/confirm-modal.component.css",
"chars": 112,
"preview": ".confirm-buttons{\n text-align: center;\n display: block;\n}\n\n.response-button {\n display: inline-block;\n}"
},
{
"path": "ArduinoFrontend/src/app/alert/confirm-modal/confirm-modal.component.html",
"chars": 489,
"preview": "<div mat-dialog-content>\n {{ data.message }}\n</div>\n<div class=\"confirm-buttons\" mat-dialog-actions>\n <button class=\"r"
},
{
"path": "ArduinoFrontend/src/app/alert/confirm-modal/confirm-modal.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/alert/confirm-modal/confirm-modal.component.ts",
"chars": 1474,
"preview": "import { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\n\n/"
},
{
"path": "ArduinoFrontend/src/app/alert/option-modal/option-modal.component.css",
"chars": 155,
"preview": ".option-buttons{\n text-align: center;\n display: block;\n}\n\n.response-button {\n display: block;\n width: 100%;\n"
},
{
"path": "ArduinoFrontend/src/app/alert/option-modal/option-modal.component.html",
"chars": 477,
"preview": "<div mat-dialog-content>\n {{ data.message }}\n</div>\n<div class=\"option-buttons\" mat-dialog-actions>\n <button class=\"re"
},
{
"path": "ArduinoFrontend/src/app/alert/option-modal/option-modal.component.ts",
"chars": 1514,
"preview": "import { Component, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';\n\n/"
},
{
"path": "ArduinoFrontend/src/app/api.service.spec.ts",
"chars": 539,
"preview": "import { TestBed } from '@angular/core/testing';\n\nimport { ApiService } from './api.service';\nimport { HttpClientTesting"
},
{
"path": "ArduinoFrontend/src/app/api.service.ts",
"chars": 14196,
"preview": "import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\n"
},
{
"path": "ArduinoFrontend/src/app/app-routing.module.ts",
"chars": 1055,
"preview": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { SimulatorCom"
},
{
"path": "ArduinoFrontend/src/app/app.component.css",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/app.component.html",
"chars": 32,
"preview": "<router-outlet></router-outlet>\n"
},
{
"path": "ArduinoFrontend/src/app/app.component.spec.ts",
"chars": 600,
"preview": "import { TestBed, async } from '@angular/core/testing';\nimport { RouterTestingModule } from '@angular/router/testing';\ni"
},
{
"path": "ArduinoFrontend/src/app/app.component.ts",
"chars": 503,
"preview": "import { Component, AfterViewInit } from '@angular/core';\n\n/**\n * The Main App Component\n */\n@Component({\n selector: 'a"
},
{
"path": "ArduinoFrontend/src/app/app.module.ts",
"chars": 4873,
"preview": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/co"
},
{
"path": "ArduinoFrontend/src/app/code-editor/code-editor.component.css",
"chars": 674,
"preview": ".alert {\n border-bottom: 1px solid;\n border-top: 1px solid;\n padding: 8px;\n margin-bottom: 0px;\n display:"
},
{
"path": "ArduinoFrontend/src/app/code-editor/code-editor.component.html",
"chars": 2695,
"preview": "<div [style.width.px]=width [style.minHeight]=\"height+'vh'\" style=\"margin-top: 0px;\">\n\n <div class=\" text text-center\" "
},
{
"path": "ArduinoFrontend/src/app/code-editor/code-editor.component.spec.ts",
"chars": 742,
"preview": "import { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { CodeEditorComponent } from './code-e"
},
{
"path": "ArduinoFrontend/src/app/code-editor/code-editor.component.ts",
"chars": 53938,
"preview": "import { Component, OnInit, Input } from '@angular/core';\nimport { ArduinoUno } from '../Libs/outputs/Arduino';\nimport {"
},
{
"path": "ArduinoFrontend/src/app/common/SharedModule.module.ts",
"chars": 483,
"preview": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HeaderComponent } fro"
},
{
"path": "ArduinoFrontend/src/app/common/material.module.ts",
"chars": 3443,
"preview": "import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatAutocompleteModule"
},
{
"path": "ArduinoFrontend/src/app/componentlist/componentlist.component.css",
"chars": 449,
"preview": "button:focus {\n outline: none !important;\n}\n\ntable,\ntd {\n border: 1px solid #c5cfd9;\n}\n\ntable {\n border-collaps"
},
{
"path": "ArduinoFrontend/src/app/componentlist/componentlist.component.html",
"chars": 899,
"preview": "<h1 mat-dialog-title style=\"margin:10px\">Component List</h1>\n<mat-divider></mat-divider>\n<div style=\"overflow-x:auto;\">\n"
},
{
"path": "ArduinoFrontend/src/app/componentlist/componentlist.component.spec.ts",
"chars": 1,
"preview": "\n"
},
{
"path": "ArduinoFrontend/src/app/componentlist/componentlist.component.ts",
"chars": 3241,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material';\nimport {"
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard-routing.module.ts",
"chars": 1192,
"preview": "import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { GalleryCompon"
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard.component.css",
"chars": 421,
"preview": "\n.example-container {\n min-height: 876px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n}\n\n.no-search {\n display: flex;\n j"
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard.component.html",
"chars": 3702,
"preview": "<app-header title=\"Dashboard\"></app-header>\n\n<div id=\"main\">\n <!-- <mat-toolbar color=\"primary\" class=\"example-toolbar\""
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard.component.ts",
"chars": 278,
"preview": "import { Component, OnInit, Input, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'app-dashboard',\n templa"
},
{
"path": "ArduinoFrontend/src/app/dashboard/dashboard.module.ts",
"chars": 1192,
"preview": "import { CommonModule, HashLocationStrategy, LocationStrategy } from '@angular/common';\nimport { HttpClientModule } from"
},
{
"path": "ArduinoFrontend/src/app/exit-confirm-dialog/exit-confirm-dialog.component.css",
"chars": 69,
"preview": ".action-div{\n display: flex;\n justify-content: space-around;\n}\n"
},
{
"path": "ArduinoFrontend/src/app/exit-confirm-dialog/exit-confirm-dialog.component.html",
"chars": 246,
"preview": "<h2 mat-dialog-title>Do you want to exit?</h2>\n<div mat-dialog-actions class=\"action-div\">\n <button mat-raised-button c"
},
{
"path": "ArduinoFrontend/src/app/exit-confirm-dialog/exit-confirm-dialog.component.spec.ts",
"chars": 885,
"preview": "import { async, ComponentFixture, TestBed } from '@angular/core/testing';\nimport { MatDialogModule, MatDialogRef } from "
},
{
"path": "ArduinoFrontend/src/app/exit-confirm-dialog/exit-confirm-dialog.component.ts",
"chars": 524,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n@Component({\n sel"
},
{
"path": "ArduinoFrontend/src/app/export-jsondialog/export-jsondialog.component.css",
"chars": 32,
"preview": ".full-width{\n width: 100%;\n}\n"
},
{
"path": "ArduinoFrontend/src/app/export-jsondialog/export-jsondialog.component.html",
"chars": 469,
"preview": "<div mat-dialog-title>\n Enter the name of File to be Saved\n</div>\n<mat-dialog-content>\n <br>\n <mat-form-field class=\""
},
{
"path": "ArduinoFrontend/src/app/export-jsondialog/export-jsondialog.component.spec.ts",
"chars": 2613,
"preview": "import { TestBed, async, ComponentFixture } from '@angular/core/testing';\nimport { FormsModule } from '@angular/forms';\n"
},
{
"path": "ArduinoFrontend/src/app/export-jsondialog/export-jsondialog.component.ts",
"chars": 872,
"preview": "import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/mater"
},
{
"path": "ArduinoFrontend/src/app/exportfile/exportfile.component.css",
"chars": 170,
"preview": ".radio-group{\n display: flex;\n flex-direction: column;\n margin-top: 5px;\n margin-bottom: 55px; \n height: "
},
{
"path": "ArduinoFrontend/src/app/exportfile/exportfile.component.html",
"chars": 788,
"preview": "<h1 mat-dialog-title style=\"margin:2px\">Export as</h1>\n<mat-divider></mat-divider>\n<mat-radio-group class=\"radio-group\" "
},
{
"path": "ArduinoFrontend/src/app/exportfile/exportfile.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/exportfile/exportfile.component.ts",
"chars": 1787,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { Download, ImageType } from '../Libs/Download';\nimport { Titl"
},
{
"path": "ArduinoFrontend/src/app/front-page/front-page.component.css",
"chars": 795,
"preview": "#titlepage {\n background-color: white;\n position: relative;\n color: black;\n top: 80px;\n width: 80%;\n m"
},
{
"path": "ArduinoFrontend/src/app/front-page/front-page.component.html",
"chars": 18753,
"preview": "<app-header title=\"Arduino on Cloud\" color=\"cornflowerblue\" front=\"true\"></app-header>\n\n\n<div style=\"min-height: 90vh;di"
},
{
"path": "ArduinoFrontend/src/app/front-page/front-page.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/front-page/front-page.component.ts",
"chars": 2125,
"preview": "import { Component, OnInit } from '@angular/core';\n\n/**\n * Class For Front page contains Seven Segment animation logic\n "
},
{
"path": "ArduinoFrontend/src/app/gallery/gallery.component.css",
"chars": 468,
"preview": ".subbox {\n box-sizing: border-box;\n width: 95%;\n height: auto;\n background-color: white;\n border-radius: "
},
{
"path": "ArduinoFrontend/src/app/gallery/gallery.component.html",
"chars": 1806,
"preview": "<!-- <app-header title=\"Gallery\"></app-header> -->\n<mat-sidenav-container class=\"example-container\" autosize>\n <app-sid"
},
{
"path": "ArduinoFrontend/src/app/gallery/gallery.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/gallery/gallery.component.ts",
"chars": 2951,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { ApiService } from '../api.service';\nimport { filter, map } f"
},
{
"path": "ArduinoFrontend/src/app/graph/graph.component.css",
"chars": 569,
"preview": ".graph-container {\n max-width: fit-content;\n min-width: 420px;\n min-height: 180px;\n padding: 15px;\n border: 1px sol"
},
{
"path": "ArduinoFrontend/src/app/graph/graph.component.html",
"chars": 267,
"preview": "<div class=\"graph-container\">\n <div>\n <b>\n Pin : {{ pinLabel }}\n </b>\n <button mat-icon-button color=\"war"
},
{
"path": "ArduinoFrontend/src/app/graph/graph.component.ts",
"chars": 3483,
"preview": "import { Component, Directive, Input, OnInit, AfterViewInit, Output } from '@angular/core';\nimport { Chart } from 'chart"
},
{
"path": "ArduinoFrontend/src/app/graph-data.service.ts",
"chars": 395,
"preview": "import { Injectable, EventEmitter } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GraphDataS"
},
{
"path": "ArduinoFrontend/src/app/graphlist/graphlist.component.css",
"chars": 498,
"preview": ".graph-container {\n left: calc(100vw - 460px);\n display: block;\n position: fixed;\n max-width: fit-content;\n min-wid"
},
{
"path": "ArduinoFrontend/src/app/graphlist/graphlist.component.html",
"chars": 952,
"preview": "<div class=\"graph-container\" cdkDrag cdkDragBoundary=\".cdk-overlay-container\">\n <div class=\"p-1\">\n <h4 style=\"displa"
},
{
"path": "ArduinoFrontend/src/app/graphlist/graphlist.component.ts",
"chars": 5256,
"preview": "import { Component, Input, OnInit, Output, QueryList, ViewChildren } from '@angular/core';\nimport { ActivatedRoute, Rout"
},
{
"path": "ArduinoFrontend/src/app/header/header.component.css",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/header/header.component.html",
"chars": 4067,
"preview": "<!-- As a heading -->\n<div style=\"background:whitesmoke;display: flex; height: 60px\">\n <div class=\"head-title\" style=\"d"
},
{
"path": "ArduinoFrontend/src/app/header/header.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/header/header.component.ts",
"chars": 2804,
"preview": "import { Component, OnInit, Input, OnDestroy } from '@angular/core';\nimport { Login } from '../Libs/Login';\nimport { Api"
},
{
"path": "ArduinoFrontend/src/app/layout/ArduinoCanvasInterface.ts",
"chars": 6323,
"preview": "import { Canvas, Point, Block, Path } from './Components';\nimport { CircuitElement } from '../Libs/CircuitElement';\nimpo"
},
{
"path": "ArduinoFrontend/src/app/layout/Components.ts",
"chars": 25488,
"preview": "import _ from 'lodash';\n// const _ = require('lodash');\n\nexport class MathHelper {\n /**\n * Checks if two numbers"
},
{
"path": "ArduinoFrontend/src/app/layout/PathUtils.ts",
"chars": 19964,
"preview": "import { Line, Point, Block, Canvas, Orientation, CanvasUtils, Path, MathHelper, CanvasElement, OrientationUtil } from '"
},
{
"path": "ArduinoFrontend/src/app/lti-form/lti-form.component.css",
"chars": 375,
"preview": "form {\n\tmargin: 30px;\n}\n\nmat-form-field {\n\twidth: 100%;\n}\n\n.code-weight {\n\tpadding-top: 25pt;\n}\n\n.form-buttons {\n\tpaddin"
},
{
"path": "ArduinoFrontend/src/app/lti-form/lti-form.component.html",
"chars": 8444,
"preview": "<app-header title=\"Create LTI App\"></app-header>\n<h3 *ngIf=\"modelCircuit\" class=\"text-dark\"\n style=\"text-align:center;\""
},
{
"path": "ArduinoFrontend/src/app/lti-form/lti-form.component.ts",
"chars": 16665,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { ApiService } from '../api.service';\nimport { AlertService } "
},
{
"path": "ArduinoFrontend/src/app/lti-form/view-code/view-code.component.css",
"chars": 69,
"preview": "textarea {\n width: 100%;\n resize: none;\n font-family: monospace;\n}"
},
{
"path": "ArduinoFrontend/src/app/lti-form/view-code/view-code.component.html",
"chars": 430,
"preview": "<div #noCodeSection>\n No arduino present in the circuit.\n</div>\n<div #codeSection>\n <mat-select class=\"form-control\" ("
},
{
"path": "ArduinoFrontend/src/app/lti-form/view-code/view-code.component.ts",
"chars": 2368,
"preview": "import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { ApiService } from 'src/app/api"
},
{
"path": "ArduinoFrontend/src/app/main-page/main-page.component.css",
"chars": 2277,
"preview": ".example-container {\n min-height: 876px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n }\n \n .no-search {\n display"
},
{
"path": "ArduinoFrontend/src/app/main-page/main-page.component.html",
"chars": 9962,
"preview": "<div *ngIf=\"isCloudCircuit\" class=\"maincontent\">\n <h3\n style=\"font-weight: 900; font-family: 'Franklin Gothic Medium"
},
{
"path": "ArduinoFrontend/src/app/main-page/main-page.component.spec.ts",
"chars": 1067,
"preview": "import { async, ComponentFixture, TestBed } from '@angular/core/testing';\nimport { HttpClientTestingModule, HttpTestingC"
},
{
"path": "ArduinoFrontend/src/app/main-page/main-page.component.ts",
"chars": 20183,
"preview": "import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, OnInit, ViewChild } from '@angular/core';\n"
},
{
"path": "ArduinoFrontend/src/app/side-panel/side-panel.component.css",
"chars": 541,
"preview": ".example-sidenav {\n min-width: 200px;\n user-select: none;\n}\n.full-width {\n width: 100%;\n}\n.menu-button {\n tr"
},
{
"path": "ArduinoFrontend/src/app/side-panel/side-panel.component.html",
"chars": 1798,
"preview": "<mat-sidenav #sidenav class=\"example-sidenav\" mode=\"side\" opened=\"true\">\n <mat-nav-list>\n <mat-list-item *ngIf=\"user"
},
{
"path": "ArduinoFrontend/src/app/side-panel/side-panel.component.spec.ts",
"chars": 1030,
"preview": "import { HttpClientTestingModule } from '@angular/common/http/testing';\nimport { async, ComponentFixture, TestBed } from"
},
{
"path": "ArduinoFrontend/src/app/side-panel/side-panel.component.ts",
"chars": 1707,
"preview": "import { Route } from '@angular/compiler/src/core';\nimport { Component, EventEmitter, OnInit, Output, ViewChild } from '"
},
{
"path": "ArduinoFrontend/src/app/simulator/save-project-dialog/save-project-dialog.component.html",
"chars": 505,
"preview": "<div mat-dialog-content>\n Project name\n <form style=\"min-width: 300px;\">\n <mat-form-field style=\"width: 100%;\">\n "
},
{
"path": "ArduinoFrontend/src/app/simulator/save-project-dialog/save-project-dialog.component.spec.ts",
"chars": 1674,
"preview": "import { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { SaveProjectDialogComponent } from '."
},
{
"path": "ArduinoFrontend/src/app/simulator/save-project-dialog/save-project-dialog.component.ts",
"chars": 1078,
"preview": "import { Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material';\nimport { MatDial"
},
{
"path": "ArduinoFrontend/src/app/simulator/simulator.component.css",
"chars": 6436,
"preview": ".pipe {\n color: #999;\n margin: 0px 12px;\n font-size: 33px;\n}\n\n.mynode:hover {\n fill: #f00 !important;\n stroke: blac"
},
{
"path": "ArduinoFrontend/src/app/simulator/simulator.component.html",
"chars": 21431,
"preview": "<!-- As a heading -->\n<nav class=\"navbar navbar-expand-lg navbar-light text-white\" style=\"background-color: whitesmoke;h"
},
{
"path": "ArduinoFrontend/src/app/simulator/simulator.component.spec.ts",
"chars": 1768,
"preview": "import { HttpClientModule } from '@angular/common/http';\nimport { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\nimport "
},
{
"path": "ArduinoFrontend/src/app/simulator/simulator.component.ts",
"chars": 29993,
"preview": "import { Component, OnInit, Injector, ViewEncapsulation, OnDestroy, EventEmitter } from '@angular/core';\nimport { Activa"
},
{
"path": "ArduinoFrontend/src/app/submissionlist/submissionlist.component.css",
"chars": 25,
"preview": "table {\n width: 100%;\n}\n"
},
{
"path": "ArduinoFrontend/src/app/submissionlist/submissionlist.component.html",
"chars": 2735,
"preview": "<app-header title=\"Submissions\"></app-header>\n\n<h3 style=\"font-weight: 900; font-family: 'Franklin Gothic Medium', 'Aria"
},
{
"path": "ArduinoFrontend/src/app/submissionlist/submissionlist.component.ts",
"chars": 5155,
"preview": "import { Component, OnInit, ViewChild } from '@angular/core';\nimport { MatPaginator, MatSort, MatTableDataSource } from "
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/create-variation-dialog/create-variation-dialog.component.css",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/create-variation-dialog/create-variation-dialog.component.html",
"chars": 660,
"preview": "<h2 mat-dialog-title>Create New Variation</h2>\n<div mat-dialog-content>\n\n <mat-form-field>\n <mat-label>Variation Nam"
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/create-variation-dialog/create-variation-dialog.component.ts",
"chars": 970,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { Ma"
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/versioning-panel.component.css",
"chars": 472,
"preview": ".var-selected {\n background-color: #dddddd;\n}\n.version-list {\n padding: 6px 24px;\n cursor: pointer;\n transit"
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/versioning-panel.component.html",
"chars": 1885,
"preview": "<br>\n<div>\n\n <div style=\"display: flex; justify-content: space-between; margin: 0 12px;\">\n <h4 style=\"text-align:cen"
},
{
"path": "ArduinoFrontend/src/app/versioning-panel/versioning-panel.component.ts",
"chars": 7169,
"preview": "import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { MatAccordion, MatDia"
},
{
"path": "ArduinoFrontend/src/app/view-component-info/view-component-info.component.css",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/view-component-info/view-component-info.component.html",
"chars": 992,
"preview": "<h1 mat-dialog-title>{{data.name}}</h1>\n<div mat-dialog-content>\n <img src={{data.image}} alt={{data.name}} style=\"max-"
},
{
"path": "ArduinoFrontend/src/app/view-component-info/view-component-info.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/view-component-info/view-component-info.component.ts",
"chars": 1658,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material';\n\n/**\n * Class for V"
},
{
"path": "ArduinoFrontend/src/app/view-project/view-project.component.css",
"chars": 174,
"preview": ".data-body div {\n font-weight: bold;\n}\n.data-body label {\n font-weight: normal;\n}\n.data-body button {\n margin: 15px 1"
},
{
"path": "ArduinoFrontend/src/app/view-project/view-project.component.html",
"chars": 2679,
"preview": "<app-header title=\"Arduino on Cloud\" color=\"cornflowerblue\"></app-header>\n\n<div style=\"overflow: hidden;max-width:100vw;"
},
{
"path": "ArduinoFrontend/src/app/view-project/view-project.component.spec.ts",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/app/view-project/view-project.component.ts",
"chars": 4552,
"preview": "import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { ApiService"
},
{
"path": "ArduinoFrontend/src/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "ArduinoFrontend/src/assets/404page.html",
"chars": 170,
"preview": "<div style=\"text-align: center;margin-top: 20%;\">\n <h1>Oops!</h1>\n <h1>404 Not Found</h1>\n <h5>Sorry, an error "
},
{
"path": "ArduinoFrontend/src/assets/avr8js/index.js",
"chars": 67044,
"preview": "parcelRequire = (function (e, r, t, n) {\n var i,\n o = \"function\" == typeof parcelRequire && parcelRequire,\n u = \""
},
{
"path": "ArduinoFrontend/src/assets/canvg/index.babel.js",
"chars": 185754,
"preview": "import requestAnimationFrame from 'raf';\nimport RGBColor from 'rgbcolor';\nimport { canvasRGBA } from 'stackblur-canvas';"
},
{
"path": "ArduinoFrontend/src/assets/canvg/index.es.js",
"chars": 341020,
"preview": "import 'core-js/modules/es.array.map';\nimport 'core-js/modules/es.regexp.exec';\nimport 'core-js/modules/es.string.match'"
},
{
"path": "ArduinoFrontend/src/assets/canvg/index.js",
"chars": 343533,
"preview": "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (e"
},
{
"path": "ArduinoFrontend/src/assets/canvg/umd.js",
"chars": 187375,
"preview": "(function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?def"
},
{
"path": "ArduinoFrontend/src/assets/images/ComponentmeasuresForSimulation.txt",
"chars": 710,
"preview": "Component \t MinVol\t\tMaxVol\t\tMinCurrent\t\tMaxCurrent\n\nBuzzer\t\t4V\t\t8V\t\t\t\t\t0.03A or <30mA\n\nArduinoUNO R3\t7V\t\t12V\t\t\t\t\t40 mA"
},
{
"path": "ArduinoFrontend/src/assets/images/RGB CODE.txt",
"chars": 2098,
"preview": "5 Strip\n1-Digit \n\nColor\t\tRGB\t\t\tHEX\n1 Brown\t\trgb(165,42,42)\t\t#A52A2A\n2 Red\t\trgb(255,0,0)\t\t#FF0000\n3 Orange\trgb(255,165,0)"
},
{
"path": "ArduinoFrontend/src/assets/jsons/Arduino.json",
"chars": 3673,
"preview": "{\n \"name\": \"Arduino UNO R3\",\n \"className\": \"ArduinoUno\",\n \"pointHalf\": 4,\n \"pins\": [\n {\n \"x\": 182,\n \"y\""
},
{
"path": "ArduinoFrontend/src/assets/jsons/Battery9v.json",
"chars": 1105,
"preview": "{\n \"name\": \"Battery 9v\",\n \"className\": \"Battery9v\",\n \"pointHalf\": 4,\n \"pins\": [\n {\n \"x\": -"
},
{
"path": "ArduinoFrontend/src/assets/jsons/Breadboard.json",
"chars": 26543,
"preview": " {\n \"name\": \"Breadboard\",\n \"className\": \"BreadBoard\",\n \"pointHalf\": 4,\n \"pins\": [\n {\n \"x\":15,\n \"y\":1"
},
{
"path": "ArduinoFrontend/src/assets/jsons/Buzzer.json",
"chars": 1677,
"preview": "{\n \"name\": \"Buzzer\",\n \"className\": \"Buzzer\",\n \"pins\": [\n {\n \"x\": 11,\n \"y\": 76,\n \"name\": \"POSITIVE\"\n"
},
{
"path": "ArduinoFrontend/src/assets/jsons/CoinCell.json",
"chars": 1409,
"preview": "{\n \"name\": \"Coin Cell 3V\",\n \"className\": \"CoinCell\",\n \"pins\": [\n {\n \"x\": 25,\n \"y\":"
},
{
"path": "ArduinoFrontend/src/assets/jsons/Component.sample.json",
"chars": 874,
"preview": "{\n \"name\": \"\",\n \"className\": \"\",\n \"pins\": [\n {\n \"x\": 10,\n \"y\": 10,\n \"na"
},
{
"path": "ArduinoFrontend/src/assets/jsons/L293D.json",
"chars": 2584,
"preview": "{\r\n \"name\": \"L293D Motor Driver IC\",\r\n \"className\": \"L293D\",\r\n \"pins\": [\r\n {\r\n \"x\": 0,\r\n \"y\": -4,\r\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/L298N.json",
"chars": 2004,
"preview": "{\n \"name\": \"Motor Driver L298N\",\n \"className\": \"L298N\",\n \"pins\": [\n {\n \"x\": 118,\n \"y\": 9,\n \"name\": "
},
{
"path": "ArduinoFrontend/src/assets/jsons/LCD16X2.json",
"chars": 2879,
"preview": "{\n \"name\": \"LCD 16x2\",\n \"className\": \"LCD16X2\",\n \"pointHalf\": 3,\n \"pins\": [\n {\n \"x\": 39,\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/LED.json",
"chars": 1657,
"preview": "{\n \"name\": \"LED\",\n \"className\": \"LED\",\n \"pointHalf\": 4,\n \"pins\": [\n {\n \"x\": -15,\n \"y\": 64,\n \"name\""
},
{
"path": "ArduinoFrontend/src/assets/jsons/MQ2.json",
"chars": 1787,
"preview": "{\n \"name\": \"Gas Sensor MQ2\",\n \"className\": \"MQ2\",\n \"pins\": [\n {\n \"x\": 19,\n \"y\": 163,\n \"name\": \"VCC\""
},
{
"path": "ArduinoFrontend/src/assets/jsons/Motor.json",
"chars": 1307,
"preview": "{\n \"name\": \"Motor\",\n \"className\": \"Motor\",\n \"pins\": [\n {\n \"x\": 24,\n \"y\": 51,\n \"name\": \"Negative\"\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/PIRSensor.json",
"chars": 2261,
"preview": "{\n \"name\": \"PIR Sensor\",\n \"className\": \"PIRSensor\",\n \"pins\": [\n {\n \"x\": 81,\n \"y\": 161,\n \"name\": \"SI"
},
{
"path": "ArduinoFrontend/src/assets/jsons/PhotoResistor.json",
"chars": 5298,
"preview": "{\n \"name\": \"Photo Resistor\",\n \"className\": \"PhotoResistor\",\n \"pins\": [\n {\n \"x\": 13,\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/Potentiometer.json",
"chars": 1899,
"preview": "{\n \"name\": \"Potentiometer\",\n \"className\": \"Potentiometer\",\n \"pins\": [\n {\n \"x\": 16.5,\n \"y\": 75.025,\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/PushButton.json",
"chars": 3018,
"preview": "{\n \"name\": \"Push Button\",\n \"className\": \"PushButton\",\n \"pins\": [\n {\n \"x\": 9,\n \"y\": -19,\n \"name\": \"T"
},
{
"path": "ArduinoFrontend/src/assets/jsons/RGBLED.json",
"chars": 1542,
"preview": "{\n \"name\": \"RGB LED\",\n \"className\": \"RGBLED\",\n \"pointHalf\": 6,\n \"pins\": [\n {\n \"x\": -3,\n \"y\": 95,\n "
},
{
"path": "ArduinoFrontend/src/assets/jsons/Relay.json",
"chars": 1526,
"preview": "{\n \"name\": \"Relay Module\",\n \"className\": \"RelayModule\",\n \"pins\": [\n {\n \"x\": 33,\n \"y\": 18,\n \"name\": "
}
]
// ... and 322 more files (download for full content)
About this extraction
This page contains the full source code of the frg-fossee/eSim-Cloud GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 522 files (4.9 MB), approximately 1.3M tokens, and a symbol index with 2903 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.