Repository: MobileUI/components Branch: master Commit: fb96b978273e Files: 167 Total size: 1.2 MB Directory structure: gitextract_g7aahqj_/ ├── .gitignore ├── CONTRIBUTE.md ├── LICENSE ├── README.md ├── alert/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── assets/ │ ├── css/ │ │ └── master.css │ └── js/ │ └── main.js ├── base/ │ ├── badge.html │ ├── base.html │ ├── base.js │ ├── card.html │ ├── colors.css │ ├── colors.html │ ├── component.json │ ├── font.css │ ├── fonts.html │ ├── icons.css │ ├── icons.html │ ├── install.html │ ├── mobileui.css │ ├── reset.css │ └── templates.html ├── button/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── chart-bar/ │ ├── component.json │ ├── index.html │ └── style.css ├── chartist/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── chartist-plugin-tooltip/ │ ├── component.json │ ├── script.js │ └── style.css ├── chartjs/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── cover/ │ ├── component.json │ ├── index.html │ └── style.css ├── dist/ │ ├── alert.json │ ├── base.json │ ├── button.json │ ├── chart-bar.json │ ├── chartist-plugin-tooltip.json │ ├── chartist.json │ ├── chartjs.json │ ├── cover.json │ ├── grid.json │ ├── header.json │ ├── horizontal-scroll.json │ ├── imports.css │ ├── include.json │ ├── input.json │ ├── jquery.json │ ├── list.json │ ├── loading.json │ ├── menu.json │ ├── mobileui-colors.json │ ├── mobileuijs.json │ ├── momentjs.json │ ├── page.json │ ├── popover.json │ ├── progress-circle.json │ ├── progress-circular.json │ ├── progress-semicircle.json │ ├── progressbarjs.json │ ├── pulltorefresh.json │ ├── swiper.json │ ├── tab.json │ ├── templates.json │ ├── timeline.json │ └── toast.json ├── docs.json ├── generate_dist.js ├── generate_doc.js ├── grid/ │ ├── component.json │ ├── index.html │ └── style.css ├── header/ │ ├── component.json │ ├── index.html │ └── style.css ├── horizontal-scroll/ │ ├── component.json │ ├── index.html │ └── style.css ├── include/ │ ├── component.json │ ├── index.html │ ├── myfile1.html │ ├── myfile2.html │ ├── script.js │ └── style.css ├── input/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── jquery/ │ ├── component.json │ ├── index.html │ └── script.js ├── list/ │ ├── component.json │ ├── index.html │ └── style.css ├── loading/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── menu/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── mobileui-colors/ │ ├── component.json │ ├── script.js │ └── style.css ├── mobileuijs/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── momentjs/ │ ├── component.json │ ├── index.html │ └── script.js ├── package.json ├── page/ │ ├── component.json │ ├── contact.html │ ├── contact.js │ ├── contacts.html │ ├── index.html │ ├── script.js │ └── style.css ├── popover/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── progress-circle/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── progress-semicircle/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── progressbarjs/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── pulltorefresh/ │ ├── component.json │ ├── index.html │ └── script.js ├── swiper/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── tab/ │ ├── component.json │ ├── index.html │ ├── script.js │ └── style.css ├── timeline/ │ ├── component.json │ ├── index.html │ └── style.css └── toast/ ├── component.json ├── index.html ├── script.js └── style.css ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Logs logs *.log npm-debug.log* .DS_Store # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # nyc test coverage .nyc_output # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules jspm_packages # Optional npm cache directory .npm # Optional REPL history .node_repl_history ================================================ FILE: CONTRIBUTE.md ================================================ # Contributing to MobileUI Components First off, thanks for taking the time to contribute! :+1: We do our best to accept all PRs that can improve this project! :tada: The following is a set of guidelines for contributing to MobileUI Components and its packages, which are hosted in the [MobileUI](https://github.com/MobileUI) organization here at Github. These are mostly guidelines to help you guys get started and not rules. Use your best judgement, and feel free to propose changes to our project through a pull request. :smile: ## What should I know before contributing? MobileUI is an open source project created thinking of making your hybrid applications faster and smaller. It helps a lot since you're not required to install the whole package, you only install what you need to get started in building your application. :tada: Certainly, you will love using it in [Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) and [Apache Cordova Apps](https://cordova.apache.org). You can use only the components you want in your projects created with [PhoneGap](https://phonegap.com/), [Ionic Framework](https://ionicframework.com/), [Onsen UI](https://onsen.io/), [Framework7](http://framework7.io/) and others focused on creating web apps. A rich variety of UI components specially designed for mobile apps. MobileUI provides tabs, side menu, stack navigation and tons of other components such as lists and forms. Some of the existing components are displayed differently on Android and iOS, with automatic styling that will change the appearance of the app based on the platform. To know more --- check out the official [documentation](https://mobileui.github.io/#getting-started) ## Getting Started --- ### Process of creating a new component 1) In the project's root dir, create a folder named after the component you will create, for example `list` or `chart-bar`. 2) Create a file named `component.json` inside the folder. The content of the `component.json` file should follow this structure: ```JSON { "name":"chart-bar", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ``` 3) Test and document your component in an HTML file inside your component's folder. > Include usage examples and all the options that your component accept so other people can use the component correctly! 4) Open a Pull Request against the `master` branch 5) Wait for review and discussion. > If we don't respond within a few days, send a message in the PR thread! =) 6) Your code will be merged if accepted! ### Re-generating MobileUI documentation 1) Fork and clone (your fork) [components repo]() and [mobileui.github.io repo]() inside the same parent folder. ``` __ parent/ |_ components/ |_ mobileui.github.io/ ``` 2) With your terminal, inside the **components** project, execute the `generate_docs.js` with node: ```bash node generate_docs.js ``` 3) Then, new files should be generated at **mobileui.github.io** folder. Now it's simple: add and commit these files to your fork project. 4) At GitHub, open the PR from your fork of **mobileui.github.io** to our repository with this commit with the new generated files. 5) We'll check and, if everything is ok, accept your merge! ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2017 MobileUI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ ![MobileUI](logo_m.png) ====== [MobileUI](https://mobileui.github.io) is a simple and easy NPM package to install UI Components for web mobile apps using HTML, CSS and JavaScript. MobileUI provides a rich variety of UI components specially designed for mobile apps like tabs, side menu, stack navigation and tons of other components such as lists and forms. They all have iOS and Android support, with automatic styling that will change the appearance of the app based on the platform. With MobileUI you can truly support both Android and iOS with the same source code. > See the docs in: https://mobileui.github.io/ Quickstart ---------- The Installation is very simple, but first you need to install Node.js With Node.js installed, run in your terminal: `npm install mobileui -g` To check the version of mobileui installed, Open the terminal and type `mobileui` Links --------------- - [Install and features](https://mobileui.github.io/#getting-started) - [Documentation](https://mobileui.github.io) - [Contributing](https://github.com/MobileUI/components/blob/master/CONTRIBUTE.md) ================================================ FILE: alert/component.json ================================================ { "name":"alert", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: alert/index.html ================================================

Alert

Alerts are a great way to offer the user the ability to choose a specific action or list of actions. They also can provide the user with important information, or require them to make a decision (or multiple decisions).

From a UI perspective, Alerts can be thought of as a type of “floating” modal that covers only a portion of the screen. This means Alerts should only be used for quick actions like password verification, small app notifications, or quick options.

Dependency: base. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install alert

To use, you need to call the function alert('YOUR MESSAGE') or alert(objectCustomized), and you can send more paramters for create alert with title or multiple options.

See this small example:

You can add class with more advanced customized alert:

Another option like modal component you can add list and input by template with more advanced customized alert:

If you need make bind in inputs into a alert just listener event:

================================================ FILE: alert/script.js ================================================ window.alert = function (message, title) { var configAlert = {} if (typeof message === 'object') { configAlert = message } else { configAlert.message = message configAlert.title = title } if (!configAlert.id) { configAlert.id = 'ALERT' + new Date().getTime() } if (!configAlert.buttons || !configAlert.buttons.length) { configAlert.buttons = [ { label: 'OK', onclick: function () { closeAlert() } } ] } var body = document.getElementsByTagName('body')[0] if (event && event.target && event.target.parentNode && event.target.parentNode.className.indexOf('body') >= 0) { body = event.target.parentNode } var e = document.createElement('div') e.className = 'backdrop show backdrop-alert' e.id = configAlert.id + '_BACKDROP' body.appendChild(e) var alertMobileUI = document.createElement('div') alertMobileUI.className = 'alert-mobileui' alertMobileUI.id = configAlert.id e.parentNode.appendChild(alertMobileUI) var alertContent = document.createElement('div') if (!configAlert.class) { configAlert.class = 'white' } alertContent.className = 'alert ' + configAlert.class if (configAlert.width) { alertContent.style.maxWidth = configAlert.width } alertMobileUI.appendChild(alertContent) if (configAlert.title) { var h1 = '

' + configAlert.title + '

' alertContent.insertAdjacentHTML('beforeend', h1) } if (configAlert.message) { var p = '

' + configAlert.message + '

' alertContent.insertAdjacentHTML('beforeend', p) } if (configAlert.template) { alertContent.insertAdjacentHTML('beforeend', document.getElementById(configAlert.template).innerHTML) } var buttons = document.createElement('div') buttons.className = 'buttons' alertContent.appendChild(buttons) for (var i in configAlert.buttons) { var button = document.createElement('button') if (!configAlert.buttons[i].class) { configAlert.buttons[i].class = 'text-teal' } button.className = configAlert.buttons[i].class var text = document.createTextNode(configAlert.buttons[i].label) button.appendChild(text) if (!configAlert.buttons[i].onclick) { configAlert.buttons[i].onclick = closeAlert } button.addEventListener('click', configAlert.buttons[i].onclick) buttons.appendChild(button) } var customEvent = new CustomEvent('alertOpened') document.dispatchEvent(customEvent) } window.closeAlert = function (id) { alertId = id if (!alertId) { alertId = event.target.parentNode.parentNode.parentNode.id } var alert = document.getElementById(alertId) alert.parentNode.removeChild(alert) var backdrop = document.getElementById(alertId + '_BACKDROP') backdrop.parentNode.removeChild(backdrop) } ================================================ FILE: alert/style.css ================================================ .alert-mobileui { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; position: absolute; z-index: 99999; top: 0; left: 0; width: 100%; height: 100%; } .alert-mobileui .alert { font-family: 'Roboto', 'Noto', sans-serif; -webkit-font-smoothing: antialiased; -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; position: relative; border-radius: 2px; box-shadow: 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12), 0 8px 10px -5px rgba(0, 0, 0, .4); max-width: 270px; } .platform-ios .alert-mobileui .alert { font-family: -apple-system, 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucida Grande', sans-serif; border-radius: 8px; background-color: #fff !important; box-shadow: none; } .alert-mobileui .alert h1 { text-align: left; font-size: 20px; font-weight: 500; padding:22px 22px 0 24px; } .platform-ios .alert-mobileui .alert h1 { font-size: 17px; font-weight: 500; text-align: center; color: #000 !important; padding: 0; padding-top: 22px; } .alert-mobileui .alert p { text-align: left; font-size: 16px; font-weight: 400; line-height: 20px; padding: 0 24px; margin-top:24px; margin-bottom: 24px; min-height: 0; opacity: 0.8; } .platform-ios .alert-mobileui .alert p { font-size: 14px; text-align: center; color: #000 !important; } .alert-mobileui .alert .buttons { display: inline-block; box-sizing: border-box; width: 100%; } .alert-mobileui .alert .buttons button { text-transform: uppercase; display: inline-block; width: auto; min-width: 70px; float: right; background: none; border-top: none; font-size: 14px; font-weight: 600; outline: none; margin-right: 5px; text-transform: uppercase; } .platform-ios .alert-mobileui .alert .buttons button { width: 100%; text-align: center; text-transform: none; font-weight: 400; font-size: 16px; border-top: 1px solid #ddd; padding: 0 8px; margin-right: 0; color: rgba(24, 103, 194, .81) !important; background: none !important; } ================================================ FILE: assets/css/master.css ================================================ body { -webkit-touch-callout: text; -webkit-text-size-adjust: text; -webkit-user-select: text; overflow: auto !important; } .header-star { position: absolute; margin-left: 165px; } .font-dosis { font-family: 'Dosis', sans-serif; } .font-raleway { font-family: 'Raleway', sans-serif; } .font-roboto { font-family: 'Roboto', sans-serif; } ol, ul { list-style: none; } button.show-doc { color: #2f94cf; text-decoration: underline; } .content { position: inherit; width: 100%; max-height: 600px; overflow: auto; } .content-doc-reader { display: inline-block; width: 100%; } .content-doc-reader a[target="_blank"] { opacity: 0.8; transition: .1s ease-in-out; transition-property: opacity, border-color; color: #004bc9; text-decoration: none; font-weight: bold; } .content-doc-reader a[target="_blank"]:hover { background-color: #004bc9; color: #fff; } .content-doc-reader a[target="_blank"]:hover i { color: #fff; } a { border-bottom: 1px dotted #000; } a.show-doc { font-size: 14px; } .result a { cursor: pointer; color: #000; text-decoration: none; } .result.result-icon .icon { margin: 5px; } .dependency { color: rgba(0, 0, 0, 0.4); float: right; font-size: 14px; margin-top: -10px; } .dependency strong { font-weight: 700; } .tooltip { position: relative; display: inline-block; } .tooltip .tooltiptext { visibility: hidden; width: 320px; background-color: black; color: #fff; text-align: center; padding: 5px 0; border-radius: 6px; right: 0; position: absolute; z-index: 1; } .tooltip:hover .tooltiptext { visibility: visible; } .top { background-color: #24292e; padding: 0 20px; margin: 0 auto; display: flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; height: 80px; -webkit-align-items: center; -ms-flex-align: center; align-items: center; position: initial; } .top img { display: flex; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; line-height: 0; max-width: 150px; } .top ul { display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; -webkit-align-items: center; -ms-flex-align: center; align-items: center; list-style: none; } .top li { white-space: nowrap; margin: 0 28px 0 0; padding: 0; position: relative; } .top a { color: rgba(255, 255, 255, 0.7); } .top a:hover { color: rgba(255, 255, 255, 1); } .menuland { position: absolute; width: 280px; overflow: auto; padding: 50px; padding-top: 30px; } .menuland li { font-size: 16px; } .menuland h1, .content-land h2.title-doc { font-size: 18px; font-weight: 700; margin-bottom: 10px; margin-top: 10px; color: #24292e; text-transform: uppercase; } .content-land .content-doc-reader h2.title-doc { margin-top: 0; } .content-land h2.title-doc { padding-top: 50px; } .menuland h1:first-child { margin-top: 0; } .menuland a { color: rgba(0, 0, 0, 0.8); } .menuland li { padding: 8px; } .menuland li.move-focus::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background-color: #579480; position: absolute; margin-left: -12px; margin-top: 4px; } #searchComponent { padding-left: 5px; } .menuland li:hover, .menuland a.active li { background-color: #7fc7af; } .menuland::-webkit-scrollbar { display: none; } .menuland a:target li{ border-left: 4px solid #7fc7af; } .menuland.hasScrolled { position: fixed; top: 0; bottom: 0; height: 100%; } .content-land { max-width: 100%; margin-left: 320px; font-size: 18px; padding-right: 50px } .content-land p { line-height: 30px; padding-bottom: 15px; font-size: 16px; } .content-land p.text-small { font-size: 14px; } .content-land .result p { font-size: 14px; } pre, .CodeMirror { padding: 20px; background-color: #f2f2f2; height: auto; margin-top: 20px; margin-bottom: 20px; font-size: 14px; } .CodeMirror-scroll { overflow-y: hidden !important; overflow-x: auto !important; } .color-group { float: left; width: 50%; font-family: arial; font-size: 12px; padding: 10px; } .color-group .color { float: left; padding: 12px; color: #fff; width: 50%; } .color-group .color.main-color { width: 100%; } .color-group .color.dark { color: rgba(0, 0, 0, 0.8); } .color-group .color span { display: block; font-size: 11px; font-weight: 300; } .color-palettes { display: inline-block; width: 100%; padding-bottom: 20px; } .sub-title-doc { margin-top: 20px; } .result { font-family: 'Roboto', sans-serif; max-width: 400px; position: relative; overflow: hidden; } .result.height-change > div{ height: 100%; } .result.with-border { border: 1px solid #ccc; } .result p { margin-top: 5px; margin-bottom: 5px; padding: 0; line-height: 20px; } .header { position: inherit; } .footer { position: absolute; } .header.header-absolute { position: absolute; max-width: 400px; } textarea.bind-code { display: none; } .cm-s-hidden-code { display: none; } @media only screen and (min-width: 1300px) { .color-group { width: 33.33%; } } @media only screen and (min-width: 1600px) { .color-group { width: 25%; } } @media only screen and (min-width: 1900px) { .color-group { width: 20%; } } @media only screen and (max-width: 500px) { body, html { width: 100% !important; } body { padding: 10px; } .header-star { position: inherit; margin-left: 20px; } .top { text-align: center; display: block; padding-top: 20px; } .top img{ display: inline-block; margin:auto; } .top ul { display: none; } .menuland { display: none; } .content-land { margin:0; padding: 0; } .color-group { width: 100%; } } a.button-contribute, .content-doc-reader a.button-contribute[target="_blank"] { font-size: 12px; padding: 5px; padding-left: 20px; padding-right: 20px; border-top: 0; border-left: 0; border-right: 0; padding: 0; margin-top: 10px; border-color: #fff; color: #686868; font-weight: 400; } .button-contribute .icon { font-size: 20px; color: #686868; } a.button-contribute:hover, .content-doc-reader a.button-contribute[target="_blank"]:hover { border-color: #ccc; background: none; color: #000; } .content-doc-reader a.button-contribute[target="_blank"]:hover i { color: #000; } .button-contribute .ion-social-github:before { margin-left: 5px; float: right; margin-top: 3px; } .content-table { margin-bottom: 10px; } .content-table tr.hidden{ display: none; } .hidden { display: none; } .tableDoc { max-width: 700px; border: 1px solid #ebebeb; } .tableDoc th { text-transform: uppercase; font-weight: 600; letter-spacing: .4px; -webkit-transform: scaleY(.9); transform: scaleY(.9); text-rendering: optimizeLegibility; padding: 8px 15px; font-size: 14px; text-align: left!important; background: #fafafa; border-bottom: 1px solid #ebebeb; color: #9ca3a6; } .tableDoc td { padding: 15px; font-weight: 400; text-rendering: optimizeLegibility; font-size: 14px; border-bottom: 1px solid #e1e1e1; } .tableDoc td:first-child { text-align: right; white-space: nowrap; } .tableDoc tr:last-child td { border-bottom: 0; } code { padding: 4px; color: #eb3838; font-size: 14px; border-radius: 3px; border: 0 none; margin: 0; font-family: Consolas,'Liberation Mono',Menlo,Courier,monospace; white-space: nowrap; background: #f1f1f1; } .tableDoc td:first-child code { padding: 3px 9px; background: #fff2f2; } .header-bind-code .border-green { border-top: 0; border-left: 0; border-right: 0; border-width: 2px; border-color: #7fc7af; } .header-bind-code { border-bottom: 1px solid #e5e5e5; text-transform: uppercase; font-size: 14px; margin-bottom: 10px; } .line { width: 100%; background-color: #e5e5e5; height: 1px; display: block; clear: both; margin-top: 10px; } .header-bind-code button.small { background: none; margin-right: 10px; text-transform: uppercase; } .banner { background-color: #24292e; padding-top: 50px; padding-bottom: 30px; overflow: hidden; height: 500px; border-bottom: 2px solid #24292e; } .banner h1 { color: rgba(255, 255, 255, 0.8); font-weight: 200; font-size: 35px; text-align: center; padding-left: 20px; padding-right: 20px; } .banner h2 { color: rgba(255, 255, 255, 0.5); font-size: 20px; font-weight: 300; text-align: center; padding-left: 20px; padding-right: 20px; padding-bottom: 40px; } .logo-placeholder { text-align: center; position: absolute; width: 100%; } .hero-cards { position: relative; display: block; overflow: hidden; width: 100%; min-height: 41em; -webkit-backface-visibility: hidden; backface-visibility: hidden; visibility: hidden; margin-top: 380px; } .hero-card-1, .hero-card-2, .hero-card-3, .hero-card-4, .hero-card-5, .hero-card-6, .hero-card-7, .hero-card-8, .hero-card-9 { position: absolute; top: 0; left: 50%; display: block; margin-left: -157px; box-shadow: 0 5px 10px 0 rgba(0,0,0,.4); -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; width: 307px; height: 546px; padding: 1px; background-image: url(../img/sprite.jpg); background-repeat: no-repeat; } .hero-card-1 { z-index: 109!important; display: block; background-position: -10px -12px; } .hero-card-2 { z-index: 108!important; display: block; background-position: -322px -12px; margin-top: 50px; } .hero-card-3 { z-index: 107!important; display: block; background-position: -630px -12px; margin-top: 50px; } .hero-card-4 { z-index: 106!important; display: block; background-position: -944px -12px; margin-top: 75px; } .hero-card-5 { z-index: 105!important; display: block; background-position: -1252px -12px; margin-top: 75px; } .hero-card-6 { z-index: 104!important; display: block; background-position: -1566px -12px; margin-top: 100px; } .hero-card-7 { z-index: 103!important; display: block; background-position: -1875px -12px; margin-top: 100px; } .menu { position: absolute !important; } .backdrop { position: absolute !important; } .float-bottom-right, .float-bottom-left { position: absolute !important; } .header p, .footer p { padding-left: 10px; margin: 0; margin-top: -4px; } .gitter-chat-embed { z-index: 1100; } ================================================ FILE: assets/js/main.js ================================================ var theme = 'default' var mode = 'text/html' var idGenerate = 100 if(window.SO) { window.SO.code = 1; } else { window.SO = { code : 1 } } $(document).ready(function(){ $('#searchComponent input').keyup(function(e){ var value = this.value; if(value) { $('.menuland ul a').addClass('hidden'); $('.menuland h1').addClass('hidden'); $('.menuland ul li').each(function(i, e){ if($(e).text().toUpperCase().indexOf(value.toUpperCase()) >= 0){ $(e).parent().removeClass('hidden'); $(e).parent().parent().prev().removeClass('hidden'); } }); } else { $('.menuland ul a ').removeClass('hidden'); $('.menuland h1').removeClass('hidden'); } if(e.keyCode === 40 || e.keyCode === 38){ moveFocusMenu(e.keyCode); } else if(e.keyCode === 13){ selectMovedMenu(); } }); var moveFocusMenu = function(keyCode){ if(keyCode === 40){ var elmFocus = $('.menuland ul li.move-focus:visible'); if(!elmFocus.length && $('.menuland ul li:visible').length){ $($('.menuland ul li:visible')[0]).addClass('move-focus'); } else { var moveNextBind = false; $('.menuland ul li:visible').each(function(i, e){ if($(e).is('.move-focus') && !moveNextBind){ $($('.menuland ul li:visible')[i+1]).addClass('move-focus'); $(e).removeClass('move-focus'); moveNextBind=true; } }); } } else { var elmFocus = $('.menuland ul li.move-focus:visible'); if(!elmFocus.length && $('.menuland ul li:visible').length){ $($('.menuland ul li:visible').last()).addClass('move-focus'); } else { var moveNextBind = false; $('.menuland ul li:visible').each(function(i, e){ if($(e).is('.move-focus') && !moveNextBind){ $($('.menuland ul li:visible')[i-1]).addClass('move-focus'); $(e).removeClass('move-focus'); moveNextBind=true; } }); } } } var selectMovedMenu = function(){ var elmFocus = $('.menuland ul li.move-focus:visible'); if(elmFocus.length){ elmFocus.parent()[0].click(); setTimeout(function(){ $('#searchComponent input').focus(); }, 200); } } var animeBanner = function(){ $('.hero-cards').clearQueue().stop().animate({ marginTop: "0" }, 1000, function() { $('.hero-card-2').clearQueue().stop().animate({ left: "-=250" }, 1000, function() { $('.hero-card-4').clearQueue().stop().animate({ left: "-=400" }, 1000, function() { $('.hero-card-6').clearQueue().stop().animate({ left: "-=500" }, 1000, function() { }); }); }); $('.hero-card-3').clearQueue().stop().animate({ left: "+=250" }, 1000, function() { $('.hero-card-5').clearQueue().stop().animate({ left: "+=400" }, 1000, function() { $('.hero-card-7').clearQueue().stop().animate({ left: "+=500" }, 1000, function() { }); }); }); }); } var tmpImg = new Image(); tmpImg.src = '/img/sprite.jpg'; tmpImg.onload = function() { $('.hero-cards').css('visibility','visible'); animeBanner(); }; $(window).resize(function() { $('.hero-card-2').clearQueue().stop(); $('.hero-card-3').clearQueue().stop(); $('.hero-card-4').clearQueue().stop(); $('.hero-card-5').clearQueue().stop(); $('.hero-card-6').clearQueue().stop(); $('.hero-card-7').clearQueue().stop(); $('.hero-card-2').removeAttr('style'); $('.hero-card-3').removeAttr('style'); $('.hero-card-4').removeAttr('style'); $('.hero-card-5').removeAttr('style'); $('.hero-card-6').removeAttr('style'); $('.hero-card-7').removeAttr('style'); animeBanner(); }); $('textarea.bind-code-example').each(function(i, block) { if($(block).attr('mode')) { mode = $(block).attr('mode') } CodeMirror.fromTextArea(block, { lineNumbers: false, mode: mode, theme: theme, readOnly: true }); }); $('textarea.bind-just-code').each(function(i, block) { var code = $(block).val() var mode = $(block).attr('mode') CodeMirror.fromTextArea(block, { lineNumbers: false, mode: mode, theme: theme, readOnly: true }); }); $('textarea.bind-code').each(function(i, block) { var code = $(block).val() var mode = $(block).attr('mode') var border = $(block).attr('border') var absolute = $(block).attr('header-absolute') var execMobileuiBind = $(block).attr('exec-mobileui-bind') var replace = $(block).attr('replace') var hidden = $(block).attr('hidden') var multiplatform = $(block).attr('multiplatform') var heightPreview = $(block).attr('height-preview') var idResult = $(block).attr('id-result') var customClass = $(block).attr('custom-class') if(replace) { replace = replace.split('|'); for(var i in replace){ code = code.replace(new RegExp(replace[i].split(',')[0], 'g'), replace[i].split(',')[1]); } } if(absolute) { code = code.replace(new RegExp('"header', 'g'), '"header header-absolute') } var resultStyle = '' var resultClass = 'result' var id = idResult ? idResult : ++idGenerate; $(block).attr('id',id+'_code'); var attrs = ' id="'+id+'" ' if(border) { resultClass += ' with-border' } if(heightPreview) { resultStyle += 'height:'+heightPreview resultClass += ' height-change' } if(customClass) { resultClass += ' ' + customClass; } var divHeader = '
'; if(multiplatform) { divHeader += ''; divHeader += ''; } else { divHeader += ''; } divHeader += ''; divHeader += '
' if(code.indexOf('openPage(') >= 0) { code = code.replace('openPage(','openPageDemo('+id+','); } $(block).after(divHeader+'
'+code+'
') if(execMobileuiBind){ setTimeout(function(){ if(MobileUI && MobileUI.bind){ MobileUI.bind(); } bindProgressCircle(); },500); } }); var $document = $(document); var $element = $('.menuland'); var className = 'hasScrolled'; function checkVisible(elm) { var rect = elm.getBoundingClientRect(); var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight); return (rect.top <= 0 && rect.bottom > 0); } window.goDoc = function (idDoc){ ga('set', 'page', '/'+idDoc); ga('send', 'pageview'); } var checkScroll = function(){ if ($document.scrollTop() >= 580) { $element.addClass(className); } else { $element.removeClass(className); } } var checkHashSection = function(){ var found=false; $('.content-doc-reader').each(function(i,e){ if(!found) { if(checkVisible(e)){ found=true; var idDoc = $(e).find('h2.title-doc').attr('id'); $('.menuland a').removeClass('active'); $('.menuland a[href="#'+idDoc+'"]').addClass('active'); var movedLink = $('.menuland ul li.move-focus:visible'); if(movedLink.length && movedLink.parent().attr('href') != "#'+idDoc+'" && $('.menuland a[href="#'+idDoc+'"]').is(':visible')){ movedLink.removeClass('move-focus'); $('.menuland a[href="#'+idDoc+'"] li').addClass('move-focus'); } if(location.hash !== '#'+idDoc){ ga('set', 'page', '/'+idDoc); ga('send', 'pageview'); } window.history.replaceState("", document.title, '#'+idDoc); } } }); } checkScroll() checkHashSection() $document.scroll(function() { checkScroll() checkHashSection() }); $('.tableDoc').each(function(i,e){ var elm = $(e); if((elm.find('tr').length-1) > 4) { var trs = elm.find('tr') for(i in trs){ if(i > 4) { $(trs[i]).addClass('hidden') } } var bt = $(''); bt.click(function(){ if($(this).text().indexOf('Hide') < 0) { $(this).prev().find('tr').removeClass('hidden') $(this).text('Hide features table'); } else { $(this).text('Show all '+($(this).prev().find('tr').length-1)+' features'); var trs = $(this).prev().find('tr') for(i in trs){ if(i > 4) { $(trs[i]).addClass('hidden') } } $document.scrollTop($(this).position().top - 295) } }); elm.parent().after(bt); } }); }) window.showPreview = function(e, id){ $(e).parent().find('.border-green').removeClass('border-green'); $(e).addClass('border-green'); $('#'+id).removeClass('hidden'); if($('textarea[id="'+id+'_code"]').next().is('.CodeMirror')){ $('textarea[id="'+id+'_code"]').next().addClass('hidden'); } } window.showCode = function(e, id){ $(e).parent().find('.border-green').removeClass('border-green'); $(e).addClass('border-green'); $('#'+id).addClass('hidden'); if(!$('textarea[id="'+id+'_code"]').is('.binded')){ $('textarea[id="'+id+'_code"]').addClass('binded'); $('#'+id).after($('textarea[id="'+id+'_code"]')); CodeMirror.fromTextArea($('textarea[id="'+id+'_code"]')[0], { lineNumbers: false, mode: mode, theme: theme, readOnly: true }); } else { if($('textarea[id="'+id+'_code"]').next().is('.CodeMirror')){ $('textarea[id="'+id+'_code"]').next().removeClass('hidden'); } } } window.previewPlatform = function(e, id, p){ $(e).parent().find('.border-green').removeClass('border-green'); $(e).addClass('border-green'); $('#'+id).removeClass('hidden'); if($('textarea[id="'+id+'_code"]').next().is('.CodeMirror')){ $('textarea[id="'+id+'_code"]').next().addClass('hidden'); } if(p === 1){ $('#'+id).removeClass('platform-ios').addClass('platform-android'); SO.code = 1; $('#'+id).css('max-width','400px'); } else { $('#'+id).removeClass('platform-android').addClass('platform-ios'); SO.code = 2; $('#'+id).css('max-width','320px'); } } window.openPageDemo = function(id, p, params, callback){ if(arguments.length===3) { callback = params } var xhttp = new XMLHttpRequest(); if(p.indexOf('.html') < 0){ p =p+'.html'; } xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var page = this.responseText; page = page.replace('openPage(', 'openPageDemo('+id+','); page = page.replace('openPage(', 'openPageDemo('+id+','); page = page.replace('openPage(', 'openPageDemo('+id+','); page = page.replace('openPage(', 'openPageDemo('+id+','); page = page.replace('backPage()','backPage(\''+p+'\')'); var body = document.getElementById(id) var div = document.createElement('div') div.setAttribute('class','box-block') div.setAttribute('id',p) div.innerHTML = page; body.appendChild(div) window.PAGE.handePage++ var firstStyle = 'z-index:'+window.PAGE.handePage var secondStyle = ';transform: translateY(0px);will-change: transform, -webkit-transform, opacity;transition-duration: 280ms;transition-timing-function: cubic-bezier(0.36,0.66,0.04,1);' if(SO.code === 2){ secondStyle = ';transform: translateX(0px);transition-duration: 280ms;' } if(window.disabledOpenPageEffect) { secondStyle = ';opacity: 1;top: 0;' } var newStyle = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('style') if(newStyle) { newStyle += ' '+firstStyle + secondStyle } else { newStyle = firstStyle + secondStyle } document.getElementById(p).getElementsByClassName('page')[0].setAttribute("style", newStyle); if(callback) { window.dispatch(callback, [params]); } var newClass = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('class') newClass += ' show'; var validOpenPage = function(){ setTimeout(function(){ if(document.getElementById(p) && document.getElementById(p).querySelectorAll('.page').length){ showPageBind(); } else { validOpenPage(); } },10); } validOpenPage(); var showPageBind = function(){ setTimeout(function(){ document.getElementById(p).getElementsByClassName('page')[0].setAttribute('class',newClass) setTimeout(function(){ var style = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('style') style = style.replace(secondStyle,'') document.getElementById(p).getElementsByClassName('page')[0].setAttribute('style',style) },280) }, 100); }; } }; xhttp.open("GET", p + '?cache='+new Date().getTime(), true); xhttp.send(); } window.openPopoverLand = function(p){ var button = event.target; var rect = button.getBoundingClientRect(); var name = p; var p = document.getElementById(p); var e = document.createElement('div'); e.className = 'backdrop backdrop-popover'; p.parentNode.appendChild(e); e.addEventListener('click', function(evt){ window.closePopover(name); }); p.addEventListener('click', function(evt){ window.closePopover(name); }); p.style += ';top: 110%;right: 10px;transform-origin: right top 0px;transform: scale(1);'; p.classList.add('show'); if(SO.code === 2) { p.style.top = '45px'; p.style.right = '5px'; var divArrow = document.createElement('div'); divArrow.classList.add('popover-arrow'); p.parentNode.appendChild(divArrow); divArrow.setAttribute('style','top:40px;right:15px'); } else { var pHeight = p.clientHeight; var pWidth = p.clientWidth; p.style.height = 0; p.style.width = 0; p.style.top = '5px'; setTimeout(function(){ var style = p.getAttribute('style'); style += ' ;-webkit-transition: all 200ms ease;transition: all 200ms ease;'; p.setAttribute('style', style); p.style.height = pHeight+'px'; p.style.width = pWidth+'px'; }) } } window.loadingLand = function(message){ var configLoading = {}; if(typeof message === "object"){ configLoading = message; } else { configLoading.message = message; } if(!configLoading.id){ configLoading.id = 'LOADING'+new Date().getTime(); } var body = document.getElementsByTagName('body')[0]; if(event.target.parentNode.className.indexOf('body') >= 0) { body = event.target.parentNode; } var e = document.createElement('div'); e.className = 'backdrop show backdrop-alert'; e.id = configLoading.id + '_BACKDROP'; body.parentNode.appendChild(e); var alertMobileUI = document.createElement('div'); alertMobileUI.className = 'alert-mobileui alert-loading'; alertMobileUI.id = configLoading.id; e.parentNode.appendChild(alertMobileUI); var alertContent = document.createElement('div'); configLoading.class = 'white'; alertContent.className = 'alert ' + configLoading.class; if(!window.SO || SO.code !== 2){ alertContent.innerHTML = ''; } else { alertContent.innerHTML = '
'; } if(configLoading.message) { alertContent.innerHTML += '

'+configLoading.message+'

'; } alertMobileUI.appendChild(alertContent); setTimeout(function(){ closeLoading(); },3000) } window.loadingLandElement = function(e, message, position, color){ e = document.getElementById(e); var withMessage = message ? 'with-message' : ''; if(!color){ color = 'white-loading'; } else { color = ''; } if(!position) { position = ''; } var divLoading = document.createElement('div'); var spinner = ''; if(!window.SO || SO.code !== 2){ spinner = ''; } else { spinner = ''; } e.oldValue = e.innerHTML; e.innerHTML = spinner; e.disabled=true; if(message){ e.innerHTML += message; } setTimeout(function(){ closeLoading(e.id) },4000); } setTimeout(function(){ window.bindIncludeEvent(); }, 500); function binderFire(){ if(window.ProgressCircle) ProgressCircle.bind(); if(window.ProgressSemicircle) ProgressSemicircle.bind(); } setInterval(binderFire, 500); ================================================ FILE: base/badge.html ================================================

Badge

Badges are used to provide additional information about something. In MobileUI you can create a card using base classes.

If you have installed any component, the base classes are already installed. Otherwise run the command:

mobileui install base

You can combinate this component with others, example a list.

================================================ FILE: base/base.html ================================================

Base

The base component contains the basic features to use MobileUI and any other component of this kit. With this component, you can use the color themes, icons and some classes of positioning and alignment of elements in the interface.

To use it you need to install with the command:

mobileui install base
================================================ FILE: base/base.js ================================================ var userAgent = navigator.userAgent || navigator.vendor || window.opera; var SO = {name:'unknown',code:0} if (/android/i.test(userAgent)) { SO.name = "Android"; SO.class = 'platform-android'; SO.code = 1; } if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { SO.name = "iOS"; SO.class = 'platform-ios'; SO.code = 2; } if (/windows phone/i.test(userAgent)) { SO.name = "Windows Phone"; SO.class = 'platform-wp'; SO.code = 3; } if(SO.class && document.getElementsByTagName('body').length){ document.getElementsByTagName('body')[0].className += ' '+SO.class } ================================================ FILE: base/card.html ================================================

Card

Card is a popular component in apps mobile. In MobileUI you can create a card using base classes.

If you have installed any component, the base classes are already installed. Otherwise run the command:

mobileui install base

You can combinate card style and list component, just add class shadow.

================================================ FILE: base/colors.css ================================================ .red { color: rgba(255, 255, 255, .9); background-color: #f44336 !important } .red-100, .red-200, .red-300, .red-50 { color: rgba(0, 0, 0, .8) } .red-50, input[type="checkbox"].red-50.switch::after { background-color: #ffebee !important } .red-100, input[type="checkbox"].red-100.switch::after { background-color: #ffcdd2 !important } .red-200, input[type="checkbox"].red-200.switch::after { background-color: #ef9a9a !important } .red-300, input[type="checkbox"].red-300.switch::after { background-color: #e57373 !important } .pink, .red-400, .red-500, .red-600, .red-700, .red-800, .red-900 { color: rgba(255, 255, 255, .9) } .red-400, input[type="checkbox"].red-400.switch::after { background-color: #ef5350 !important } .red-500, input[type="checkbox"].red-500.switch::after { background-color: #f44336 !important } .red-600, input[type="checkbox"].red-600.switch::after { background-color: #e53935 !important } .red-700, input[type="checkbox"].red-700.switch::after { background-color: #d32f2f !important } .red-800, input[type="checkbox"].red-800.switch::after { background-color: #c62828 !important } .red-900, input[type="checkbox"].red-900.switch::after { background-color: #b71c1c !important } .pink, input[type="checkbox"].pink.switch::after { background-color: #E91E63 !important } .pink-100, .pink-200, .pink-50 { color: rgba(0, 0, 0, .8) } .pink-50, input[type="checkbox"].pink-50.switch::after { background-color: #fce4ec !important } .pink-100, input[type="checkbox"].pink-100.switch::after { background-color: #f8bbd0 !important } .pink-200, input[type="checkbox"].pink-200.switch::after { background-color: #f48fb1 !important } .Pink-300, .pink-400, .pink-500, .pink-600, .pink-700, .pink-800, .pink-900, .purple { color: rgba(255, 255, 255, .9) } .Pink-300, input[type="checkbox"].Pink-300.switch::after { background-color: #f06292 !important } .pink-400, input[type="checkbox"].pink-400.switch::after { background-color: #ec407a !important } .pink-500, input[type="checkbox"].pink-500.switch::after { background-color: #e91e63 !important } .pink-600, input[type="checkbox"].pink-600.switch::after { background-color: #d81b60 !important } .pink-700, input[type="checkbox"].pink-700.switch::after { background-color: #c2185b !important } .pink-800, input[type="checkbox"].pink-800.switch::after { background-color: #ad1457 !important } .pink-900, input[type="checkbox"].pink-900.switch::after { background-color: #880e4f !important } .purple, input[type="checkbox"].purple.switch::after { background-color: #9c27b0 !important } .purple-100, .purple-200, .purple-50 { color: rgba(0, 0, 0, .8) } .purple-50, input[type="checkbox"].purple-50.switch::after { background-color: #f3e5f5 !important } .purple-100, input[type="checkbox"].purple-100.switch::after { background-color: #e1bee7 !important } .purple-200, input[type="checkbox"].purple-200.switch::after { background-color: #ce93d8 !important } .purple-300, .purple-400, .deep-purple, .purple-500, .purple-600, .purple-700, .purple-800, .purple-900 { color: rgba(255, 255, 255, .9) } .purple-300, input[type="checkbox"].purple-300.switch::after { background-color: #ba68c8 !important } .purple-400, input[type="checkbox"].purple-400.switch::after { background-color: #ab47bc !important } .purple-500, input[type="checkbox"].purple-500.switch::after { background-color: #9c27b0 !important } .purple-600, input[type="checkbox"].purple-600.switch::after { background-color: #8e24aa !important } .purple-700, input[type="checkbox"].purple-700.switch::after { background-color: #7b1fa2 !important } .purple-800, input[type="checkbox"].purple-800.switch::after { background-color: #6a1b9a !important } .purple-900, input[type="checkbox"].purple-900.switch::after { background-color: #4a148c !important } .deep-purple, input[type="checkbox"].deep-purple.switch::after { background-color: #673ab7 !important } .deep-purple-50 { color: rgba(0, 0, 0, .8); background-color: #ede7f6 !important } .deep-purple-100 { color: rgba(0, 0, 0, .8); background-color: #d1c4e9 !important } .deep-purple-200 { color: rgba(0, 0, 0, .8); background-color: #b39ddb !important } .deep-purple-300, .deep-purple-400, .deep-purple-500, .deep-purple-600, .deep-purple-700, .deep-purple-800, .deep-purple-900, .indigo { color: rgba(255, 255, 255, .9) } .deep-purple-300, input[type="checkbox"].deep-purple-300.switch::after { background-color: #9575cd !important } .deep-purple-400, input[type="checkbox"].deep-purple-400.switch::after { background-color: #7e57c2 !important } .deep-purple-500, input[type="checkbox"].deep-purple-500.switch::after { background-color: #673ab7 !important } .deep-purple-600, input[type="checkbox"].deep-purple-600.switch::after { background-color: #5e35b1 !important } .deep-purple-700, input[type="checkbox"].deep-purple-700.switch::after { background-color: #512da8 !important } .deep-purple-800, input[type="checkbox"].deep-purple-800.switch::after { background-color: #4527a0 !important } .deep-purple-900, input[type="checkbox"].deep-purple-900.switch::after { background-color: #311b92 !important } .indigo, input[type="checkbox"].indigo.switch::after { background-color: #3f51b5 !important } .indigo-100, .indigo-200, .indigo-50 { color: rgba(0, 0, 0, .8) } .indigo-50, input[type="checkbox"].indigo-50.switch::after { background-color: #e8eaf6 !important } .indigo-100, input[type="checkbox"].indigo-100.switch::after { background-color: #c5cae9 !important } .indigo-200, input[type="checkbox"].indigo-200.switch::after { background-color: #9fa8da !important } .blue, .indigo-300, .indigo-400, .indigo-500, .indigo-600, .indigo-700, .indigo-800, .indigo-900 { color: rgba(255, 255, 255, .9) } .indigo-300, input[type="checkbox"].indigo-300.switch::after { background-color: #7986cb !important } .indigo-400, input[type="checkbox"].indigo-400.switch::after { background-color: #5c6bc0 !important } .indigo-500, input[type="checkbox"].indigo-500.switch::after { background-color: #3f51b5 !important } .indigo-600, input[type="checkbox"].indigo-600.switch::after { background-color: #3949ab !important } .indigo-700, input[type="checkbox"].indigo-700.switch::after { background-color: #303f9f !important } .indigo-800, input[type="checkbox"].indigo-800.switch::after { background-color: #283593 !important } .indigo-900, input[type="checkbox"].indigo-900.switch::after { background-color: #1a237e !important } .blue, input[type="checkbox"].blue.switch::after { background-color: #2196F3 !important } .blue-100, .blue-200, .blue-300, .blue-400, .blue-50 { color: rgba(0, 0, 0, .8) } .blue-50, input[type="checkbox"].blue-50.switch::after { background-color: #e3f2fd !important } .blue-100, input[type="checkbox"].blue-100.switch::after { background-color: #bbdefb !important } .blue-200, input[type="checkbox"].blue-200.switch::after { background-color: #90caf9 !important } .blue-300, input[type="checkbox"].blue-300.switch::after { background-color: #64b5f6 !important } .blue-400, input[type="checkbox"].blue-400.switch::after { background-color: #42a5f5 !important } .blue-500, .blue-600, .blue-700, .blue-800, .blue-900, .light-blue { color: rgba(255, 255, 255, .9) } .blue-500, input[type="checkbox"].blue-500.switch::after { background-color: #2196f3 !important } .blue-600, input[type="checkbox"].blue-600.switch::after { background-color: #1e88e5 !important } .blue-700, input[type="checkbox"].blue-700.switch::after { background-color: #1976d2 !important } .blue-800, input[type="checkbox"].blue-800.switch::after { background-color: #1565c0 !important } .blue-900, input[type="checkbox"].blue-900.switch::after { background-color: #0d47a1 !important } .light-blue, input[type="checkbox"].light-blue.switch::after { background-color: #03a9f4 !important } .light-blue-100, .light-blue-200, .light-blue-300, .light-blue-400, .light-blue-50, .light-blue-500 { color: rgba(0, 0, 0, .8) } .light-blue-50, input[type="checkbox"].light-blue-50.switch::after { background-color: #e1f5fe !important } .light-blue-100, input[type="checkbox"].light-blue-100.switch::after { background-color: #b3e5fc !important } .light-blue-200, input[type="checkbox"].light-blue-200.switch::after { background-color: #81d4fa !important } .light-blue-300, input[type="checkbox"].light-blue-300.switch::after { background-color: #4fc3f7 !important } .light-blue-400, input[type="checkbox"].light-blue-400.switch::after { background-color: #29b6f6 !important } .light-blue-500, input[type="checkbox"].light-blue-500.switch::after { background-color: #03a9f4 !important } .cyan, .light-blue-600, .light-blue-700, .light-blue-800, .light-blue-900 { color: rgba(255, 255, 255, .9) } .light-blue-600, input[type="checkbox"].light-blue-600.switch::after { background-color: #039be5 !important } .light-blue-700, input[type="checkbox"].light-blue-700.switch::after { background-color: #0288d1 !important } .light-blue-800, input[type="checkbox"].light-blue-800.switch::after { background-color: #0277bd !important } .light-blue-900, input[type="checkbox"].light-blue-900.switch::after { background-color: #01579b !important } .cyan, input[type="checkbox"].cyan.switch::after { background-color: #00bcd4 !important } .cyan-100, .cyan-200, .cyan-300, .cyan-400, .cyan-50, .cyan-500, .cyan-600 { color: rgba(0, 0, 0, .8) } .cyan-50, input[type="checkbox"].cyan-50.switch::after { background-color: #e0f7fa !important } .cyan-100, input[type="checkbox"].cyan-100.switch::after { background-color: #b2ebf2 !important } .cyan-200, input[type="checkbox"].cyan-200.switch::after { background-color: #80deea !important } .cyan-300, input[type="checkbox"].cyan-300.switch::after { background-color: #4dd0e1 !important } .cyan-400, input[type="checkbox"].cyan-400.switch::after { background-color: #26c6da !important } .cyan-500, input[type="checkbox"].cyan-500.switch::after { background-color: #00bcd4 !important } .cyan-600, input[type="checkbox"].cyan-600.switch::after { background-color: #00acc1 !important } .cyan-700, .cyan-800, .cyan-900, .teal { color: rgba(255, 255, 255, .9) } .cyan-700, input[type="checkbox"].cyan-700.switch::after { background-color: #0097a7 !important } .cyan-800, input[type="checkbox"].cyan-800.switch::after { background-color: #00838f !important } .cyan-900, input[type="checkbox"].cyan-900.switch::after { background-color: #006064 !important } .teal, input[type="checkbox"].teal.switch::after { background-color: #009688 !important } .teal-100, .teal-200, .teal-300, .teal-400, .teal-50 { color: rgba(0, 0, 0, .8) } .teal-50, input[type="checkbox"].teal-50.switch::after { background-color: #e0f2f1 !important } .teal-100, input[type="checkbox"].teal-100.switch::after { background-color: #b2dfdb !important } .teal-200, input[type="checkbox"].teal-200.switch::after { background-color: #80cbc4 !important } .teal-300, input[type="checkbox"].teal-300.switch::after { background-color: #4db6ac !important } .teal-400, input[type="checkbox"].teal-400.switch::after { background-color: #26a69a !important } .green, .teal-500, .teal-600, .teal-700, .teal-800, .teal-900 { color: rgba(255, 255, 255, .9) } .teal-500, input[type="checkbox"].teal-500.switch::after { background-color: #009688 !important } .teal-600, input[type="checkbox"].teal-600.switch::after { background-color: #00897b !important } .teal-700, input[type="checkbox"].teal-700.switch::after { background-color: #00796b !important } .teal-800, input[type="checkbox"].teal-800.switch::after { background-color: #00695c !important } .teal-900, input[type="checkbox"].teal-900.switch::after { background-color: #004d40 !important } .green, input[type="checkbox"].green.switch::after { background-color: #4caf50 !important } .green-100, .green-200, .green-300, .green-400, .green-50, .green-500 { color: rgba(0, 0, 0, .8) } .green-50, input[type="checkbox"].green-50.switch::after { background-color: #e8f5e9 !important } .green-100, input[type="checkbox"].green-100.switch::after { background-color: #c8e6c9 !important } .green-200, input[type="checkbox"].green-200.switch::after { background-color: #a5d6a7 !important } .green-300, input[type="checkbox"].green-300.switch::after { background-color: #81c784 !important } .green-400, input[type="checkbox"].green-400.switch::after { background-color: #66bb6a !important } .green-500, input[type="checkbox"].green-500.switch::after { background-color: #4caf50 !important } .green-600, .green-700, .green-800, .green-900, .light-green { color: rgba(255, 255, 255, .9) } .green-600, input[type="checkbox"].green-600.switch::after { background-color: #43a047 !important } .green-700, input[type="checkbox"].green-700.switch::after { background-color: #388e3c !important } .green-800, input[type="checkbox"].green-800.switch::after { background-color: #2e7d32 !important } .green-900, input[type="checkbox"].green-900.switch::after { background-color: #1b5e20 !important } .light-green, input[type="checkbox"].light-green.switch::after { background-color: #8bc34a !important } .light-green-100, .light-green-200, .light-green-300, .light-green-400, .light-green-50, .light-green-500, .light-green-600 { color: rgba(0, 0, 0, .8) } .light-green-50, input[type="checkbox"].light-green-50.switch::after { background-color: #f1f8e9 !important } .light-green-100, input[type="checkbox"].light-green-100.switch::after { background-color: #dcedc8 !important } .light-green-200, input[type="checkbox"].light-green-200.switch::after { background-color: #c5e1a5 !important } .light-green-300, input[type="checkbox"].light-green-300.switch::after { background-color: #aed581 !important } .light-green-400, input[type="checkbox"].light-green-400.switch::after { background-color: #9ccc65 !important } .light-green-500, input[type="checkbox"].light-green-500.switch::after { background-color: #8bc34a !important } .light-green-600, input[type="checkbox"].light-green-600.switch::after { background-color: #7cb342 !important } .light-green-700, .light-green-800, .light-green-900, .lime { color: rgba(255, 255, 255, .9) } .light-green-700, input[type="checkbox"].light-green-700.switch::after { background-color: #689f38 !important } .light-green-800, input[type="checkbox"].light-green-800.switch::after { background-color: #558b2f !important } .light-green-900, input[type="checkbox"].light-green-900.switch::after { background-color: #33691e !important } .lime, input[type="checkbox"].lime.switch::after { background-color: #cddc39 !important } .lime-100, .lime-200, .lime-300, .lime-400, .lime-50, .lime-500, .lime-600, .lime-700, .lime-800 { color: rgba(0, 0, 0, .8) } .lime-50, input[type="checkbox"].lime-50.switch::after { background-color: #f9fbe7 !important } .lime-100, input[type="checkbox"].lime-100.switch::after { background-color: #f0f4c3 !important } .lime-200, input[type="checkbox"].lime-200.switch::after { background-color: #e6ee9c !important } .lime-300, input[type="checkbox"].lime-300.switch::after { background-color: #dce775 !important } .lime-400, input[type="checkbox"].lime-400.switch::after { background-color: #d4e157 !important } .lime-500, input[type="checkbox"].lime-500.switch::after { background-color: #cddc39 !important } .lime-600, input[type="checkbox"].lime-600.switch::after { background-color: #c0ca33 !important } .lime-700, input[type="checkbox"].lime-700.switch::after { background-color: #afb42b !important } .lime-800, input[type="checkbox"].lime-800.switch::after { background-color: #9e9d24 !important } .lime-900, .yellow { color: rgba(255, 255, 255, .9) } .lime-900, input[type="checkbox"].lime-900.switch::after { background-color: #827717 !important } .yellow, input[type="checkbox"].yellow.switch::after { background-color: #ffeb3b !important } .yellow-100, .yellow-200, .yellow-300, .yellow-50, .yellow-500, .yellow-600, .yellow-700, .yellow-800, .yellow-900 { color: rgba(0, 0, 0, .8) } .yellow-50, input[type="checkbox"].yellow-50.switch::after { background-color: #fffde7 !important } .yellow-100, input[type="checkbox"].yellow-100.switch::after { background-color: #fff9c4 !important } .yellow-200, input[type="checkbox"].yellow-200.switch::after { background-color: #fff59d !important } .yellow-300, input[type="checkbox"].yellow-300.switch::after { background-color: #fff176 !important } .yellow-400 { color: rgba(0, 0, 0, .8); background-color: #ffee58 !important } .yellow-500, input[type="checkbox"].yellow-500.switch::after { background-color: #ffeb3b !important } .yellow-600, input[type="checkbox"].yellow-600.switch::after { background-color: #fdd835 !important } .yellow-700, input[type="checkbox"].yellow-700.switch::after { background-color: #fbc02d !important } .yellow-800, input[type="checkbox"].yellow-800.switch::after { background-color: #f9a825 !important } .yellow-900, input[type="checkbox"].yellow-900.switch::after { background-color: #f57f17 !important } .amber { color: rgba(255, 255, 255, .9); background-color: #ffc107 !important } .amber-100, .amber-200, .amber-300, .amber-50, .amber-500, .amber-600, .amber-700, .amber-800, .amber-900 { color: rgba(0, 0, 0, .8) } .amber-50, input[type="checkbox"].amber-50.switch::after { background-color: #fff8e1 !important } .amber-100, input[type="checkbox"].amber-100.switch::after { background-color: #ffecb3 !important } .amber-200, input[type="checkbox"].amber-200.switch::after { background-color: #ffe082 !important } .amber-300, input[type="checkbox"].amber-300.switch::after { background-color: #ffd54f !important } .amber-400 { color: rgba(0, 0, 0, .8); background-color: #ffca28 !important } .amber-500, input[type="checkbox"].amber-500.switch::after { background-color: #ffc107 !important } .amber-600, input[type="checkbox"].amber-600.switch::after { background-color: #ffb300 !important } .amber-700, input[type="checkbox"].amber-700.switch::after { background-color: #ffa000 !important } .amber-800, input[type="checkbox"].amber-800.switch::after { background-color: #ff8f00 !important } .amber-900, input[type="checkbox"].amber-900.switch::after { background-color: #ff6f00 !important } .orange { color: rgba(255, 255, 255, .9); background-color: #ff9800 !important } .orange-100, .orange-200, .orange-300, .orange-400, .orange-50, .orange-500, .orange-600, .orange-700 { color: rgba(0, 0, 0, .8) } .orange-50, input[type="checkbox"].orange-50.switch::after { background-color: #fff3e0 !important } .orange-100, input[type="checkbox"].orange-100.switch::after { background-color: #ffe0b2 !important } .orange-200, input[type="checkbox"].orange-200.switch::after { background-color: #ffcc80 !important } .orange-300, input[type="checkbox"].orange-300.switch::after { background-color: #ffb74d !important } .orange-400, input[type="checkbox"].orange-400.switch::after { background-color: #ffa726 !important } .orange-500, input[type="checkbox"].orange-500.switch::after { background-color: #ff9800 !important } .orange-600, input[type="checkbox"].orange-600.switch::after { background-color: #fb8c00 !important } .orange-700, input[type="checkbox"].orange-700.switch::after { background-color: #f57c00 !important } .deep-orange, .orange-800, .orange-900 { color: rgba(255, 255, 255, .9) } .orange-800, input[type="checkbox"].orange-800.switch::after { background-color: #ef6c00 !important } .orange-900, input[type="checkbox"].orange-900.switch::after { background-color: #e65100 !important } .deep-orange, input[type="checkbox"].deep-orange.switch::after { background-color: #ff5722 !important } .deep-orange-100, .deep-orange-200, .deep-orange-300, .deep-orange-400, .deep-orange-50 { color: rgba(0, 0, 0, .8) } .deep-orange-50, input[type="checkbox"].deep-orange-50.switch::after { background-color: #fbe9e7 !important } .deep-orange-100, input[type="checkbox"].deep-orange-100.switch::after { background-color: #ffccbc !important } .deep-orange-200, input[type="checkbox"].deep-orange-200.switch::after { background-color: #ffab91 !important } .deep-orange-300, input[type="checkbox"].deep-orange-300.switch::after { background-color: #ff8a65 !important } .deep-orange-400, input[type="checkbox"].deep-orange-400.switch::after { background-color: #ff7043 !important } .brown, .deep-orange-500, .deep-orange-600, .deep-orange-700, .deep-orange-800, .deep-orange-900 { color: rgba(255, 255, 255, .9) } .deep-orange-500, input[type="checkbox"].deep-orange-500.switch::after { background-color: #ff5722 !important } .deep-orange-600, input[type="checkbox"].deep-orange-600.switch::after { background-color: #f4511e !important } .deep-orange-700, input[type="checkbox"].deep-orange-700.switch::after { background-color: #e64a19 !important } .deep-orange-800, input[type="checkbox"].deep-orange-800.switch::after { background-color: #d84315 !important } .deep-orange-900, input[type="checkbox"].deep-orange-900.switch::after { background-color: #bf360c !important } .brown, input[type="checkbox"].brown.switch::after { background-color: #795548 !important } .brown-100, .brown-200, .brown-50 { color: rgba(0, 0, 0, .8) } .brown-50, input[type="checkbox"].brown-50.switch::after { background-color: #efebe9 !important } .brown-100, input[type="checkbox"].brown-100.switch::after { background-color: #d7ccc8 !important } .brown-200, input[type="checkbox"].brown-200.switch::after { background-color: #bcaaa4 !important } .brown-300, .brown-400, .brown-500, .brown-600, .brown-700, .brown-800, .brown-900, .grey { color: rgba(255, 255, 255, .9) } .brown-300, input[type="checkbox"].brown-300.switch::after { background-color: #a1887f !important } .brown-400, input[type="checkbox"].brown-400.switch::after { background-color: #8d6e63 !important } .brown-500, input[type="checkbox"].brown-500.switch::after { background-color: #795548 !important } .brown-600, input[type="checkbox"].brown-600.switch::after { background-color: #6d4c41 !important } .brown-700, input[type="checkbox"].brown-700.switch::after { background-color: #5d4037 !important } .brown-800, input[type="checkbox"].brown-800.switch::after { background-color: #4e342e !important } .brown-900, input[type="checkbox"].brown-900.switch::after { background-color: #3e2723 !important } .grey, input[type="checkbox"].grey.switch::after { background-color: #9e9e9e !important } .grey-100, .grey-200, .grey-300, .grey-400, .grey-50, .grey-500 { color: rgba(0, 0, 0, .8) } .grey-50, input[type="checkbox"].grey-50.switch::after { background-color: #fafafa !important } .grey-100, input[type="checkbox"].grey-100.switch::after { background-color: #f5f5f5 !important } .grey-200, input[type="checkbox"].grey-200.switch::after { background-color: #eee !important } .grey-300, input[type="checkbox"].grey-300.switch::after { background-color: #e0e0e0 !important } .grey-400, input[type="checkbox"].grey-400.switch::after { background-color: #bdbdbd !important } .grey-500, input[type="checkbox"].grey-500.switch::after { background-color: #9e9e9e !important } .blue-grey, .grey-600, .grey-700, .grey-800, .grey-900 { color: rgba(255, 255, 255, .9) } .grey-600, input[type="checkbox"].grey-600.switch::after { background-color: #757575 !important } .grey-700, input[type="checkbox"].grey-700.switch::after { background-color: #616161 !important } .grey-800, input[type="checkbox"].grey-800.switch::after { background-color: #424242 !important } .grey-900, input[type="checkbox"].grey-900.switch::after { background-color: #212121 !important } .blue-grey, input[type="checkbox"].blue-grey.switch::after { background-color: #607d8b !important } .blue-grey-100, .blue-grey-200, .blue-grey-300, .blue-grey-50 { color: rgba(0, 0, 0, .8) } .blue-grey-50, input[type="checkbox"].blue-grey-50.switch::after { background-color: #eceff1 !important } .blue-grey-100, input[type="checkbox"].blue-grey-100.switch::after { background-color: #cfd8dc !important } .blue-grey-200, input[type="checkbox"].blue-grey-200.switch::after { background-color: #b0bec5 !important } .blue-grey-300, input[type="checkbox"].blue-grey-300.switch::after { background-color: #90a4ae !important } .black, .blue-grey-400, .blue-grey-500, .blue-grey-600, .blue-grey-700, .blue-grey-800, .blue-grey-900 { color: rgba(255, 255, 255, .9) } .blue-grey-400, input[type="checkbox"].blue-grey-400.switch::after { background-color: #78909c !important } .transparent { background-color: rgba(0, 0, 0, 0) !important; } .blue-grey-500, input[type="checkbox"].blue-grey-500.switch::after { background-color: #607d8b !important } .blue-grey-600, input[type="checkbox"].blue-grey-600.switch::after { background-color: #546e7a !important } .blue-grey-700, input[type="checkbox"].blue-grey-700.switch::after { background-color: #455a64 !important } .blue-grey-800, input[type="checkbox"].blue-grey-800.switch::after { background-color: #37474f !important } .blue-grey-900, input[type="checkbox"].blue-grey-900.switch::after { background-color: #263238 !important } .black, input[type="checkbox"].black.switch::after { background-color: #000 !important } .black-opacity-90 { background-color: rgba(0, 0, 0, 0.9); } .black-opacity-70 { background-color: rgba(0, 0, 0, 0.7); } .black-opacity-50 { background-color: rgba(0, 0, 0, 0.5); } .black-opacity-30 { background-color: rgba(0, 0, 0, 0.3); } .black-opacity-10 { background-color: rgba(0, 0, 0, 0.1); } .white { color: rgba(0, 0, 0, .8); background-color: #fff !important } .white-opacity-90 { background-color: rgba(255, 255, 255, 0.9); } .white-opacity-70 { background-color: rgba(255, 255, 255, 0.7); } .white-opacity-50 { background-color: rgba(255, 255, 255, 0.5); } .white-opacity-30 { background-color: rgba(255, 255, 255, 0.3); } .white-opacity-10 { background-color: rgba(255, 255, 255, 0.1); } .text-red , i.red { color: #f44336; } .text-red-50 , i.red-50 { color: #ffebee; } .text-red-100 , i.red-100 { color: #ffcdd2; } .text-red-200 , i.red-200 { color: #ef9a9a; } .text-red-300 , i.red-300 { color: #e57373; } .text-red-400 , i.red-400 { color: #ef5350; } .text-red-500 , i.red-500 { color: #f44336; } .text-red-600 , i.red-600 { color: #e53935; } .text-red-700 , i.red-700 { color: #d32f2f; } .text-red-800 , i.red-800 { color: #c62828; } .text-red-900 , i.red-900 { color: #b71c1c; } .text-pink , i.pink { color: #E91E63; } .text-pink-50 , i.pink-50 { color: #fce4ec; } .text-pink-100 , i.pink-100 { color: #f8bbd0; } .text-pink-200 , i.pink-200 { color: #f48fb1; } .text-Pink-300 , i.Pink-300 { color: #f06292; } .text-pink-400 , i.pink-400 { color: #ec407a; } .text-pink-500 , i.pink-500 { color: #e91e63; } .text-pink-600 , i.pink-600 { color: #d81b60; } .text-pink-700 , i.pink-700 { color: #c2185b; } .text-pink-800 , i.pink-800 { color: #ad1457; } .text-pink-900 , i.pink-900 { color: #880e4f; } .text-purple , i.purple { color: #9c27b0; } .text-purple-50 , i.purple-50 { color: #f3e5f5; } .text-purple-100 , i.purple-100 { color: #e1bee7; } .text-purple-200 , i.purple-200 { color: #ce93d8; } .text-purple-300 , i.purple-300 { color: #ba68c8; } .text-purple-400 , i.purple-400 { color: #ab47bc; } .text-purple-500 , i.purple-500 { color: #9c27b0; } .text-purple-600 , i.purple-600 { color: #8e24aa; } .text-purple-700 , i.purple-700 { color: #7b1fa2; } .text-purple-800 , i.purple-800 { color: #6a1b9a; } .text-purple-900 , i.purple-900 { color: #4a148c; } .text-deep-purple , i.deep-purple { color: #673ab7; } .text-deep-purple-50 , i.deep-purple-50 { color: #ede7f6; } .text-deep-purple-100 , i.deep-purple-100 { color: #d1c4e9; } .text-deep-purple-200 , i.deep-purple-200 { color: #b39ddb; } .text-deep-purple-300 , i.deep-purple-300 { color: #9575cd; } .text-deep-purple-400 , i.deep-purple-400 { color: #7e57c2; } .text-deep-purple-500 , i.deep-purple-500 { color: #673ab7; } .text-deep-purple-600 , i.deep-purple-600 { color: #5e35b1; } .text-deep-purple-700 , i.deep-purple-700 { color: #512da8; } .text-deep-purple-800 , i.deep-purple-800 { color: #4527a0; } .text-deep-purple-900 , i.deep-purple-900 { color: #311b92; } .text-indigo , i.indigo { color: #3f51b5; } .text-indigo-50 , i.indigo-50 { color: #e8eaf6; } .text-indigo-100 , i.indigo-100 { color: #c5cae9; } .text-indigo-200 , i.indigo-200 { color: #9fa8da; } .text-indigo-300 , i.indigo-300 { color: #7986cb; } .text-indigo-400 , i.indigo-400 { color: #5c6bc0; } .text-indigo-500 , i.indigo-500 { color: #3f51b5; } .text-indigo-600 , i.indigo-600 { color: #3949ab; } .text-indigo-700 , i.indigo-700 { color: #303f9f; } .text-indigo-800 , i.indigo-800 { color: #283593; } .text-indigo-900 , i.indigo-900 { color: #1a237e; } .text-blue , i.blue { color: #2196F3; } .text-blue-50 , i.blue-50 { color: #e3f2fd; } .text-blue-100 , i.blue-100 { color: #bbdefb; } .text-blue-200 , i.blue-200 { color: #90caf9; } .text-blue-300 , i.blue-300 { color: #64b5f6; } .text-blue-400 , i.blue-400 { color: #42a5f5; } .text-blue-500 , i.blue-500 { color: #2196f3; } .text-blue-600 , i.blue-600 { color: #1e88e5; } .text-blue-700 , i.blue-700 { color: #1976d2; } .text-blue-800 , i.blue-800 { color: #1565c0; } .text-blue-900 , i.blue-900 { color: #0d47a1; } .text-light-blue , i.light-blue { color: #03a9f4; } .text-light-blue-50 , i.light-blue-50 { color: #e1f5fe; } .text-light-blue-100 , i.light-blue-100 { color: #b3e5fc; } .text-light-blue-200 , i.light-blue-200 { color: #81d4fa; } .text-light-blue-300 , i.light-blue-300 { color: #4fc3f7; } .text-light-blue-400 , i.light-blue-400 { color: #29b6f6; } .text-light-blue-500 , i.light-blue-500 { color: #03a9f4; } .text-light-blue-600 , i.light-blue-600 { color: #039be5; } .text-light-blue-700 , i.light-blue-700 { color: #0288d1; } .text-light-blue-800 , i.light-blue-800 { color: #0277bd; } .text-light-blue-900 , i.light-blue-900 { color: #01579b; } .text-cyan , i.cyan { color: #00bcd4; } .text-cyan-50 , i.cyan-50 { color: #e0f7fa; } .text-cyan-100 , i.cyan-100 { color: #b2ebf2; } .text-cyan-200 , i.cyan-200 { color: #80deea; } .text-cyan-300 , i.cyan-300 { color: #4dd0e1; } .text-cyan-400 , i.cyan-400 { color: #26c6da; } .text-cyan-500 , i.cyan-500 { color: #00bcd4; } .text-cyan-600 , i.cyan-600 { color: #00acc1; } .text-cyan-700 , i.cyan-700 { color: #0097a7; } .text-cyan-800 , i.cyan-800 { color: #00838f; } .text-cyan-900 , i.cyan-900 { color: #006064; } .text-teal , i.teal { color: #009688; } .text-teal-50 , i.teal-50 { color: #e0f2f1; } .text-teal-100 , i.teal-100 { color: #b2dfdb; } .text-teal-200 , i.teal-200 { color: #80cbc4; } .text-teal-300 , i.teal-300 { color: #4db6ac; } .text-teal-400 , i.teal-400 { color: #26a69a; } .text-teal-500 , i.teal-500 { color: #009688; } .text-teal-600 , i.teal-600 { color: #00897b; } .text-teal-700 , i.teal-700 { color: #00796b; } .text-teal-800 , i.teal-800 { color: #00695c; } .text-teal-900 , i.teal-900 { color: #004d40; } .text-green , i.green { color: #4caf50; } .text-green-50 , i.green-50 { color: #e8f5e9; } .text-green-100 , i.green-100 { color: #c8e6c9; } .text-green-200 , i.green-200 { color: #a5d6a7; } .text-green-300 , i.green-300 { color: #81c784; } .text-green-400 , i.green-400 { color: #66bb6a; } .text-green-500 , i.green-500 { color: #4caf50; } .text-green-600 , i.green-600 { color: #43a047; } .text-green-700 , i.green-700 { color: #388e3c; } .text-green-800 , i.green-800 { color: #2e7d32; } .text-green-900 , i.green-900 { color: #1b5e20; } .text-light-green , i.light-green { color: #8bc34a; } .text-light-green-50 , i.light-green-50 { color: #f1f8e9; } .text-light-green-100 , i.light-green-100 { color: #dcedc8; } .text-light-green-200 , i.light-green-200 { color: #c5e1a5; } .text-light-green-300 , i.light-green-300 { color: #aed581; } .text-light-green-400 , i.light-green-400 { color: #9ccc65; } .text-light-green-500 , i.light-green-500 { color: #8bc34a; } .text-light-green-600 , i.light-green-600 { color: #7cb342; } .text-light-green-700 , i.light-green-700 { color: #689f38; } .text-light-green-800 , i.light-green-800 { color: #558b2f; } .text-light-green-900 , i.light-green-900 { color: #33691e; } .text-lime , i.lime { color: #cddc39; } .text-lime-50 , i.lime-50 { color: #f9fbe7; } .text-lime-100 , i.lime-100 { color: #f0f4c3; } .text-lime-200 , i.lime-200 { color: #e6ee9c; } .text-lime-300 , i.lime-300 { color: #dce775; } .text-lime-400 , i.lime-400 { color: #d4e157; } .text-lime-500 , i.lime-500 { color: #cddc39; } .text-lime-600 , i.lime-600 { color: #c0ca33; } .text-lime-700 , i.lime-700 { color: #afb42b; } .text-lime-800 , i.lime-800 { color: #9e9d24; } .text-lime-900 , i.lime-900 { color: #827717; } .text-yellow , i.yellow { color: #ffeb3b; } .text-yellow-50 , i.yellow-50 { color: #fffde7; } .text-yellow-100 , i.yellow-100 { color: #fff9c4; } .text-yellow-200 , i.yellow-200 { color: #fff59d; } .text-yellow-300 , i.yellow-300 { color: #fff176; } .text-yellow-400 , i.yellow-400 { color: #ffee58; } .text-yellow-500 , i.yellow-500 { color: #ffeb3b; } .text-yellow-600 , i.yellow-600 { color: #fdd835; } .text-yellow-700 , i.yellow-700 { color: #fbc02d; } .text-yellow-800 , i.yellow-800 { color: #f9a825; } .text-yellow-900 , i.yellow-900 { color: #f57f17; } .text-amber , i.amber { color: #ffc107; } .text-amber-50 , i.amber-50 { color: #fff8e1; } .text-amber-100 , i.amber-100 { color: #ffecb3; } .text-amber-200 , i.amber-200 { color: #ffe082; } .text-amber-300 , i.amber-300 { color: #ffd54f; } .text-amber-400 , i.amber-400 { color: #ffca28; } .text-amber-500 , i.amber-500 { color: #ffc107; } .text-amber-600 , i.amber-600 { color: #ffb300; } .text-amber-700 , i.amber-700 { color: #ffa000; } .text-amber-800 , i.amber-800 { color: #ff8f00; } .text-amber-900 , i.amber-900 { color: #ff6f00; } .text-orange , i.orange { color: #ff9800; } .text-orange-50 , i.orange-50 { color: #fff3e0; } .text-orange-100 , i.orange-100 { color: #ffe0b2; } .text-orange-200 , i.orange-200 { color: #ffcc80; } .text-orange-300 , i.orange-300 { color: #ffb74d; } .text-orange-400 , i.orange-400 { color: #ffa726; } .text-orange-500 , i.orange-500 { color: #ff9800; } .text-orange-600 , i.orange-600 { color: #fb8c00; } .text-orange-700 , i.orange-700 { color: #f57c00; } .text-orange-800 , i.orange-800 { color: #ef6c00; } .text-orange-900 , i.orange-900 { color: #e65100; } .text-deep-orange , i.deep-orange { color: #ff5722; } .text-deep-orange-50 , i.deep-orange-50 { color: #fbe9e7; } .text-deep-orange-100 , i.deep-orange-100 { color: #ffccbc; } .text-deep-orange-200 , i.deep-orange-200 { color: #ffab91; } .text-deep-orange-300 , i.deep-orange-300 { color: #ff8a65; } .text-deep-orange-400 , i.deep-orange-400 { color: #ff7043; } .text-deep-orange-500 , i.deep-orange-500 { color: #ff5722; } .text-deep-orange-600 , i.deep-orange-600 { color: #f4511e; } .text-deep-orange-700 , i.deep-orange-700 { color: #e64a19; } .text-deep-orange-800 , i.deep-orange-800 { color: #d84315; } .text-deep-orange-900 , i.deep-orange-900 { color: #bf360c; } .text-brown , i.brown { color: #795548; } .text-brown-50 , i.brown-50 { color: #efebe9; } .text-brown-100 , i.brown-100 { color: #d7ccc8; } .text-brown-200 , i.brown-200 { color: #bcaaa4; } .text-brown-300 , i.brown-300 { color: #a1887f; } .text-brown-400 , i.brown-400 { color: #8d6e63; } .text-brown-500 , i.brown-500 { color: #795548; } .text-brown-600 , i.brown-600 { color: #6d4c41; } .text-brown-700 , i.brown-700 { color: #5d4037; } .text-brown-800 , i.brown-800 { color: #4e342e; } .text-brown-900 , i.brown-900 { color: #3e2723; } .text-grey , i.grey { color: #9e9e9e; } .text-grey-50 , i.grey-50 { color: #fafafa; } .text-grey-100 , i.grey-100 { color: #f5f5f5; } .text-grey-200 , i.grey-200 { color: #eee; } .text-grey-300 , i.grey-300 { color: #e0e0e0; } .text-grey-400 , i.grey-400 { color: #bdbdbd; } .text-grey-500 , i.grey-500 { color: #9e9e9e; } .text-grey-600 , i.grey-600 { color: #757575; } .text-grey-700 , i.grey-700 { color: #616161; } .text-grey-800 , i.grey-800 { color: #424242; } .text-grey-900 , i.grey-900 { color: #212121; } .text-blue-grey , i.blue-grey { color: #607d8b; } .text-blue-grey-50 , i.blue-grey-50 { color: #eceff1; } .text-blue-grey-100 , i.blue-grey-100 { color: #cfd8dc; } .text-blue-grey-200 , i.blue-grey-200 { color: #b0bec5; } .text-blue-grey-300 , i.blue-grey-300 { color: #90a4ae; } .text-blue-grey-400 , i.blue-grey-400 { color: #78909c; } .text-blue-grey-500 , i.blue-grey-500 { color: #607d8b; } .text-blue-grey-600 , i.blue-grey-600 { color: #546e7a; } .text-blue-grey-700 , i.blue-grey-700 { color: #455a64; } .text-blue-grey-800 , i.blue-grey-800 { color: #37474f; } .text-blue-grey-900 , i.blue-grey-900 { color: #263238; } .text-black , i.black { color: #000; } .text-white , i.white { color: #fff; } .border-red { border: 1px solid #f44336 } .border-red-50 { border: 1px solid #ffebee } .border-red-100 { border: 1px solid #ffcdd2 } .border-red-200 { border: 1px solid #ef9a9a } .border-red-300 { border: 1px solid #e57373 } .border-red-400 { border: 1px solid #ef5350 } .border-red-500 { border: 1px solid #f44336 } .border-red-600 { border: 1px solid #e53935 } .border-red-700 { border: 1px solid #d32f2f } .border-red-800 { border: 1px solid #c62828 } .border-red-900 { border: 1px solid #b71c1c } .border-pink { border: 1px solid #E91E63 } .border-pink-50 { border: 1px solid #fce4ec } .border-pink-100 { border: 1px solid #f8bbd0 } .border-pink-200 { border: 1px solid #f48fb1 } .border-pink-300 { border: 1px solid #f06292 } .border-pink-400 { border: 1px solid #ec407a } .border-pink-500 { border: 1px solid #e91e63 } .border-pink-600 { border: 1px solid #d81b60 } .border-pink-700 { border: 1px solid #c2185b } .border-pink-800 { border: 1px solid #ad1457 } .border-pink-900 { border: 1px solid #880e4f } .border-purple { border: 1px solid #9c27b0 } .border-purple-50 { border: 1px solid #f3e5f5 } .border-purple-100 { border: 1px solid #e1bee7 } .border-purple-200 { border: 1px solid #ce93d8 } .border-purple-300 { border: 1px solid #ba68c8 } .border-purple-400 { border: 1px solid #ab47bc } .border-purple-500 { border: 1px solid #9c27b0 } .border-purple-600 { border: 1px solid #8e24aa } .border-purple-700 { border: 1px solid #7b1fa2 } .border-purple-800 { border: 1px solid #6a1b9a } .border-purple-900 { border: 1px solid #4a148c } .border-deep-purple { border: 1px solid #673ab7 } .border-deep-purple-50 { border: 1px solid #ede7f6 } .border-deep-purple-100 { border: 1px solid #d1c4e9 } .border-deep-purple-200 { border: 1px solid #b39ddb } .border-deep-purple-300 { border: 1px solid #9575cd } .border-deep-purple-400 { border: 1px solid #7e57c2 } .border-deep-purple-500 { border: 1px solid #673ab7 } .border-deep-purple-600 { border: 1px solid #5e35b1 } .border-deep-purple-700 { border: 1px solid #512da8 } .border-deep-purple-800 { border: 1px solid #4527a0 } .border-deep-purple-900 { border: 1px solid #311b92 } .border-indigo { border: 1px solid #3f51b5 } .border-indigo-50 { border: 1px solid #e8eaf6 } .border-indigo-100 { border: 1px solid #c5cae9 } .border-indigo-200 { border: 1px solid #9fa8da } .border-indigo-300 { border: 1px solid #7986cb } .border-indigo-400 { border: 1px solid #5c6bc0 } .border-indigo-500 { border: 1px solid #3f51b5 } .border-indigo-600 { border: 1px solid #3949ab } .border-indigo-700 { border: 1px solid #303f9f } .border-indigo-800 { border: 1px solid #283593 } .border-indigo-900 { border: 1px solid #1a237e } .border-blue { border: 1px solid #2196F3 } .border-blue-50 { border: 1px solid #e3f2fd } .border-blue-100 { border: 1px solid #bbdefb } .border-blue-200 { border: 1px solid #90caf9 } .border-blue-300 { border: 1px solid #64b5f6 } .border-blue-400 { border: 1px solid #42a5f5 } .border-blue-500 { border: 1px solid #2196f3 } .border-blue-600 { border: 1px solid #1e88e5 } .border-blue-700 { border: 1px solid #1976d2 } .border-blue-800 { border: 1px solid #1565c0 } .border-blue-900 { border: 1px solid #0d47a1 } .border-light-blue { border: 1px solid #03a9f4 } .border-light-blue-50 { border: 1px solid #e1f5fe } .border-light-blue-100 { border: 1px solid #b3e5fc } .border-light-blue-200 { border: 1px solid #81d4fa } .border-light-blue-300 { border: 1px solid #4fc3f7 } .border-light-blue-400 { border: 1px solid #29b6f6 } .border-light-blue-500 { border: 1px solid #03a9f4 } .border-light-blue-600 { border: 1px solid #039be5 } .border-light-blue-700 { border: 1px solid #0288d1 } .border-light-blue-800 { border: 1px solid #0277bd } .border-light-blue-900 { border: 1px solid #01579b } .border-cyan { border: 1px solid #00bcd4 } .border-cyan-50 { border: 1px solid #e0f7fa } .border-cyan-100 { border: 1px solid #b2ebf2 } .border-cyan-200 { border: 1px solid #80deea } .border-cyan-300 { border: 1px solid #4dd0e1 } .border-cyan-400 { border: 1px solid #26c6da } .border-cyan-500 { border: 1px solid #00bcd4 } .border-cyan-600 { border: 1px solid #00acc1 } .border-cyan-700 { border: 1px solid #0097a7 } .border-cyan-800 { border: 1px solid #00838f } .border-cyan-900 { border: 1px solid #006064 } .border-teal { border: 1px solid #009688 } .border-teal-50 { border: 1px solid #e0f2f1 } .border-teal-100 { border: 1px solid #b2dfdb } .border-teal-200 { border: 1px solid #80cbc4 } .border-teal-300 { border: 1px solid #4db6ac } .border-teal-400 { border: 1px solid #26a69a } .border-teal-500 { border: 1px solid #009688 } .border-teal-600 { border: 1px solid #00897b } .border-teal-700 { border: 1px solid #00796b } .border-teal-800 { border: 1px solid #00695c } .border-teal-900 { border: 1px solid #004d40 } .border-green { border: 1px solid #4caf50 } .border-green-50 { border: 1px solid #e8f5e9 } .border-green-100 { border: 1px solid #c8e6c9 } .border-green-200 { border: 1px solid #a5d6a7 } .border-green-300 { border: 1px solid #81c784 } .border-green-400 { border: 1px solid #66bb6a } .border-green-500 { border: 1px solid #4caf50 } .border-green-600 { border: 1px solid #43a047 } .border-green-700 { border: 1px solid #388e3c } .border-green-800 { border: 1px solid #2e7d32 } .border-green-900 { border: 1px solid #1b5e20 } .border-light-green { border: 1px solid #8bc34a } .border-light-green-50 { border: 1px solid #f1f8e9 } .border-light-green-100 { border: 1px solid #dcedc8 } .border-light-green-200 { border: 1px solid #c5e1a5 } .border-light-green-300 { border: 1px solid #aed581 } .border-light-green-400 { border: 1px solid #9ccc65 } .border-light-green-500 { border: 1px solid #8bc34a } .border-light-green-600 { border: 1px solid #7cb342 } .border-light-green-700 { border: 1px solid #689f38 } .border-light-green-800 { border: 1px solid #558b2f } .border-light-green-900 { border: 1px solid #33691e } .border-lime { border: 1px solid #cddc39 } .border-lime-50 { border: 1px solid #f9fbe7 } .border-lime-100 { border: 1px solid #f0f4c3 } .border-lime-200 { border: 1px solid #e6ee9c } .border-lime-300 { border: 1px solid #dce775 } .border-lime-400 { border: 1px solid #d4e157 } .border-lime-500 { border: 1px solid #cddc39 } .border-lime-600 { border: 1px solid #c0ca33 } .border-lime-700 { border: 1px solid #afb42b } .border-lime-800 { border: 1px solid #9e9d24 } .border-lime-900 { border: 1px solid #827717 } .border-yellow { border: 1px solid #ffeb3b } .border-yellow-50 { border: 1px solid #fffde7 } .border-yellow-100 { border: 1px solid #fff9c4 } .border-yellow-200 { border: 1px solid #fff59d } .border-yellow-300 { border: 1px solid #fff176 } .border-yellow-400 { border: 1px solid #ffee58 } .border-yellow-500 { border: 1px solid #ffeb3b } .border-yellow-600 { border: 1px solid #fdd835 } .border-yellow-700 { border: 1px solid #fbc02d } .border-yellow-800 { border: 1px solid #f9a825 } .border-yellow-900 { border: 1px solid #f57f17 } .border-amber { border: 1px solid #ffc107 } .border-amber-50 { border: 1px solid #fff8e1 } .border-amber-100 { border: 1px solid #ffecb3 } .border-amber-200 { border: 1px solid #ffe082 } .border-amber-300 { border: 1px solid #ffd54f } .border-amber-400 { border: 1px solid #ffca28 } .border-amber-500 { border: 1px solid #ffc107 } .border-amber-600 { border: 1px solid #ffb300 } .border-amber-700 { border: 1px solid #ffa000 } .border-amber-800 { border: 1px solid #ff8f00 } .border-amber-900 { border: 1px solid #ff6f00 } .border-orange { border: 1px solid #ff9800 } .border-orange-50 { border: 1px solid #fff3e0 } .border-orange-100 { border: 1px solid #ffe0b2 } .border-orange-200 { border: 1px solid #ffcc80 } .border-orange-300 { border: 1px solid #ffb74d } .border-orange-400 { border: 1px solid #ffa726 } .border-orange-500 { border: 1px solid #ff9800 } .border-orange-600 { border: 1px solid #fb8c00 } .border-orange-700 { border: 1px solid #f57c00 } .border-orange-800 { border: 1px solid #ef6c00 } .border-orange-900 { border: 1px solid #e65100 } .border-deep-orange { border: 1px solid #ff5722 } .border-deep-orange-50 { border: 1px solid #fbe9e7 } .border-deep-orange-100 { border: 1px solid #ffccbc } .border-deep-orange-200 { border: 1px solid #ffab91 } .border-deep-orange-300 { border: 1px solid #ff8a65 } .border-deep-orange-400 { border: 1px solid #ff7043 } .border-deep-orange-500 { border: 1px solid #ff5722 } .border-deep-orange-600 { border: 1px solid #f4511e } .border-deep-orange-700 { border: 1px solid #e64a19 } .border-deep-orange-800 { border: 1px solid #d84315 } .border-deep-orange-900 { border: 1px solid #bf360c } .border-brown { border: 1px solid #795548 } .border-brown-50 { border: 1px solid #efebe9 } .border-brown-100 { border: 1px solid #d7ccc8 } .border-brown-200 { border: 1px solid #bcaaa4 } .border-brown-300 { border: 1px solid #a1887f } .border-brown-400 { border: 1px solid #8d6e63 } .border-brown-500 { border: 1px solid #795548 } .border-brown-600 { border: 1px solid #6d4c41 } .border-brown-700 { border: 1px solid #5d4037 } .border-brown-800 { border: 1px solid #4e342e } .border-brown-900 { border: 1px solid #3e2723 } .border-grey { border: 1px solid #9e9e9e } .border-grey-50 { border: 1px solid #fafafa } .border-grey-100 { border: 1px solid #f5f5f5 } .border-grey-200 { border: 1px solid #eee } .border-grey-300 { border: 1px solid #e0e0e0 } .border-grey-400 { border: 1px solid #bdbdbd } .border-grey-500 { border: 1px solid #9e9e9e } .border-grey-600 { border: 1px solid #757575 } .border-grey-700 { border: 1px solid #616161 } .border-grey-800 { border: 1px solid #424242 } .border-grey-900 { border: 1px solid #212121 } .border-blue-grey { border: 1px solid #607d8b } .border-blue-grey-50 { border: 1px solid #eceff1 } .border-blue-grey-100 { border: 1px solid #cfd8dc } .border-blue-grey-200 { border: 1px solid #b0bec5 } .border-blue-grey-300 { border: 1px solid #90a4ae } .border-blue-grey-400 { border: 1px solid #78909c } .border-blue-grey-500 { border: 1px solid #607d8b } .border-blue-grey-600 { border: 1px solid #546e7a } .border-blue-grey-700 { border: 1px solid #455a64 } .border-blue-grey-800 { border: 1px solid #37474f } .border-blue-grey-900 { border: 1px solid #263238 } .border-black { border: 1px solid #000 } .border-white { border: 1px solid #fff } ================================================ FILE: base/colors.html ================================================

Colors

MobileUI uses the suggestions material design colors because material takes cues from contemporary architecture, road signs, pavement marking tape, and athletic courts. Color should be unexpected and vibrant.

This color palette comprises primary and accent colors that can be used for illustration or to develop your brand colors. They’ve been designed to work harmoniously with each other. The color palette starts with primary colors and fills in the spectrum to create a complete and usable palette for Android, Web, and iOS.

Themes enable consistent app styling through surface shades, shadow depth, and ink opacity.

The theme's colors are in base MobileUI, to use it install base through the command:

mobileui install base

And just add the class in your component to use the color, example:

Colors MobileUI:

================================================ FILE: base/component.json ================================================ { "name":"base", "dependencies": [], "files":[ "fonts/ionicons.woff", "fonts/roboto.woff2", "fonts/robotoblack.woff2", "fonts/robotolight.woff2" ] } ================================================ FILE: base/font.css ================================================ @font-face { font-family: Roboto; font-style: normal; font-weight: 300; src: local('Roboto Light'), local('Roboto-Light'), url(fonts/robotolight.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F } @font-face { font-family: Roboto; font-style: normal; font-weight: 400; src: local('Roboto'), local('Roboto-Regular'), url(fonts/sTdaA6j0Psb920Vjv-mrzH-_kf6ByYO6CLYdB4HQE-Y.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F } @font-face { font-family: Roboto; font-style: normal; font-weight: 900; src: local('Roboto Black'), local('Roboto-Black'), url(fonts/robotoblack.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F } ================================================ FILE: base/fonts.html ================================================

Fonts

One of MobileUI's primary concerns is UX Design, so we offer a easy way to install new fonts in your web apps.

You can install any source in the Google Fonts repository. Example, I want to install the fonts Open Sans light and Monoton, my command would look like this:

mobileui install font "Monoton|Open+Sans:300"
================================================ FILE: base/icons.css ================================================ @font-face { font-family: Ionicons; src: url(fonts/ionicons.woff?v=2.0.0) format("woff"); font-weight: 400; font-style: normal } i.icon { background: none !important; } .ion, .ion-alert-circled:before, .ion-alert:before, .ion-android-add-circle:before, .ion-android-add:before, .ion-android-alarm-clock:before, .ion-android-alert:before, .ion-android-apps:before, .ion-android-archive:before, .ion-android-arrow-back:before, .ion-android-arrow-down:before, .ion-android-arrow-dropdown-circle:before, .ion-android-arrow-dropdown:before, .ion-android-arrow-dropleft-circle:before, .ion-android-arrow-dropleft:before, .ion-android-arrow-dropright-circle:before, .ion-android-arrow-dropright:before, .ion-android-arrow-dropup-circle:before, .ion-android-arrow-dropup:before, .ion-android-arrow-forward:before, .ion-android-arrow-up:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-cloud:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done-all:before, .ion-android-done:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite-outline:before, .ion-android-favorite:before, .ion-android-film:before, .ion-android-folder-open:before, .ion-android-folder:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone-off:before, .ion-android-microphone:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-notifications:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person-add:before, .ion-android-person:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove-circle:before, .ion-android-remove:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share-alt:before, .ion-android-share:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-star:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace-outline:before, .ion-backspace:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox-working:before, .ion-chatbox:before, .ion-chatboxes:before, .ion-chatbubble-working:before, .ion-chatbubble:before, .ion-chatbubbles:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .ion-checkmark:before, .ion-chevron-down:before, .ion-chevron-left:before, .ion-chevron-right:before, .ion-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close-circled:before, .ion-close-round:before, .ion-close:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code-download:before, .ion-code-working:before, .ion-code:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .ion-connection-bars:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document-text:before, .ion-document:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .ion-edit:before, .ion-egg:before, .ion-eject:before, .ion-email-unread:before, .ion-email:before, .ion-erlenmeyer-flask-bubbles:before, .ion-erlenmeyer-flask:before, .ion-eye-disabled:before, .ion-eye:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash-off:before, .ion-flash:before, .ion-folder:before, .ion-fork-repo:before, .ion-fork:before, .ion-forward:before, .ion-funnel:before, .ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy-outline:before, .ion-happy:before, .ion-headphone:before, .ion-heart-broken:before, .ion-heart:before, .ion-help-buoy:before, .ion-help-circled:before, .ion-help:before, .ion-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information-circled:before, .ion-information:before, .ion-ionic:before, .ion-ios-alarm-outline:before, .ion-ios-alarm:before, .ion-ios-albums-outline:before, .ion-ios-albums:before, .ion-ios-americanfootball-outline:before, .ion-ios-americanfootball:before, .ion-ios-analytics-outline:before, .ion-ios-analytics:before, .ion-ios-arrow-back:before, .ion-ios-arrow-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .ion-ios-arrow-up:before, .ion-ios-at-outline:before, .ion-ios-at:before, .ion-ios-barcode-outline:before, .ion-ios-barcode:before, .ion-ios-baseball-outline:before, .ion-ios-baseball:before, .ion-ios-basketball-outline:before, .ion-ios-basketball:before, .ion-ios-bell-outline:before, .ion-ios-bell:before, .ion-ios-body-outline:before, .ion-ios-body:before, .ion-ios-bolt-outline:before, .ion-ios-bolt:before, .ion-ios-book-outline:before, .ion-ios-book:before, .ion-ios-bookmarks-outline:before, .ion-ios-bookmarks:before, .ion-ios-box-outline:before, .ion-ios-box:before, .ion-ios-briefcase-outline:before, .ion-ios-briefcase:before, .ion-ios-browsers-outline:before, .ion-ios-browsers:before, .ion-ios-calculator-outline:before, .ion-ios-calculator:before, .ion-ios-calendar-outline:before, .ion-ios-calendar:before, .ion-ios-camera-outline:before, .ion-ios-camera:before, .ion-ios-cart-outline:before, .ion-ios-cart:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatbubble-outline:before, .ion-ios-chatbubble:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-checkmark:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock-outline:before, .ion-ios-clock:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-close:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-download:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-outline:before, .ion-ios-cloudy:before, .ion-ios-cog-outline:before, .ion-ios-cog:before, .ion-ios-color-filter-outline:before, .ion-ios-color-filter:before, .ion-ios-color-wand-outline:before, .ion-ios-color-wand:before, .ion-ios-compose-outline:before, .ion-ios-compose:before, .ion-ios-contact-outline:before, .ion-ios-contact:before, .ion-ios-copy-outline:before, .ion-ios-copy:before, .ion-ios-crop-strong:before, .ion-ios-crop:before, .ion-ios-download-outline:before, .ion-ios-download:before, .ion-ios-drag:before, .ion-ios-email-outline:before, .ion-ios-email:before, .ion-ios-eye-outline:before, .ion-ios-eye:before, .ion-ios-fastforward-outline:before, .ion-ios-fastforward:before, .ion-ios-filing-outline:before, .ion-ios-filing:before, .ion-ios-film-outline:before, .ion-ios-film:before, .ion-ios-flag-outline:before, .ion-ios-flag:before, .ion-ios-flame-outline:before, .ion-ios-flame:before, .ion-ios-flask-outline:before, .ion-ios-flask:before, .ion-ios-flower-outline:before, .ion-ios-flower:before, .ion-ios-folder-outline:before, .ion-ios-folder:before, .ion-ios-football-outline:before, .ion-ios-football:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-b-outline:before, .ion-ios-game-controller-b:before, .ion-ios-gear-outline:before, .ion-ios-gear:before, .ion-ios-glasses-outline:before, .ion-ios-glasses:before, .ion-ios-grid-view-outline:before, .ion-ios-grid-view:before, .ion-ios-heart-outline:before, .ion-ios-heart:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-help:before, .ion-ios-home-outline:before, .ion-ios-home:before, .ion-ios-infinite-outline:before, .ion-ios-infinite:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-information:before, .ion-ios-ionic-outline:before, .ion-ios-keypad-outline:before, .ion-ios-keypad:before, .ion-ios-lightbulb-outline:before, .ion-ios-lightbulb:before, .ion-ios-list-outline:before, .ion-ios-list:before, .ion-ios-location-outline:before, .ion-ios-location:before, .ion-ios-locked-outline:before, .ion-ios-locked:before, .ion-ios-loop-strong:before, .ion-ios-loop:before, .ion-ios-medical-outline:before, .ion-ios-medical:before, .ion-ios-medkit-outline:before, .ion-ios-medkit:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-mic:before, .ion-ios-minus-empty:before, .ion-ios-minus-outline:before, .ion-ios-minus:before, .ion-ios-monitor-outline:before, .ion-ios-monitor:before, .ion-ios-moon-outline:before, .ion-ios-moon:before, .ion-ios-more-outline:before, .ion-ios-more:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate-outline:before, .ion-ios-navigate:before, .ion-ios-nutrition-outline:before, .ion-ios-nutrition:before, .ion-ios-paper-outline:before, .ion-ios-paper:before, .ion-ios-paperplane-outline:before, .ion-ios-paperplane:before, .ion-ios-partlysunny-outline:before, .ion-ios-partlysunny:before, .ion-ios-pause-outline:before, .ion-ios-pause:before, .ion-ios-paw-outline:before, .ion-ios-paw:before, .ion-ios-people-outline:before, .ion-ios-people:before, .ion-ios-person-outline:before, .ion-ios-person:before, .ion-ios-personadd-outline:before, .ion-ios-personadd:before, .ion-ios-photos-outline:before, .ion-ios-photos:before, .ion-ios-pie-outline:before, .ion-ios-pie:before, .ion-ios-pint-outline:before, .ion-ios-pint:before, .ion-ios-play-outline:before, .ion-ios-play:before, .ion-ios-plus-empty:before, .ion-ios-plus-outline:before, .ion-ios-plus:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetag:before, .ion-ios-pricetags-outline:before, .ion-ios-pricetags:before, .ion-ios-printer-outline:before, .ion-ios-printer:before, .ion-ios-pulse-strong:before, .ion-ios-pulse:before, .ion-ios-rainy-outline:before, .ion-ios-rainy:before, .ion-ios-recording-outline:before, .ion-ios-recording:before, .ion-ios-redo-outline:before, .ion-ios-redo:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-refresh:before, .ion-ios-reload:before, .ion-ios-reverse-camera-outline:before, .ion-ios-reverse-camera:before, .ion-ios-rewind-outline:before, .ion-ios-rewind:before, .ion-ios-rose-outline:before, .ion-ios-rose:before, .ion-ios-search-strong:before, .ion-ios-search:before, .ion-ios-settings-strong:before, .ion-ios-settings:before, .ion-ios-shuffle-strong:before, .ion-ios-shuffle:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipbackward:before, .ion-ios-skipforward-outline:before, .ion-ios-skipforward:before, .ion-ios-snowy:before, .ion-ios-speedometer-outline:before, .ion-ios-speedometer:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-star:before, .ion-ios-stopwatch-outline:before, .ion-ios-stopwatch:before, .ion-ios-sunny-outline:before, .ion-ios-sunny:before, .ion-ios-telephone-outline:before, .ion-ios-telephone:before, .ion-ios-tennisball-outline:before, .ion-ios-tennisball:before, .ion-ios-thunderstorm-outline:before, .ion-ios-thunderstorm:before, .ion-ios-time-outline:before, .ion-ios-time:before, .ion-ios-timer-outline:before, .ion-ios-timer:before, .ion-ios-toggle-outline:before, .ion-ios-toggle:before, .ion-ios-trash-outline:before, .ion-ios-trash:before, .ion-ios-undo-outline:before, .ion-ios-undo:before, .ion-ios-unlocked-outline:before, .ion-ios-unlocked:before, .ion-ios-upload-outline:before, .ion-ios-upload:before, .ion-ios-videocam-outline:before, .ion-ios-videocam:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass-outline:before, .ion-ios-wineglass:before, .ion-ios-world-outline:before, .ion-ios-world:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .ion-log-out:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-minus:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon-round:before, .ion-navicon:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .ion-person-add:before, .ion-person-stalker:before, .ion-person:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .ion-play:before, .ion-playstation:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-plus:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .ion-refresh:before, .ion-reply-all:before, .ion-reply:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad-outline:before, .ion-sad:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android-outline:before, .ion-social-android:before, .ion-social-angular-outline:before, .ion-social-angular:before, .ion-social-apple-outline:before, .ion-social-apple:before, .ion-social-bitcoin-outline:before, .ion-social-bitcoin:before, .ion-social-buffer-outline:before, .ion-social-buffer:before, .ion-social-chrome-outline:before, .ion-social-chrome:before, .ion-social-codepen-outline:before, .ion-social-codepen:before, .ion-social-css3-outline:before, .ion-social-css3:before, .ion-social-designernews-outline:before, .ion-social-designernews:before, .ion-social-dribbble-outline:before, .ion-social-dribbble:before, .ion-social-dropbox-outline:before, .ion-social-dropbox:before, .ion-social-euro-outline:before, .ion-social-euro:before, .ion-social-facebook-outline:before, .ion-social-facebook:before, .ion-social-foursquare-outline:before, .ion-social-foursquare:before, .ion-social-freebsd-devil:before, .ion-social-github-outline:before, .ion-social-github:before, .ion-social-google-outline:before, .ion-social-google:before, .ion-social-googleplus-outline:before, .ion-social-googleplus:before, .ion-social-hackernews-outline:before, .ion-social-hackernews:before, .ion-social-html5-outline:before, .ion-social-html5:before, .ion-social-instagram-outline:before, .ion-social-instagram:before, .ion-social-javascript-outline:before, .ion-social-javascript:before, .ion-social-linkedin-outline:before, .ion-social-linkedin:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest-outline:before, .ion-social-pinterest:before, .ion-social-python:before, .ion-social-reddit-outline:before, .ion-social-reddit:before, .ion-social-rss-outline:before, .ion-social-rss:before, .ion-social-sass:before, .ion-social-skype-outline:before, .ion-social-skype:before, .ion-social-snapchat-outline:before, .ion-social-snapchat:before, .ion-social-tumblr-outline:before, .ion-social-tumblr:before, .ion-social-tux:before, .ion-social-twitch-outline:before, .ion-social-twitch:before, .ion-social-twitter-outline:before, .ion-social-twitter:before, .ion-social-usd-outline:before, .ion-social-usd:before, .ion-social-vimeo-outline:before, .ion-social-vimeo:before, .ion-social-whatsapp-outline:before, .ion-social-whatsapp:before, .ion-social-windows-outline:before, .ion-social-windows:before, .ion-social-wordpress-outline:before, .ion-social-wordpress:before, .ion-social-yahoo-outline:before, .ion-social-yahoo:before, .ion-social-yen-outline:before, .ion-social-yen:before, .ion-social-youtube-outline:before, .ion-social-youtube:before, .ion-soup-can-outline:before, .ion-soup-can:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .ion-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle-filled:before, .ion-toggle:before, .ion-transgender:before, .ion-trash-a:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt-outline:before, .ion-tshirt:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .ion-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before, .ionicons { display: inline-block; font-family: Ionicons; speak: none; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-width: 22px; text-align: center; } .ion-alert:before { content: "\f101" } .ion-alert-circled:before { content: "\f100" } .ion-android-add:before { content: "\f2c7" } .ion-android-add-circle:before { content: "\f359" } .ion-android-alarm-clock:before { content: "\f35a" } .ion-android-alert:before { content: "\f35b" } .ion-android-apps:before { content: "\f35c" } .ion-android-archive:before { content: "\f2c9" } .ion-android-arrow-back:before { content: "\f2ca" } .ion-android-arrow-down:before { content: "\f35d" } .ion-android-arrow-dropdown:before { content: "\f35f" } .ion-android-arrow-dropdown-circle:before { content: "\f35e" } .ion-android-arrow-dropleft:before { content: "\f361" } .ion-android-arrow-dropleft-circle:before { content: "\f360" } .ion-android-arrow-dropright:before { content: "\f363" } .ion-android-arrow-dropright-circle:before { content: "\f362" } .ion-android-arrow-dropup:before { content: "\f365" } .ion-android-arrow-dropup-circle:before { content: "\f364" } .ion-android-arrow-forward:before { content: "\f30f" } .ion-android-arrow-up:before { content: "\f366" } .ion-android-attach:before { content: "\f367" } .ion-android-bar:before { content: "\f368" } .ion-android-bicycle:before { content: "\f369" } .ion-android-boat:before { content: "\f36a" } .ion-android-bookmark:before { content: "\f36b" } .ion-android-bulb:before { content: "\f36c" } .ion-android-bus:before { content: "\f36d" } .ion-android-calendar:before { content: "\f2d1" } .ion-android-call:before { content: "\f2d2" } .ion-android-camera:before { content: "\f2d3" } .ion-android-cancel:before { content: "\f36e" } .ion-android-car:before { content: "\f36f" } .ion-android-cart:before { content: "\f370" } .ion-android-chat:before { content: "\f2d4" } .ion-android-checkbox:before { content: "\f374" } .ion-android-checkbox-blank:before { content: "\f371" } .ion-android-checkbox-outline:before { content: "\f373" } .ion-android-checkbox-outline-blank:before { content: "\f372" } .ion-android-checkmark-circle:before { content: "\f375" } .ion-android-clipboard:before { content: "\f376" } .ion-android-close:before { content: "\f2d7" } .ion-android-cloud:before { content: "\f37a" } .ion-android-cloud-circle:before { content: "\f377" } .ion-android-cloud-done:before { content: "\f378" } .ion-android-cloud-outline:before { content: "\f379" } .ion-android-color-palette:before { content: "\f37b" } .ion-android-compass:before { content: "\f37c" } .ion-android-contact:before { content: "\f2d8" } .ion-android-contacts:before { content: "\f2d9" } .ion-android-contract:before { content: "\f37d" } .ion-android-create:before { content: "\f37e" } .ion-android-delete:before { content: "\f37f" } .ion-android-desktop:before { content: "\f380" } .ion-android-document:before { content: "\f381" } .ion-android-done:before { content: "\f383" } .ion-android-done-all:before { content: "\f382" } .ion-android-download:before { content: "\f2dd" } .ion-android-drafts:before { content: "\f384" } .ion-android-exit:before { content: "\f385" } .ion-android-expand:before { content: "\f386" } .ion-android-favorite:before { content: "\f388" } .ion-android-favorite-outline:before { content: "\f387" } .ion-android-film:before { content: "\f389" } .ion-android-folder:before { content: "\f2e0" } .ion-android-folder-open:before { content: "\f38a" } .ion-android-funnel:before { content: "\f38b" } .ion-android-globe:before { content: "\f38c" } .ion-android-hand:before { content: "\f2e3" } .ion-android-hangout:before { content: "\f38d" } .ion-android-happy:before { content: "\f38e" } .ion-android-home:before { content: "\f38f" } .ion-android-image:before { content: "\f2e4" } .ion-android-laptop:before { content: "\f390" } .ion-android-list:before { content: "\f391" } .ion-android-locate:before { content: "\f2e9" } .ion-android-lock:before { content: "\f392" } .ion-android-mail:before { content: "\f2eb" } .ion-android-map:before { content: "\f393" } .ion-android-menu:before { content: "\f394" } .ion-android-microphone:before { content: "\f2ec" } .ion-android-microphone-off:before { content: "\f395" } .ion-android-more-horizontal:before { content: "\f396" } .ion-android-more-vertical:before { content: "\f397" } .ion-android-navigate:before { content: "\f398" } .ion-android-notifications:before { content: "\f39b" } .ion-android-notifications-none:before { content: "\f399" } .ion-android-notifications-off:before { content: "\f39a" } .ion-android-open:before { content: "\f39c" } .ion-android-options:before { content: "\f39d" } .ion-android-people:before { content: "\f39e" } .ion-android-person:before { content: "\f3a0" } .ion-android-person-add:before { content: "\f39f" } .ion-android-phone-landscape:before { content: "\f3a1" } .ion-android-phone-portrait:before { content: "\f3a2" } .ion-android-pin:before { content: "\f3a3" } .ion-android-plane:before { content: "\f3a4" } .ion-android-playstore:before { content: "\f2f0" } .ion-android-print:before { content: "\f3a5" } .ion-android-radio-button-off:before { content: "\f3a6" } .ion-android-radio-button-on:before { content: "\f3a7" } .ion-android-refresh:before { content: "\f3a8" } .ion-android-remove:before { content: "\f2f4" } .ion-android-remove-circle:before { content: "\f3a9" } .ion-android-restaurant:before { content: "\f3aa" } .ion-android-sad:before { content: "\f3ab" } .ion-android-search:before { content: "\f2f5" } .ion-android-send:before { content: "\f2f6" } .ion-android-settings:before { content: "\f2f7" } .ion-android-share:before { content: "\f2f8" } .ion-android-share-alt:before { content: "\f3ac" } .ion-android-star:before { content: "\f2fc" } .ion-android-star-half:before { content: "\f3ad" } .ion-android-star-outline:before { content: "\f3ae" } .ion-android-stopwatch:before { content: "\f2fd" } .ion-android-subway:before { content: "\f3af" } .ion-android-sunny:before { content: "\f3b0" } .ion-android-sync:before { content: "\f3b1" } .ion-android-textsms:before { content: "\f3b2" } .ion-android-time:before { content: "\f3b3" } .ion-android-train:before { content: "\f3b4" } .ion-android-unlock:before { content: "\f3b5" } .ion-android-upload:before { content: "\f3b6" } .ion-android-volume-down:before { content: "\f3b7" } .ion-android-volume-mute:before { content: "\f3b8" } .ion-android-volume-off:before { content: "\f3b9" } .ion-android-volume-up:before { content: "\f3ba" } .ion-android-walk:before { content: "\f3bb" } .ion-android-warning:before { content: "\f3bc" } .ion-android-watch:before { content: "\f3bd" } .ion-android-wifi:before { content: "\f305" } .ion-aperture:before { content: "\f313" } .ion-archive:before { content: "\f102" } .ion-arrow-down-a:before { content: "\f103" } .ion-arrow-down-b:before { content: "\f104" } .ion-arrow-down-c:before { content: "\f105" } .ion-arrow-expand:before { content: "\f25e" } .ion-arrow-graph-down-left:before { content: "\f25f" } .ion-arrow-graph-down-right:before { content: "\f260" } .ion-arrow-graph-up-left:before { content: "\f261" } .ion-arrow-graph-up-right:before { content: "\f262" } .ion-arrow-left-a:before { content: "\f106" } .ion-arrow-left-b:before { content: "\f107" } .ion-arrow-left-c:before { content: "\f108" } .ion-arrow-move:before { content: "\f263" } .ion-arrow-resize:before { content: "\f264" } .ion-arrow-return-left:before { content: "\f265" } .ion-arrow-return-right:before { content: "\f266" } .ion-arrow-right-a:before { content: "\f109" } .ion-arrow-right-b:before { content: "\f10a" } .ion-arrow-right-c:before { content: "\f10b" } .ion-arrow-shrink:before { content: "\f267" } .ion-arrow-swap:before { content: "\f268" } .ion-arrow-up-a:before { content: "\f10c" } .ion-arrow-up-b:before { content: "\f10d" } .ion-arrow-up-c:before { content: "\f10e" } .ion-asterisk:before { content: "\f314" } .ion-at:before { content: "\f10f" } .ion-backspace:before { content: "\f3bf" } .ion-backspace-outline:before { content: "\f3be" } .ion-bag:before { content: "\f110" } .ion-battery-charging:before { content: "\f111" } .ion-battery-empty:before { content: "\f112" } .ion-battery-full:before { content: "\f113" } .ion-battery-half:before { content: "\f114" } .ion-battery-low:before { content: "\f115" } .ion-beaker:before { content: "\f269" } .ion-beer:before { content: "\f26a" } .ion-bluetooth:before { content: "\f116" } .ion-bonfire:before { content: "\f315" } .ion-bookmark:before { content: "\f26b" } .ion-bowtie:before { content: "\f3c0" } .ion-briefcase:before { content: "\f26c" } .ion-bug:before { content: "\f2be" } .ion-calculator:before { content: "\f26d" } .ion-calendar:before { content: "\f117" } .ion-camera:before { content: "\f118" } .ion-card:before { content: "\f119" } .ion-cash:before { content: "\f316" } .ion-chatbox:before { content: "\f11b" } .ion-chatbox-working:before { content: "\f11a" } .ion-chatboxes:before { content: "\f11c" } .ion-chatbubble:before { content: "\f11e" } .ion-chatbubble-working:before { content: "\f11d" } .ion-chatbubbles:before { content: "\f11f" } .ion-checkmark:before { content: "\f122" } .ion-checkmark-circled:before { content: "\f120" } .ion-checkmark-round:before { content: "\f121" } .ion-chevron-down:before { content: "\f123" } .ion-chevron-left:before { content: "\f124" } .ion-chevron-right:before { content: "\f125" } .ion-chevron-up:before { content: "\f126" } .ion-clipboard:before { content: "\f127" } .ion-clock:before { content: "\f26e" } .ion-close:before { content: "\f12a" } .ion-close-circled:before { content: "\f128" } .ion-close-round:before { content: "\f129" } .ion-closed-captioning:before { content: "\f317" } .ion-cloud:before { content: "\f12b" } .ion-code:before { content: "\f271" } .ion-code-download:before { content: "\f26f" } .ion-code-working:before { content: "\f270" } .ion-coffee:before { content: "\f272" } .ion-compass:before { content: "\f273" } .ion-compose:before { content: "\f12c" } .ion-connection-bars:before { content: "\f274" } .ion-contrast:before { content: "\f275" } .ion-crop:before { content: "\f3c1" } .ion-cube:before { content: "\f318" } .ion-disc:before { content: "\f12d" } .ion-document:before { content: "\f12f" } .ion-document-text:before { content: "\f12e" } .ion-drag:before { content: "\f130" } .ion-earth:before { content: "\f276" } .ion-easel:before { content: "\f3c2" } .ion-edit:before { content: "\f2bf" } .ion-egg:before { content: "\f277" } .ion-eject:before { content: "\f131" } .ion-email:before { content: "\f132" } .ion-email-unread:before { content: "\f3c3" } .ion-erlenmeyer-flask:before { content: "\f3c5" } .ion-erlenmeyer-flask-bubbles:before { content: "\f3c4" } .ion-eye:before { content: "\f133" } .ion-eye-disabled:before { content: "\f306" } .ion-female:before { content: "\f278" } .ion-filing:before { content: "\f134" } .ion-film-marker:before { content: "\f135" } .ion-fireball:before { content: "\f319" } .ion-flag:before { content: "\f279" } .ion-flame:before { content: "\f31a" } .ion-flash:before { content: "\f137" } .ion-flash-off:before { content: "\f136" } .ion-folder:before { content: "\f139" } .ion-fork:before { content: "\f27a" } .ion-fork-repo:before { content: "\f2c0" } .ion-forward:before { content: "\f13a" } .ion-funnel:before { content: "\f31b" } .ion-gear-a:before { content: "\f13d" } .ion-gear-b:before { content: "\f13e" } .ion-grid:before { content: "\f13f" } .ion-hammer:before { content: "\f27b" } .ion-happy:before { content: "\f31c" } .ion-happy-outline:before { content: "\f3c6" } .ion-headphone:before { content: "\f140" } .ion-heart:before { content: "\f141" } .ion-heart-broken:before { content: "\f31d" } .ion-help:before { content: "\f143" } .ion-help-buoy:before { content: "\f27c" } .ion-help-circled:before { content: "\f142" } .ion-home:before { content: "\f144" } .ion-icecream:before { content: "\f27d" } .ion-image:before { content: "\f147" } .ion-images:before { content: "\f148" } .ion-information:before { content: "\f14a" } .ion-information-circled:before { content: "\f149" } .ion-ionic:before { content: "\f14b" } .ion-ios-alarm:before { content: "\f3c8" } .ion-ios-alarm-outline:before { content: "\f3c7" } .ion-ios-albums:before { content: "\f3ca" } .ion-ios-albums-outline:before { content: "\f3c9" } .ion-ios-americanfootball:before { content: "\f3cc" } .ion-ios-americanfootball-outline:before { content: "\f3cb" } .ion-ios-analytics:before { content: "\f3ce" } .ion-ios-analytics-outline:before { content: "\f3cd" } .ion-ios-arrow-back:before { content: "\f3cf" } .ion-ios-arrow-down:before { content: "\f3d0" } .ion-ios-arrow-forward:before { content: "\f3d1" } .ion-ios-arrow-left:before { content: "\f3d2" } .ion-ios-arrow-right:before { content: "\f3d3" } .ion-ios-arrow-thin-down:before { content: "\f3d4" } .ion-ios-arrow-thin-left:before { content: "\f3d5" } .ion-ios-arrow-thin-right:before { content: "\f3d6" } .ion-ios-arrow-thin-up:before { content: "\f3d7" } .ion-ios-arrow-up:before { content: "\f3d8" } .ion-ios-at:before { content: "\f3da" } .ion-ios-at-outline:before { content: "\f3d9" } .ion-ios-barcode:before { content: "\f3dc" } .ion-ios-barcode-outline:before { content: "\f3db" } .ion-ios-baseball:before { content: "\f3de" } .ion-ios-baseball-outline:before { content: "\f3dd" } .ion-ios-basketball:before { content: "\f3e0" } .ion-ios-basketball-outline:before { content: "\f3df" } .ion-ios-bell:before { content: "\f3e2" } .ion-ios-bell-outline:before { content: "\f3e1" } .ion-ios-body:before { content: "\f3e4" } .ion-ios-body-outline:before { content: "\f3e3" } .ion-ios-bolt:before { content: "\f3e6" } .ion-ios-bolt-outline:before { content: "\f3e5" } .ion-ios-book:before { content: "\f3e8" } .ion-ios-book-outline:before { content: "\f3e7" } .ion-ios-bookmarks:before { content: "\f3ea" } .ion-ios-bookmarks-outline:before { content: "\f3e9" } .ion-ios-box:before { content: "\f3ec" } .ion-ios-box-outline:before { content: "\f3eb" } .ion-ios-briefcase:before { content: "\f3ee" } .ion-ios-briefcase-outline:before { content: "\f3ed" } .ion-ios-browsers:before { content: "\f3f0" } .ion-ios-browsers-outline:before { content: "\f3ef" } .ion-ios-calculator:before { content: "\f3f2" } .ion-ios-calculator-outline:before { content: "\f3f1" } .ion-ios-calendar:before { content: "\f3f4" } .ion-ios-calendar-outline:before { content: "\f3f3" } .ion-ios-camera:before { content: "\f3f6" } .ion-ios-camera-outline:before { content: "\f3f5" } .ion-ios-cart:before { content: "\f3f8" } .ion-ios-cart-outline:before { content: "\f3f7" } .ion-ios-chatboxes:before { content: "\f3fa" } .ion-ios-chatboxes-outline:before { content: "\f3f9" } .ion-ios-chatbubble:before { content: "\f3fc" } .ion-ios-chatbubble-outline:before { content: "\f3fb" } .ion-ios-checkmark:before { content: "\f3ff" } .ion-ios-checkmark-empty:before { content: "\f3fd" } .ion-ios-checkmark-outline:before { content: "\f3fe" } .ion-ios-circle-filled:before { content: "\f400" } .ion-ios-circle-outline:before { content: "\f401" } .ion-ios-clock:before { content: "\f403" } .ion-ios-clock-outline:before { content: "\f402" } .ion-ios-close:before { content: "\f406" } .ion-ios-close-empty:before { content: "\f404" } .ion-ios-close-outline:before { content: "\f405" } .ion-ios-cloud:before { content: "\f40c" } .ion-ios-cloud-download:before { content: "\f408" } .ion-ios-cloud-download-outline:before { content: "\f407" } .ion-ios-cloud-outline:before { content: "\f409" } .ion-ios-cloud-upload:before { content: "\f40b" } .ion-ios-cloud-upload-outline:before { content: "\f40a" } .ion-ios-cloudy:before { content: "\f410" } .ion-ios-cloudy-night:before { content: "\f40e" } .ion-ios-cloudy-night-outline:before { content: "\f40d" } .ion-ios-cloudy-outline:before { content: "\f40f" } .ion-ios-cog:before { content: "\f412" } .ion-ios-cog-outline:before { content: "\f411" } .ion-ios-color-filter:before { content: "\f414" } .ion-ios-color-filter-outline:before { content: "\f413" } .ion-ios-color-wand:before { content: "\f416" } .ion-ios-color-wand-outline:before { content: "\f415" } .ion-ios-compose:before { content: "\f418" } .ion-ios-compose-outline:before { content: "\f417" } .ion-ios-contact:before { content: "\f41a" } .ion-ios-contact-outline:before { content: "\f419" } .ion-ios-copy:before { content: "\f41c" } .ion-ios-copy-outline:before { content: "\f41b" } .ion-ios-crop:before { content: "\f41e" } .ion-ios-crop-strong:before { content: "\f41d" } .ion-ios-download:before { content: "\f420" } .ion-ios-download-outline:before { content: "\f41f" } .ion-ios-drag:before { content: "\f421" } .ion-ios-email:before { content: "\f423" } .ion-ios-email-outline:before { content: "\f422" } .ion-ios-eye:before { content: "\f425" } .ion-ios-eye-outline:before { content: "\f424" } .ion-ios-fastforward:before { content: "\f427" } .ion-ios-fastforward-outline:before { content: "\f426" } .ion-ios-filing:before { content: "\f429" } .ion-ios-filing-outline:before { content: "\f428" } .ion-ios-film:before { content: "\f42b" } .ion-ios-film-outline:before { content: "\f42a" } .ion-ios-flag:before { content: "\f42d" } .ion-ios-flag-outline:before { content: "\f42c" } .ion-ios-flame:before { content: "\f42f" } .ion-ios-flame-outline:before { content: "\f42e" } .ion-ios-flask:before { content: "\f431" } .ion-ios-flask-outline:before { content: "\f430" } .ion-ios-flower:before { content: "\f433" } .ion-ios-flower-outline:before { content: "\f432" } .ion-ios-folder:before { content: "\f435" } .ion-ios-folder-outline:before { content: "\f434" } .ion-ios-football:before { content: "\f437" } .ion-ios-football-outline:before { content: "\f436" } .ion-ios-game-controller-a:before { content: "\f439" } .ion-ios-game-controller-a-outline:before { content: "\f438" } .ion-ios-game-controller-b:before { content: "\f43b" } .ion-ios-game-controller-b-outline:before { content: "\f43a" } .ion-ios-gear:before { content: "\f43d" } .ion-ios-gear-outline:before { content: "\f43c" } .ion-ios-glasses:before { content: "\f43f" } .ion-ios-glasses-outline:before { content: "\f43e" } .ion-ios-grid-view:before { content: "\f441" } .ion-ios-grid-view-outline:before { content: "\f440" } .ion-ios-heart:before { content: "\f443" } .ion-ios-heart-outline:before { content: "\f442" } .ion-ios-help:before { content: "\f446" } .ion-ios-help-empty:before { content: "\f444" } .ion-ios-help-outline:before { content: "\f445" } .ion-ios-home:before { content: "\f448" } .ion-ios-home-outline:before { content: "\f447" } .ion-ios-infinite:before { content: "\f44a" } .ion-ios-infinite-outline:before { content: "\f449" } .ion-ios-information:before { content: "\f44d" } .ion-ios-information-empty:before { content: "\f44b" } .ion-ios-information-outline:before { content: "\f44c" } .ion-ios-ionic-outline:before { content: "\f44e" } .ion-ios-keypad:before { content: "\f450" } .ion-ios-keypad-outline:before { content: "\f44f" } .ion-ios-lightbulb:before { content: "\f452" } .ion-ios-lightbulb-outline:before { content: "\f451" } .ion-ios-list:before { content: "\f454" } .ion-ios-list-outline:before { content: "\f453" } .ion-ios-location:before { content: "\f456" } .ion-ios-location-outline:before { content: "\f455" } .ion-ios-locked:before { content: "\f458" } .ion-ios-locked-outline:before { content: "\f457" } .ion-ios-loop:before { content: "\f45a" } .ion-ios-loop-strong:before { content: "\f459" } .ion-ios-medical:before { content: "\f45c" } .ion-ios-medical-outline:before { content: "\f45b" } .ion-ios-medkit:before { content: "\f45e" } .ion-ios-medkit-outline:before { content: "\f45d" } .ion-ios-mic:before { content: "\f461" } .ion-ios-mic-off:before { content: "\f45f" } .ion-ios-mic-outline:before { content: "\f460" } .ion-ios-minus:before { content: "\f464" } .ion-ios-minus-empty:before { content: "\f462" } .ion-ios-minus-outline:before { content: "\f463" } .ion-ios-monitor:before { content: "\f466" } .ion-ios-monitor-outline:before { content: "\f465" } .ion-ios-moon:before { content: "\f468" } .ion-ios-moon-outline:before { content: "\f467" } .ion-ios-more:before { content: "\f46a" } .ion-ios-more-outline:before { content: "\f469" } .ion-ios-musical-note:before { content: "\f46b" } .ion-ios-musical-notes:before { content: "\f46c" } .ion-ios-navigate:before { content: "\f46e" } .ion-ios-navigate-outline:before { content: "\f46d" } .ion-ios-nutrition:before { content: "\f470" } .ion-ios-nutrition-outline:before { content: "\f46f" } .ion-ios-paper:before { content: "\f472" } .ion-ios-paper-outline:before { content: "\f471" } .ion-ios-paperplane:before { content: "\f474" } .ion-ios-paperplane-outline:before { content: "\f473" } .ion-ios-partlysunny:before { content: "\f476" } .ion-ios-partlysunny-outline:before { content: "\f475" } .ion-ios-pause:before { content: "\f478" } .ion-ios-pause-outline:before { content: "\f477" } .ion-ios-paw:before { content: "\f47a" } .ion-ios-paw-outline:before { content: "\f479" } .ion-ios-people:before { content: "\f47c" } .ion-ios-people-outline:before { content: "\f47b" } .ion-ios-person:before { content: "\f47e" } .ion-ios-person-outline:before { content: "\f47d" } .ion-ios-personadd:before { content: "\f480" } .ion-ios-personadd-outline:before { content: "\f47f" } .ion-ios-photos:before { content: "\f482" } .ion-ios-photos-outline:before { content: "\f481" } .ion-ios-pie:before { content: "\f484" } .ion-ios-pie-outline:before { content: "\f483" } .ion-ios-pint:before { content: "\f486" } .ion-ios-pint-outline:before { content: "\f485" } .ion-ios-play:before { content: "\f488" } .ion-ios-play-outline:before { content: "\f487" } .ion-ios-plus:before { content: "\f48b" } .ion-ios-plus-empty:before { content: "\f489" } .ion-ios-plus-outline:before { content: "\f48a" } .ion-ios-pricetag:before { content: "\f48d" } .ion-ios-pricetag-outline:before { content: "\f48c" } .ion-ios-pricetags:before { content: "\f48f" } .ion-ios-pricetags-outline:before { content: "\f48e" } .ion-ios-printer:before { content: "\f491" } .ion-ios-printer-outline:before { content: "\f490" } .ion-ios-pulse:before { content: "\f493" } .ion-ios-pulse-strong:before { content: "\f492" } .ion-ios-rainy:before { content: "\f495" } .ion-ios-rainy-outline:before { content: "\f494" } .ion-ios-recording:before { content: "\f497" } .ion-ios-recording-outline:before { content: "\f496" } .ion-ios-redo:before { content: "\f499" } .ion-ios-redo-outline:before { content: "\f498" } .ion-ios-refresh:before { content: "\f49c" } .ion-ios-refresh-empty:before { content: "\f49a" } .ion-ios-refresh-outline:before { content: "\f49b" } .ion-ios-reload:before { content: "\f49d" } .ion-ios-reverse-camera:before { content: "\f49f" } .ion-ios-reverse-camera-outline:before { content: "\f49e" } .ion-ios-rewind:before { content: "\f4a1" } .ion-ios-rewind-outline:before { content: "\f4a0" } .ion-ios-rose:before { content: "\f4a3" } .ion-ios-rose-outline:before { content: "\f4a2" } .ion-ios-search:before { content: "\f4a5" } .ion-ios-search-strong:before { content: "\f4a4" } .ion-ios-settings:before { content: "\f4a7" } .ion-ios-settings-strong:before { content: "\f4a6" } .ion-ios-shuffle:before { content: "\f4a9" } .ion-ios-shuffle-strong:before { content: "\f4a8" } .ion-ios-skipbackward:before { content: "\f4ab" } .ion-ios-skipbackward-outline:before { content: "\f4aa" } .ion-ios-skipforward:before { content: "\f4ad" } .ion-ios-skipforward-outline:before { content: "\f4ac" } .ion-ios-snowy:before { content: "\f4ae" } .ion-ios-speedometer:before { content: "\f4b0" } .ion-ios-speedometer-outline:before { content: "\f4af" } .ion-ios-star:before { content: "\f4b3" } .ion-ios-star-half:before { content: "\f4b1" } .ion-ios-star-outline:before { content: "\f4b2" } .ion-ios-stopwatch:before { content: "\f4b5" } .ion-ios-stopwatch-outline:before { content: "\f4b4" } .ion-ios-sunny:before { content: "\f4b7" } .ion-ios-sunny-outline:before { content: "\f4b6" } .ion-ios-telephone:before { content: "\f4b9" } .ion-ios-telephone-outline:before { content: "\f4b8" } .ion-ios-tennisball:before { content: "\f4bb" } .ion-ios-tennisball-outline:before { content: "\f4ba" } .ion-ios-thunderstorm:before { content: "\f4bd" } .ion-ios-thunderstorm-outline:before { content: "\f4bc" } .ion-ios-time:before { content: "\f4bf" } .ion-ios-time-outline:before { content: "\f4be" } .ion-ios-timer:before { content: "\f4c1" } .ion-ios-timer-outline:before { content: "\f4c0" } .ion-ios-toggle:before { content: "\f4c3" } .ion-ios-toggle-outline:before { content: "\f4c2" } .ion-ios-trash:before { content: "\f4c5" } .ion-ios-trash-outline:before { content: "\f4c4" } .ion-ios-undo:before { content: "\f4c7" } .ion-ios-undo-outline:before { content: "\f4c6" } .ion-ios-unlocked:before { content: "\f4c9" } .ion-ios-unlocked-outline:before { content: "\f4c8" } .ion-ios-upload:before { content: "\f4cb" } .ion-ios-upload-outline:before { content: "\f4ca" } .ion-ios-videocam:before { content: "\f4cd" } .ion-ios-videocam-outline:before { content: "\f4cc" } .ion-ios-volume-high:before { content: "\f4ce" } .ion-ios-volume-low:before { content: "\f4cf" } .ion-ios-wineglass:before { content: "\f4d1" } .ion-ios-wineglass-outline:before { content: "\f4d0" } .ion-ios-world:before { content: "\f4d3" } .ion-ios-world-outline:before { content: "\f4d2" } .ion-ipad:before { content: "\f1f9" } .ion-iphone:before { content: "\f1fa" } .ion-ipod:before { content: "\f1fb" } .ion-jet:before { content: "\f295" } .ion-key:before { content: "\f296" } .ion-knife:before { content: "\f297" } .ion-laptop:before { content: "\f1fc" } .ion-leaf:before { content: "\f1fd" } .ion-levels:before { content: "\f298" } .ion-lightbulb:before { content: "\f299" } .ion-link:before { content: "\f1fe" } .ion-load-a:before { content: "\f29a" } .ion-load-b:before { content: "\f29b" } .ion-load-c:before { content: "\f29c" } .ion-load-d:before { content: "\f29d" } .ion-location:before { content: "\f1ff" } .ion-lock-combination:before { content: "\f4d4" } .ion-locked:before { content: "\f200" } .ion-log-in:before { content: "\f29e" } .ion-log-out:before { content: "\f29f" } .ion-loop:before { content: "\f201" } .ion-magnet:before { content: "\f2a0" } .ion-male:before { content: "\f2a1" } .ion-man:before { content: "\f202" } .ion-map:before { content: "\f203" } .ion-medkit:before { content: "\f2a2" } .ion-merge:before { content: "\f33f" } .ion-mic-a:before { content: "\f204" } .ion-mic-b:before { content: "\f205" } .ion-mic-c:before { content: "\f206" } .ion-minus:before { content: "\f209" } .ion-minus-circled:before { content: "\f207" } .ion-minus-round:before { content: "\f208" } .ion-model-s:before { content: "\f2c1" } .ion-monitor:before { content: "\f20a" } .ion-more:before { content: "\f20b" } .ion-mouse:before { content: "\f340" } .ion-music-note:before { content: "\f20c" } .ion-navicon:before { content: "\f20e" } .ion-navicon-round:before { content: "\f20d" } .ion-navigate:before { content: "\f2a3" } .ion-network:before { content: "\f341" } .ion-no-smoking:before { content: "\f2c2" } .ion-nuclear:before { content: "\f2a4" } .ion-outlet:before { content: "\f342" } .ion-paintbrush:before { content: "\f4d5" } .ion-paintbucket:before { content: "\f4d6" } .ion-paper-airplane:before { content: "\f2c3" } .ion-paperclip:before { content: "\f20f" } .ion-pause:before { content: "\f210" } .ion-person:before { content: "\f213" } .ion-person-add:before { content: "\f211" } .ion-person-stalker:before { content: "\f212" } .ion-pie-graph:before { content: "\f2a5" } .ion-pin:before { content: "\f2a6" } .ion-pinpoint:before { content: "\f2a7" } .ion-pizza:before { content: "\f2a8" } .ion-plane:before { content: "\f214" } .ion-planet:before { content: "\f343" } .ion-play:before { content: "\f215" } .ion-playstation:before { content: "\f30a" } .ion-plus:before { content: "\f218" } .ion-plus-circled:before { content: "\f216" } .ion-plus-round:before { content: "\f217" } .ion-podium:before { content: "\f344" } .ion-pound:before { content: "\f219" } .ion-power:before { content: "\f2a9" } .ion-pricetag:before { content: "\f2aa" } .ion-pricetags:before { content: "\f2ab" } .ion-printer:before { content: "\f21a" } .ion-pull-request:before { content: "\f345" } .ion-qr-scanner:before { content: "\f346" } .ion-quote:before { content: "\f347" } .ion-radio-waves:before { content: "\f2ac" } .ion-record:before { content: "\f21b" } .ion-refresh:before { content: "\f21c" } .ion-reply:before { content: "\f21e" } .ion-reply-all:before { content: "\f21d" } .ion-ribbon-a:before { content: "\f348" } .ion-ribbon-b:before { content: "\f349" } .ion-sad:before { content: "\f34a" } .ion-sad-outline:before { content: "\f4d7" } .ion-scissors:before { content: "\f34b" } .ion-search:before { content: "\f21f" } .ion-settings:before { content: "\f2ad" } .ion-share:before { content: "\f220" } .ion-shuffle:before { content: "\f221" } .ion-skip-backward:before { content: "\f222" } .ion-skip-forward:before { content: "\f223" } .ion-social-android:before { content: "\f225" } .ion-social-android-outline:before { content: "\f224" } .ion-social-angular:before { content: "\f4d9" } .ion-social-angular-outline:before { content: "\f4d8" } .ion-social-apple:before { content: "\f227" } .ion-social-apple-outline:before { content: "\f226" } .ion-social-bitcoin:before { content: "\f2af" } .ion-social-bitcoin-outline:before { content: "\f2ae" } .ion-social-buffer:before { content: "\f229" } .ion-social-buffer-outline:before { content: "\f228" } .ion-social-chrome:before { content: "\f4db" } .ion-social-chrome-outline:before { content: "\f4da" } .ion-social-codepen:before { content: "\f4dd" } .ion-social-codepen-outline:before { content: "\f4dc" } .ion-social-css3:before { content: "\f4df" } .ion-social-css3-outline:before { content: "\f4de" } .ion-social-designernews:before { content: "\f22b" } .ion-social-designernews-outline:before { content: "\f22a" } .ion-social-dribbble:before { content: "\f22d" } .ion-social-dribbble-outline:before { content: "\f22c" } .ion-social-dropbox:before { content: "\f22f" } .ion-social-dropbox-outline:before { content: "\f22e" } .ion-social-euro:before { content: "\f4e1" } .ion-social-euro-outline:before { content: "\f4e0" } .ion-social-facebook:before { content: "\f231" } .ion-social-facebook-outline:before { content: "\f230" } .ion-social-foursquare:before { content: "\f34d" } .ion-social-foursquare-outline:before { content: "\f34c" } .ion-social-freebsd-devil:before { content: "\f2c4" } .ion-social-github:before { content: "\f233" } .ion-social-github-outline:before { content: "\f232" } .ion-social-google:before { content: "\f34f" } .ion-social-google-outline:before { content: "\f34e" } .ion-social-googleplus:before { content: "\f235" } .ion-social-googleplus-outline:before { content: "\f234" } .ion-social-hackernews:before { content: "\f237" } .ion-social-hackernews-outline:before { content: "\f236" } .ion-social-html5:before { content: "\f4e3" } .ion-social-html5-outline:before { content: "\f4e2" } .ion-social-instagram:before { content: "\f351" } .ion-social-instagram-outline:before { content: "\f350" } .ion-social-javascript:before { content: "\f4e5" } .ion-social-javascript-outline:before { content: "\f4e4" } .ion-social-linkedin:before { content: "\f239" } .ion-social-linkedin-outline:before { content: "\f238" } .ion-social-markdown:before { content: "\f4e6" } .ion-social-nodejs:before { content: "\f4e7" } .ion-social-octocat:before { content: "\f4e8" } .ion-social-pinterest:before { content: "\f2b1" } .ion-social-pinterest-outline:before { content: "\f2b0" } .ion-social-python:before { content: "\f4e9" } .ion-social-reddit:before { content: "\f23b" } .ion-social-reddit-outline:before { content: "\f23a" } .ion-social-rss:before { content: "\f23d" } .ion-social-rss-outline:before { content: "\f23c" } .ion-social-sass:before { content: "\f4ea" } .ion-social-skype:before { content: "\f23f" } .ion-social-skype-outline:before { content: "\f23e" } .ion-social-snapchat:before { content: "\f4ec" } .ion-social-snapchat-outline:before { content: "\f4eb" } .ion-social-tumblr:before { content: "\f241" } .ion-social-tumblr-outline:before { content: "\f240" } .ion-social-tux:before { content: "\f2c5" } .ion-social-twitch:before { content: "\f4ee" } .ion-social-twitch-outline:before { content: "\f4ed" } .ion-social-twitter:before { content: "\f243" } .ion-social-twitter-outline:before { content: "\f242" } .ion-social-usd:before { content: "\f353" } .ion-social-usd-outline:before { content: "\f352" } .ion-social-vimeo:before { content: "\f245" } .ion-social-vimeo-outline:before { content: "\f244" } .ion-social-whatsapp:before { content: "\f4f0" } .ion-social-whatsapp-outline:before { content: "\f4ef" } .ion-social-windows:before { content: "\f247" } .ion-social-windows-outline:before { content: "\f246" } .ion-social-wordpress:before { content: "\f249" } .ion-social-wordpress-outline:before { content: "\f248" } .ion-social-yahoo:before { content: "\f24b" } .ion-social-yahoo-outline:before { content: "\f24a" } .ion-social-yen:before { content: "\f4f2" } .ion-social-yen-outline:before { content: "\f4f1" } .ion-social-youtube:before { content: "\f24d" } .ion-social-youtube-outline:before { content: "\f24c" } .ion-soup-can:before { content: "\f4f4" } .ion-soup-can-outline:before { content: "\f4f3" } .ion-speakerphone:before { content: "\f2b2" } .ion-speedometer:before { content: "\f2b3" } .ion-spoon:before { content: "\f2b4" } .ion-star:before { content: "\f24e" } .ion-stats-bars:before { content: "\f2b5" } .ion-steam:before { content: "\f30b" } .ion-stop:before { content: "\f24f" } .ion-thermometer:before { content: "\f2b6" } .ion-thumbsdown:before { content: "\f250" } .ion-thumbsup:before { content: "\f251" } .ion-toggle:before { content: "\f355" } .ion-toggle-filled:before { content: "\f354" } .ion-transgender:before { content: "\f4f5" } .ion-trash-a:before { content: "\f252" } .ion-trash-b:before { content: "\f253" } .ion-trophy:before { content: "\f356" } .ion-tshirt:before { content: "\f4f7" } .ion-tshirt-outline:before { content: "\f4f6" } .ion-umbrella:before { content: "\f2b7" } .ion-university:before { content: "\f357" } .ion-unlocked:before { content: "\f254" } .ion-upload:before { content: "\f255" } .ion-usb:before { content: "\f2b8" } .ion-videocamera:before { content: "\f256" } .ion-volume-high:before { content: "\f257" } .ion-volume-low:before { content: "\f258" } .ion-volume-medium:before { content: "\f259" } .ion-volume-mute:before { content: "\f25a" } .ion-wand:before { content: "\f358" } .ion-waterdrop:before { content: "\f25b" } .ion-wifi:before { content: "\f25c" } .ion-wineglass:before { content: "\f2b9" } .ion-woman:before { content: "\f25d" } .ion-wrench:before { content: "\f2ba" } .ion-xbox:before { content: "\f30c" } ================================================ FILE: base/icons.html ================================================

Icons

MobileUI also comes with its own free and open-source icon font, Ionicons, with over 500 icons to choose from.

The icons are in base MobileUI, for use just install base the command:

mobileui install base

And add icon and the Ionicon class name for the icon to show, which can be easily looked up on the Ionicons homepage. You can change the color add class colors for text.

================================================ FILE: base/install.html ================================================

Getting started

MobileUI was created thinking of making your hybrid application faster and smaller, since you only install what you are really going to use for UI.

Certainly, you will love using it in Progressive Web Apps and Apache Cordova Apps. You can use only the components you want in your projects created with PhoneGap, Ionic Framework, Onsen UI, Framework7 and others focused on creating web apps.

A rich variety of UI components specially designed for mobile apps. MobileUI provides tabs, side menu, stack navigation and tons of other components such as lists and forms. Some of the existing components are displayed differently on Android and iOS, with automatic styling that will change the appearance of the app based on the platform.

The Installation is straightforward, but first, you need to install Node.js. Then, install Cordova via terminal npm install -g cordova(add sudo if you are in Linux).

After that, just execute the command in your terminal:

npm install -g mobileui

To check if MobileUI is installed or not, open the terminal and type mobileui

Simple Example

Let's create a Simple Example using MobileUI and Cordova:

cordova create apptest
cd apptest
mobileui install template cordova-blank
mobileui install header
mobileui preview

Let's check the commands:

cordova create apptest Create a cordova project
cd apptest Change the directory to your project
mobileui install template cordova-blank Clears the sample files created by the Cordova
mobileui install header For sample we can take header component
mobileui preview Emulates the app to run in the browser

After that add the below code in index.html

By default, an HTTP server will run on port 8080, but you can change it by passing the --port parameter with the desired port, eg --port 8000

================================================ FILE: base/mobileui.css ================================================ * { box-sizing: border-box; outline: none } body { font-family: Roboto,"Helvetica Neue",sans-serif; -webkit-overflow-scrolling: touch; overflow: hidden; position: absolute; } body.platform-ios { font-family: -apple-system,"Helvetica Neue",Roboto,sans-serif; } a { cursor: pointer; color: #000; text-decoration: none; } /*Create the scrollable viewport of your app.*/ .content { position: absolute; width: 100%; height: 100%; overflow: auto; } /*Floats any element to the left.*/ .left { float: left } /*Floats any element to the right.*/ .right { float: right } /*Floats any element to the top.*/ .top { position: absolute; top: 0; left: 0; } /*Floats any element to the bottom.*/ .bottom { position: absolute; bottom: 0; left: 0; } /*Align text, icons, and elements to the left.*/ .align-left { text-align: left; } /*Align text, icons, and elements to the center.*/ .align-center { text-align: center; } /*Align text, icons, and elements to the right.*/ .align-right { text-align: right; } /*Add a small border in element.*/ .border { border-width: 1px; border-style: solid; } /*Hide a element.*/ .hidden { display: none; } /*Define 90% of opacity.*/ .opacity-90 { opacity: 0.9; } /*Define 80% of opacity.*/ .opacity-80 { opacity: 0.8; } /*Define 70% of opacity.*/ .opacity-70 { opacity: 0.7; } /*Define 60% of opacity.*/ .opacity-60 { opacity: 0.6; } /*Define 50% of opacity.*/ .opacity-50 { opacity: 0.5; } /*Define 40% of opacity.*/ .opacity-40 { opacity: 0.4; } /*Define 30% of opacity.*/ .opacity-30 { opacity: 0.3; } /*Define 20% of opacity.*/ .opacity-20 { opacity: 0.2; } /*Define 10% of opacity.*/ .opacity-10 { opacity: 0.1; } /*Create a horizontal line, you need define color using base colors.*/ .line { width: 100%; height: 1px; display: block; clear: both; } .icon { font-size: 28px; } img, video { max-width: 100% } p { margin-top: 5px; margin-bottom: 5px } /*Add an internal space.*/ .padding { padding: 10px } /*Add a padding on the top.*/ .padding-top { padding-top: 10px; } /*Add an external space.*/ .margin { margin: 10px } span.padding { padding: 6px; padding-top: 2px; padding-bottom: 2px; } /*Add a small rounded border.*/ .radius { border-radius: 4px; } /*Add a large rounded border.*/ .radius-big { border-radius: 22px; } /*Add a circular border.*/ .circle { border-radius: 50%; } /*Adds a small border just to the left.*/ .radius-left { border-top-left-radius: 4px; border-bottom-left-radius: 4px } /*Adds a small border just to the right.*/ .radius-right { border-top-right-radius: 4px; border-bottom-right-radius: 4px } /*Adds a small border just to the top.*/ .radius-top { border-top-left-radius: 4px; border-top-right-radius: 4px; } /*Limit the display of a text in only one line with periods at the end.*/ .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /*Create a shadow on an element (not text).*/ .shadow { box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); } /*Add a space vertically.*/ .space { width: 100%; height: 20px; } /*Add a big space vertically.*/ .space-big { width: 100%; height: 50px; } /*Add a huge space vertically.*/ .space-huge { width: 100%; height: 100px; } /*Add a margin on the bottom.*/ .margin-bottom { margin-bottom: 10px; } /*Add a margin on the top.*/ .margin-top { margin-top: 10px; } /*Create a shadow in a text.*/ .text-shadow { text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); } /*Leave the text small.*/ .text-small { font-size: 14px; } .text-small .icon, .text-small.icon { font-size: 14px !important; } /*Leave the icon small.*/ .icon-small { font-size: 14px !important; } /*Leave the icon big.*/ .icon-big { font-size: 50px !important; } /*Leave the icon huge.*/ .icon-huge { font-size: 65px !important; } /*Leave the icon extra-huge.*/ .icon-extra-huge { font-size: 120px !important; } /*Leave the text large.*/ .text-big { font-size: 22px } .text-big .icon, .text-big.icon { font-size: 22px !important; } /*Leave the text extra-huge.*/ .text-extra-huge { font-size: 65px } .text-extra-huge .icon, .text-extra-huge.icon { font-size: 65px !important; } /*Leave the text huge.*/ .text-huge { font-size: 32px } .text-huge .icon, .text-huge.icon { font-size: 32px !important; } /*Leave the text thinner.*/ .text-light { font-weight: 300; } /*Leave a bold text.*/ .text-bold { font-weight: bold; } /*Leave the text thicker.*/ .text-strong { font-weight: 800; } /*Floats an element in the footer to the right.*/ .float-bottom-right { position: fixed; right: 15px; bottom: 15px; } /*Floats an element in the footer to the left.*/ .float-bottom-left { position: fixed; left: 15px; bottom: 15px; } /*Floats an element in the footer to the left.*/ .float-bottom-center { position: fixed; margin: auto; left: 0; bottom: 15px; } /*Create a completely round icon.*/ .icon-circle { width: 40px; height: 40px; border-radius: 50%; text-align: center; display: flex; align-items: center; justify-content: center; } .icon-circle-small { width: 25px; height: 25px; border-radius: 50%; text-align: center; display: flex; align-items: center; justify-content: center; } .icon-circle-small i { font-size: 15px; } .icon-circle-big { width: 80px; height: 80px; border-radius: 50%; text-align: center; display: flex; align-items: center; justify-content: center; } .icon-circle-big i { font-size: 70px; } .backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; opacity: .01; z-index: 9999; transition-duration: 280ms; } .backdrop.show { opacity: 0.4; } .mark { border-left-width: 8px !important; } ================================================ FILE: base/reset.css ================================================ * { -webkit-tap-highlight-color: rgba(0,0,0,0); margin: 0; padding: 0; box-sizing: border-box; outline: none; } body { -webkit-touch-callout: none; -webkit-text-size-adjust: none; -webkit-user-select: none; background-color:#fff; font-size:14px; height:100%; margin:0px; padding:0px; width:100%; } h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; } ================================================ FILE: base/templates.html ================================================

Templates

To make application development faster and easier you can use some templates available through MobileUI.

To use a template you need to install with the command:

mobileui install template name-of-template

See list of template for this moment:

Template Description
cordova-blank Create a files base to app created in Apache Cordova.
cordova-angular1 Create a scaffold project using AngularJS
cordova-phaser Create a scaffold project using Phaser.
cordova-vuejs Create a scaffold project using VueJS.
================================================ FILE: button/component.json ================================================ { "name":"button", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: button/index.html ================================================

Button

You can use colors theme and icons in button. If you need use base mode just add theme color name, you can alter border color using class border-[COLOR], alter text color using class text-[COLOR] and add radius border using class radius.

For use icon in button you need add class icon-text and you can use diferent size, see the examples below.

To use this component you need install with the command:

Dependency: base. The dependencies will be installed together with this module
mobileui install button

You can use all features the base MobileUI in this component.

Another type button used in Android is a Tap, for this you can put circle class in button. You can controller what position button.

================================================ FILE: button/script.js ================================================ document.addEventListener('click', function(e){ if(SO.code !== 1) return false; var target = e.target; if (target.tagName.toLowerCase() !== 'button') return false; var rect = target.getBoundingClientRect(); var ripple = target.querySelector('.ripple'); if (!ripple) { ripple = document.createElement('span'); ripple.className = 'ripple'; ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'; target.appendChild(ripple); } ripple.classList.remove('show'); var top = e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop; var left = e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft; ripple.style.top = top + 'px'; ripple.style.left = left + 'px'; ripple.classList.add('show'); return false; }, false); ================================================ FILE: button/style.css ================================================ button { -webkit-transition: color 200ms ease; -moz-transition: color 200ms ease; -ms-transition: color 200ms ease; -o-transition: color 200ms ease; transition: color 200ms ease; font-size: 14px; border: none; background-color: rgba(0,0,0,0); color: #444; position: relative; display: inline-block; margin: 0; padding: 0 12px; min-height: 42px; vertical-align: top; text-align: center; text-overflow: ellipsis; font-size: 16px; line-height: 42px; cursor: pointer; overflow: hidden; } button[disabled] { opacity: 0.8; } button .icon { position: absolute; left: 10px; } button.circle { width: 42px; height: 42px; text-align: center; padding: 0; line-height: 0; font-size: 22px; z-index: 10; } /*Determines that the button will have an icon.*/ button.icon-text { padding-left: 40px; } button.icon-text i{ font-size: 22px; } /*If the button has the class icon-text and icon-right the icon will be aligned to the right.*/ button.icon-text.icon-right { padding-left: 12px; padding-right: 40px; position: relative; } button.icon-right i { position: absolute; right: 12px; text-align: right; margin-top: 2px; } button[class*="border-"] { min-height: 40px; line-height: 40px; } /*Leave the button occupying 100% width of the screen.*/ button.full { width: 100%; } /*Leave the big button.*/ .buttons-group.big button, button.big { font-size: 22px; min-height: 50px; line-height: 50px; } button.circle.big { width: 50px; height: 50px; font-size: 28px; } button.big.icon-text { padding-left: 40px; } button.big.icon-text.icon-right { padding-left: 12px; padding-right: 40px; } button.big.icon-text i { font-size: 26px; } /*Leave the small button.*/ .buttons-group.small button, button.small { font-size: 12px; min-height: 30px; line-height: 30px; } button.circle.small { width: 30px; height: 30px; font-size: 18px; } button.small.icon-text { padding-left: 30px; } button.small.icon-text.icon-right { padding-left: 12px; padding-right: 35px; } button.small.icon-text i { font-size: 18px; } /*hugebutton.*/ .buttons-group.huge button, button.huge { font-size: 32px; min-height: 70px; line-height: 70px; } button.circle.huge { width: 70px; height: 70px; font-size: 32px; } button.huge.icon-text { padding-left: 40px; } button.huge.icon-text.icon-right { padding-left: 12px; padding-right: 40px; } button.huge.icon-text i { font-size: 32px; } /*Create groups of buttons*/ .buttons-group { display: inline-block; } .buttons-group button { float: left; margin-left: -1px; } .buttons-group button:first-child { margin-left: 0; } .buttons-group.full { display: flex; } .buttons-group.full button { flex: 1; } .ripple { position: absolute; background: rgba(255,255,255,.25); border-radius: 100%; -webkit-transform: scale(0); -moz-transform: scale(0); -ms-transform: scale(0); -o-transform: scale(0); transform: scale(0); pointer-events: none; } .ripple.show { -webkit-animation: ripple .5s ease-out; -moz-animation: ripple .5s ease-out; -o-animation: ripple .5s ease-out; animation: ripple .5s ease-out; } @-webkit-keyframes ripple { to { -webkit-transform: scale(1.5); opacity: 0; } } @-moz-keyframes ripple { to { -moz-transform: scale(1.5); opacity: 0; } } @-o-keyframes ripple { to { -o-transform: scale(1.5); opacity: 0; } } @keyframes ripple { to { transform: scale(1.5); opacity: 0; } } ================================================ FILE: chart-bar/component.json ================================================ { "name":"chart-bar", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: chart-bar/index.html ================================================

Chart Bar

This component provides an efficient and customizable bar chart using the capabilities of the base.

To use this component you need install with the command:

Dependency: base. The dependencies will be installed together with this module
mobileui install chart-bar
================================================ FILE: chart-bar/style.css ================================================ /*Determines a area of chart bar.*/ .chart-bar { display:table; table-layout: fixed; width:100%; height:250px; background-image: linear-gradient(to top, rgba(0, 0, 0, 0.1) 2%, rgba(0, 0, 0, 0) 2%); background-size: 100% 50px; background-position: left top; } /*Determines line in chart with white color.*/ .chart-bar.line-white { background-image: linear-gradient(to top, rgba(255, 255, 255, 0.1) 2%, rgba(255, 255, 255, 0) 2%); } /*Remove line in chart.*/ .chart-bar.no-line { background-image: none; } .chart-bar li { position:relative; display:table-cell; vertical-align:bottom; height:250px; } .chart-bar li span{ margin:0 5px; display: block; } .chart-bar li div { width: 100%; text-align: center; padding: 5px; } .chart-bar li span::before{ position:relative; top: 0; width: 100%; padding-top: 5px; padding-bottom: 5px; display:block; text-align:center; content:attr(title); word-wrap: break-word; overflow: hidden; opacity: 0.7; } /*Determines the small size.*/ .chart-bar.size-1 { width: 80px; } .chart-bar.size-1, .chart-bar.size-1 li { height: 40px; } .chart-bar.size-1 li span { margin:0 2px; } /*Determines the medium size.*/ .chart-bar.size-2 { width: 150px; } .chart-bar.size-2, .chart-bar.size-2 li { height: 60px; } .chart-bar.size-2 li span { margin:0 4px; } /*Determines the big size.*/ .chart-bar.size-3 { width: 250px; } .chart-bar.size-3, .chart-bar.size-3 li { height: 80px; } .chart-bar.size-3 li span { margin:0 5px; } ================================================ FILE: chartist/component.json ================================================ { "name":"chartist", "author": "gionkunz", "dependencies": [] } ================================================ FILE: chartist/index.html ================================================

Chartist

You may think that this is just yet an other charting library. But Chartist.js is the product of a community that was disappointed about the abilities provided by other charting libraries. Of course there are hundreds of other great charting libraries but after using them there were always tweaks you would have wished for that were not included.

You can use colors theme and icons in Chartist.

To use this component you need install with the command:

mobileui install chartist

You can use all features the base MobileUI in this component.

Your can use the primary scheme colors and combination with others components. Next example use header, grid and list.

Below another example with combined charts using grid and component chartist-plugin-tooltip. In this case you need install plugin with command mobileui install chartist-plugin-tooltip

================================================ FILE: chartist/script.js ================================================ !function(a,b){"function"==typeof define&&define.amd?define("Chartist",[],function(){return a.Chartist=b()}):"object"==typeof module&&module.exports?module.exports=b():a.Chartist=b()}(this,function(){var a={version:"0.11.0"};return function(a,b,c){"use strict";c.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},c.noop=function(a){return a},c.alphaNumerate=function(a){return String.fromCharCode(97+a%26)},c.extend=function(a){var b,d,e;for(a=a||{},b=1;b":">",'"':""","'":"'"},c.serialize=function(a){return null===a||void 0===a?a:("number"==typeof a?a=""+a:"object"==typeof a&&(a=JSON.stringify({data:a})),Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,b,c.escapingMap[b])},a))},c.deserialize=function(a){if("string"!=typeof a)return a;a=Object.keys(c.escapingMap).reduce(function(a,b){return c.replaceAll(a,c.escapingMap[b],b)},a);try{a=JSON.parse(a),a=void 0!==a.data?a.data:a}catch(b){}return a},c.createSvg=function(a,b,d,e){var f;return b=b||"100%",d=d||"100%",Array.prototype.slice.call(a.querySelectorAll("svg")).filter(function(a){return a.getAttributeNS(c.namespaces.xmlns,"ct")}).forEach(function(b){a.removeChild(b)}),f=new c.Svg("svg").attr({width:b,height:d}).addClass(e),f._node.style.width=b,f._node.style.height=d,a.appendChild(f._node),f},c.normalizeData=function(a,b,d){var e,f={raw:a,normalized:{}};return f.normalized.series=c.getDataArray({series:a.series||[]},b,d),e=f.normalized.series.every(function(a){return a instanceof Array})?Math.max.apply(null,f.normalized.series.map(function(a){return a.length})):f.normalized.series.length,f.normalized.labels=(a.labels||[]).slice(),Array.prototype.push.apply(f.normalized.labels,c.times(Math.max(0,e-f.normalized.labels.length)).map(function(){return""})),b&&c.reverseData(f.normalized),f},c.safeHasProperty=function(a,b){return null!==a&&"object"==typeof a&&a.hasOwnProperty(b)},c.isDataHoleValue=function(a){return null===a||void 0===a||"number"==typeof a&&isNaN(a)},c.reverseData=function(a){a.labels.reverse(),a.series.reverse();for(var b=0;bf.high&&(f.high=c),h&&c0?f.low=0:(f.high=1,f.low=0)),f},c.isNumeric=function(a){return null!==a&&isFinite(a)},c.isFalseyButZero=function(a){return!a&&0!==a},c.getNumberOrUndefined=function(a){return c.isNumeric(a)?+a:void 0},c.isMultiValue=function(a){return"object"==typeof a&&("x"in a||"y"in a)},c.getMultiValue=function(a,b){return c.isMultiValue(a)?c.getNumberOrUndefined(a[b||"y"]):c.getNumberOrUndefined(a)},c.rho=function(a){function b(a,c){return a%c===0?c:b(c,a%c)}function c(a){return a*a+1}if(1===a)return a;var d,e=2,f=2;if(a%2===0)return 2;do e=c(e)%a,f=c(c(f))%a,d=b(Math.abs(e-f),a);while(1===d);return d},c.getBounds=function(a,b,d,e){function f(a,b){return a===(a+=b)&&(a*=1+(b>0?o:-o)),a}var g,h,i,j=0,k={high:b.high,low:b.low};k.valueRange=k.high-k.low,k.oom=c.orderOfMagnitude(k.valueRange),k.step=Math.pow(10,k.oom),k.min=Math.floor(k.low/k.step)*k.step,k.max=Math.ceil(k.high/k.step)*k.step,k.range=k.max-k.min,k.numberOfSteps=Math.round(k.range/k.step);var l=c.projectLength(a,k.step,k),m=l=d)k.step=1;else if(e&&n=d)k.step=n;else for(;;){if(m&&c.projectLength(a,k.step,k)<=d)k.step*=2;else{if(m||!(c.projectLength(a,k.step/2,k)>=d))break;if(k.step/=2,e&&k.step%1!==0){k.step*=2;break}}if(j++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var o=2.221e-16;for(k.step=Math.max(k.step,o),h=k.min,i=k.max;h+k.step<=k.low;)h=f(h,k.step);for(;i-k.step>=k.high;)i=f(i,-k.step);k.min=h,k.max=i,k.range=k.max-k.min;var p=[];for(g=k.min;g<=k.max;g=f(g,k.step)){var q=c.roundWithPrecision(g);q!==p[p.length-1]&&p.push(q)}return k.values=p,k},c.polarToCartesian=function(a,b,c,d){var e=(d-90)*Math.PI/180;return{x:a+c*Math.cos(e),y:b+c*Math.sin(e)}},c.createChartRect=function(a,b,d){var e=!(!b.axisX&&!b.axisY),f=e?b.axisY.offset:0,g=e?b.axisX.offset:0,h=a.width()||c.quantity(b.width).value||0,i=a.height()||c.quantity(b.height).value||0,j=c.normalizePadding(b.chartPadding,d);h=Math.max(h,f+j.left+j.right),i=Math.max(i,g+j.top+j.bottom);var k={padding:j,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return e?("start"===b.axisX.position?(k.y2=j.top+g,k.y1=Math.max(i-j.bottom,k.y2+1)):(k.y2=j.top,k.y1=Math.max(i-j.bottom-g,k.y2+1)),"start"===b.axisY.position?(k.x1=j.left+f,k.x2=Math.max(h-j.right,k.x1+1)):(k.x1=j.left,k.x2=Math.max(h-j.right-f,k.x1+1))):(k.x1=j.left,k.x2=Math.max(h-j.right,k.x1+1),k.y2=j.top,k.y1=Math.max(i-j.bottom,k.y2+1)),k},c.createGrid=function(a,b,d,e,f,g,h,i){var j={};j[d.units.pos+"1"]=a,j[d.units.pos+"2"]=a,j[d.counterUnits.pos+"1"]=e,j[d.counterUnits.pos+"2"]=e+f;var k=g.elem("line",j,h.join(" "));i.emit("draw",c.extend({type:"grid",axis:d,index:b,group:g,element:k},j))},c.createGridBackground=function(a,b,c,d){var e=a.elem("rect",{x:b.x1,y:b.y2,width:b.width(),height:b.height()},c,!0);d.emit("draw",{type:"gridBackground",group:a,element:e})},c.createLabel=function(a,d,e,f,g,h,i,j,k,l,m){var n,o={};if(o[g.units.pos]=a+i[g.units.pos],o[g.counterUnits.pos]=i[g.counterUnits.pos],o[g.units.len]=d,o[g.counterUnits.len]=Math.max(0,h-10),l){var p=b.createElement("span");p.className=k.join(" "),p.setAttribute("xmlns",c.namespaces.xhtml),p.innerText=f[e],p.style[g.units.len]=Math.round(o[g.units.len])+"px",p.style[g.counterUnits.len]=Math.round(o[g.counterUnits.len])+"px",n=j.foreignObject(p,c.extend({style:"overflow: visible;"},o))}else n=j.elem("text",o,k.join(" ")).text(f[e]);m.emit("draw",c.extend({type:"label",axis:g,index:e,group:j,element:n,text:f[e]},o))},c.getSeriesOption=function(a,b,c){if(a.name&&b.series&&b.series[a.name]){var d=b.series[a.name];return d.hasOwnProperty(c)?d[c]:b[c]}return b[c]},c.optionsProvider=function(b,d,e){function f(b){var f=h;if(h=c.extend({},j),d)for(i=0;i=2&&a[h]<=a[h-2]&&(g=!0),g&&(f.push({pathCoordinates:[],valueData:[]}),g=!1),f[f.length-1].pathCoordinates.push(a[h],a[h+1]),f[f.length-1].valueData.push(b[h/2]));return f}}(window,document,a),function(a,b,c){"use strict";c.Interpolation={},c.Interpolation.none=function(a){var b={fillHoles:!1};return a=c.extend({},b,a),function(b,d){for(var e=new c.Svg.Path,f=!0,g=0;g1){var i=[];return h.forEach(function(a){i.push(f(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(i)}if(b=h[0].pathCoordinates,g=h[0].valueData,b.length<=4)return c.Interpolation.none()(b,g);for(var j,k=(new c.Svg.Path).move(b[0],b[1],!1,g[0]),l=0,m=b.length;m-2*!j>l;l+=2){var n=[{x:+b[l-2],y:+b[l-1]},{x:+b[l],y:+b[l+1]},{x:+b[l+2],y:+b[l+3]},{x:+b[l+4],y:+b[l+5]}];j?l?m-4===l?n[3]={x:+b[0],y:+b[1]}:m-2===l&&(n[2]={x:+b[0],y:+b[1]},n[3]={x:+b[2],y:+b[3]}):n[0]={x:+b[m-2],y:+b[m-1]}:m-4===l?n[3]=n[2]:l||(n[0]={x:+b[l],y:+b[l+1]}),k.curve(d*(-n[0].x+6*n[1].x+n[2].x)/6+e*n[2].x,d*(-n[0].y+6*n[1].y+n[2].y)/6+e*n[2].y,d*(n[1].x+6*n[2].x-n[3].x)/6+e*n[2].x,d*(n[1].y+6*n[2].y-n[3].y)/6+e*n[2].y,n[2].x,n[2].y,!1,g[(l+2)/2])}return k}return c.Interpolation.none()([])}},c.Interpolation.monotoneCubic=function(a){var b={fillHoles:!1};return a=c.extend({},b,a),function d(b,e){var f=c.splitIntoSegments(b,e,{fillHoles:a.fillHoles,increasingX:!0});if(f.length){if(f.length>1){var g=[];return f.forEach(function(a){g.push(d(a.pathCoordinates,a.valueData))}),c.Svg.Path.join(g)}if(b=f[0].pathCoordinates,e=f[0].valueData,b.length<=4)return c.Interpolation.none()(b,e);var h,i,j=[],k=[],l=b.length/2,m=[],n=[],o=[],p=[];for(h=0;h0!=n[h]>0?m[h]=0:(m[h]=3*(p[h-1]+p[h])/((2*p[h]+p[h-1])/n[h-1]+(p[h]+2*p[h-1])/n[h]),isFinite(m[h])||(m[h]=0));for(i=(new c.Svg.Path).move(j[0],k[0],!1,e[0]),h=0;h1}).map(function(a){var b=a.pathElements[0],c=a.pathElements[a.pathElements.length-1];return a.clone(!0).position(0).remove(1).move(b.x,r).line(b.x,b.y).position(a.pathElements.length+1).line(c.x,r)}).forEach(function(c){var h=i.elem("path",{d:c.stringify()},a.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:b.normalized.series[g],path:c.clone(),series:f,seriesIndex:g,axisX:d,axisY:e,chartRect:j,index:g,group:i,element:h})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:e.bounds,chartRect:j,axisX:d,axisY:e,svg:this.svg,options:a})}function e(a,b,d,e){c.Line["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Line=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a){var b,d;a.distributeSeries?(b=c.normalizeData(this.data,a.reverseData,a.horizontalBars?"x":"y"),b.normalized.series=b.normalized.series.map(function(a){return[a]})):b=c.normalizeData(this.data,a.reverseData,a.horizontalBars?"x":"y"),this.svg=c.createSvg(this.container,a.width,a.height,a.classNames.chart+(a.horizontalBars?" "+a.classNames.horizontalBars:""));var e=this.svg.elem("g").addClass(a.classNames.gridGroup),g=this.svg.elem("g"),h=this.svg.elem("g").addClass(a.classNames.labelGroup);if(a.stackBars&&0!==b.normalized.series.length){var i=c.serialMap(b.normalized.series,function(){ return Array.prototype.slice.call(arguments).map(function(a){return a}).reduce(function(a,b){return{x:a.x+(b&&b.x)||0,y:a.y+(b&&b.y)||0}},{x:0,y:0})});d=c.getHighLow([i],a,a.horizontalBars?"x":"y")}else d=c.getHighLow(b.normalized.series,a,a.horizontalBars?"x":"y");d.high=+a.high||(0===a.high?0:d.high),d.low=+a.low||(0===a.low?0:d.low);var j,k,l,m,n,o=c.createChartRect(this.svg,a,f.padding);k=a.distributeSeries&&a.stackBars?b.normalized.labels.slice(0,1):b.normalized.labels,a.horizontalBars?(j=m=void 0===a.axisX.type?new c.AutoScaleAxis(c.Axis.units.x,b.normalized.series,o,c.extend({},a.axisX,{highLow:d,referenceValue:0})):a.axisX.type.call(c,c.Axis.units.x,b.normalized.series,o,c.extend({},a.axisX,{highLow:d,referenceValue:0})),l=n=void 0===a.axisY.type?new c.StepAxis(c.Axis.units.y,b.normalized.series,o,{ticks:k}):a.axisY.type.call(c,c.Axis.units.y,b.normalized.series,o,a.axisY)):(l=m=void 0===a.axisX.type?new c.StepAxis(c.Axis.units.x,b.normalized.series,o,{ticks:k}):a.axisX.type.call(c,c.Axis.units.x,b.normalized.series,o,a.axisX),j=n=void 0===a.axisY.type?new c.AutoScaleAxis(c.Axis.units.y,b.normalized.series,o,c.extend({},a.axisY,{highLow:d,referenceValue:0})):a.axisY.type.call(c,c.Axis.units.y,b.normalized.series,o,c.extend({},a.axisY,{highLow:d,referenceValue:0})));var p=a.horizontalBars?o.x1+j.projectValue(0):o.y1-j.projectValue(0),q=[];l.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),j.createGridAndLabels(e,h,this.supportsForeignObject,a,this.eventEmitter),a.showGridBackground&&c.createGridBackground(e,o,a.classNames.gridBackground,this.eventEmitter),b.raw.series.forEach(function(d,e){var f,h,i=e-(b.raw.series.length-1)/2;f=a.distributeSeries&&!a.stackBars?l.axisLength/b.normalized.series.length/2:a.distributeSeries&&a.stackBars?l.axisLength/2:l.axisLength/b.normalized.series[e].length/2,h=g.elem("g"),h.attr({"ct:series-name":d.name,"ct:meta":c.serialize(d.meta)}),h.addClass([a.classNames.series,d.className||a.classNames.series+"-"+c.alphaNumerate(e)].join(" ")),b.normalized.series[e].forEach(function(g,k){var r,s,t,u;if(u=a.distributeSeries&&!a.stackBars?e:a.distributeSeries&&a.stackBars?0:k,r=a.horizontalBars?{x:o.x1+j.projectValue(g&&g.x?g.x:0,k,b.normalized.series[e]),y:o.y1-l.projectValue(g&&g.y?g.y:0,u,b.normalized.series[e])}:{x:o.x1+l.projectValue(g&&g.x?g.x:0,u,b.normalized.series[e]),y:o.y1-j.projectValue(g&&g.y?g.y:0,k,b.normalized.series[e])},l instanceof c.StepAxis&&(l.options.stretch||(r[l.units.pos]+=f*(a.horizontalBars?-1:1)),r[l.units.pos]+=a.stackBars||a.distributeSeries?0:i*a.seriesBarDistance*(a.horizontalBars?-1:1)),t=q[k]||p,q[k]=t-(p-r[l.counterUnits.pos]),void 0!==g){var v={};v[l.units.pos+"1"]=r[l.units.pos],v[l.units.pos+"2"]=r[l.units.pos],!a.stackBars||"accumulate"!==a.stackMode&&a.stackMode?(v[l.counterUnits.pos+"1"]=p,v[l.counterUnits.pos+"2"]=r[l.counterUnits.pos]):(v[l.counterUnits.pos+"1"]=t,v[l.counterUnits.pos+"2"]=q[k]),v.x1=Math.min(Math.max(v.x1,o.x1),o.x2),v.x2=Math.min(Math.max(v.x2,o.x1),o.x2),v.y1=Math.min(Math.max(v.y1,o.y2),o.y1),v.y2=Math.min(Math.max(v.y2,o.y2),o.y1);var w=c.getMetaData(d,k);s=h.elem("line",v,a.classNames.bar).attr({"ct:value":[g.x,g.y].filter(c.isNumeric).join(","),"ct:meta":c.serialize(w)}),this.eventEmitter.emit("draw",c.extend({type:"bar",value:g,index:k,meta:w,series:d,seriesIndex:e,axisX:m,axisY:n,chartRect:o,group:h,element:s},v))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:j.bounds,chartRect:o,axisX:m,axisY:n,svg:this.svg,options:a})}function e(a,b,d,e){c.Bar["super"].constructor.call(this,a,b,f,c.extend({},f,d),e)}var f={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:c.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};c.Bar=c.Base.extend({constructor:e,createChart:d})}(window,document,a),function(a,b,c){"use strict";function d(a,b,c){var d=b.x>a.x;return d&&"explode"===c||!d&&"implode"===c?"start":d&&"implode"===c||!d&&"explode"===c?"end":"middle"}function e(a){var b,e,f,h,i,j=c.normalizeData(this.data),k=[],l=a.startAngle;this.svg=c.createSvg(this.container,a.width,a.height,a.donut?a.classNames.chartDonut:a.classNames.chartPie),e=c.createChartRect(this.svg,a,g.padding),f=Math.min(e.width()/2,e.height()/2),i=a.total||j.normalized.series.reduce(function(a,b){return a+b},0);var m=c.quantity(a.donutWidth);"%"===m.unit&&(m.value*=f/100),f-=a.donut&&!a.donutSolid?m.value/2:0,h="outside"===a.labelPosition||a.donut&&!a.donutSolid?f:"center"===a.labelPosition?0:a.donutSolid?f-m.value/2:f/2,h+=a.labelOffset;var n={x:e.x1+e.width()/2,y:e.y2+e.height()/2},o=1===j.raw.series.filter(function(a){return a.hasOwnProperty("value")?0!==a.value:0!==a}).length;j.raw.series.forEach(function(a,b){k[b]=this.svg.elem("g",null,null)}.bind(this)),a.showLabel&&(b=this.svg.elem("g",null,null)),j.raw.series.forEach(function(e,g){if(0!==j.normalized.series[g]||!a.ignoreEmptyValues){k[g].attr({"ct:series-name":e.name}),k[g].addClass([a.classNames.series,e.className||a.classNames.series+"-"+c.alphaNumerate(g)].join(" "));var p=i>0?l+j.normalized.series[g]/i*360:0,q=Math.max(0,l-(0===g||o?0:.2));p-q>=359.99&&(p=q+359.99);var r,s,t,u=c.polarToCartesian(n.x,n.y,f,q),v=c.polarToCartesian(n.x,n.y,f,p),w=new c.Svg.Path(!a.donut||a.donutSolid).move(v.x,v.y).arc(f,f,0,p-l>180,0,u.x,u.y);a.donut?a.donutSolid&&(t=f-m.value,r=c.polarToCartesian(n.x,n.y,t,l-(0===g||o?0:.2)),s=c.polarToCartesian(n.x,n.y,t,p),w.line(r.x,r.y),w.arc(t,t,0,p-l>180,1,s.x,s.y)):w.line(n.x,n.y);var x=a.classNames.slicePie;a.donut&&(x=a.classNames.sliceDonut,a.donutSolid&&(x=a.classNames.sliceDonutSolid));var y=k[g].elem("path",{d:w.stringify()},x);if(y.attr({"ct:value":j.normalized.series[g],"ct:meta":c.serialize(e.meta)}),a.donut&&!a.donutSolid&&(y._node.style.strokeWidth=m.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:j.normalized.series[g],totalDataSum:i,index:g,meta:e.meta,series:e,group:k[g],element:y,path:w.clone(),center:n,radius:f,startAngle:l,endAngle:p}),a.showLabel){var z;z=1===j.raw.series.length?{x:n.x,y:n.y}:c.polarToCartesian(n.x,n.y,h,l+(p-l)/2);var A;A=j.normalized.labels&&!c.isFalseyButZero(j.normalized.labels[g])?j.normalized.labels[g]:j.normalized.series[g];var B=a.labelInterpolationFnc(A,g);if(B||0===B){var C=b.elem("text",{dx:z.x,dy:z.y,"text-anchor":d(n,z,a.labelDirection)},a.classNames.label).text(""+B);this.eventEmitter.emit("draw",{type:"label",index:g,group:b,element:C,text:""+B,x:z.x,y:z.y})}}l=p}}.bind(this)),this.eventEmitter.emit("created",{chartRect:e,svg:this.svg,options:a})}function f(a,b,d,e){c.Pie["super"].constructor.call(this,a,b,g,c.extend({},g,d),e)}var g={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:c.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};c.Pie=c.Base.extend({constructor:f,createChart:e,determineAnchorPosition:d})}(window,document,a),a}); ================================================ FILE: chartist/style.css ================================================ .ct-double-octave:after,.ct-major-eleventh:after,.ct-major-second:after,.ct-major-seventh:after,.ct-major-sixth:after,.ct-major-tenth:after,.ct-major-third:after,.ct-major-twelfth:after,.ct-minor-second:after,.ct-minor-seventh:after,.ct-minor-sixth:after,.ct-minor-third:after,.ct-octave:after,.ct-perfect-fifth:after,.ct-perfect-fourth:after,.ct-square:after{content:"";clear:both}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-grid-background,.ct-line{fill:none}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:flex-end;-webkit-align-items:flex-end;-ms-flex-align:flex-end;align-items:flex-end;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:flex-start;-webkit-align-items:flex-start;-ms-flex-align:flex-start;align-items:flex-start;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-webkit-justify-content:flex-end;-ms-flex-pack:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-start;-webkit-justify-content:flex-start;-ms-flex-pack:flex-start;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-donut-solid,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-donut-solid,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-donut-solid,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-donut-solid,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-donut-solid,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-donut-solid,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-donut-solid,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-donut-solid,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#f05b4f}.ct-series-i .ct-area,.ct-series-i .ct-slice-donut-solid,.ct-series-i .ct-slice-pie{fill:#f05b4f}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-donut-solid,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-donut-solid,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-donut-solid,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-donut-solid,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-donut-solid,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-donut-solid,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{display:table}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{display:table}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{display:table}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{display:table}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{display:table}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{display:table}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{display:table}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{display:table}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{display:table}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{display:table}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{display:table}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{display:table}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{display:table}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{display:table}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{display:table}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{display:table}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0} /*Set a big size for rows and bars..*/ .chartist-big {} .chartist-big .ct-series-a .ct-bar, .chartist-big .ct-series-a .ct-line, .chartist-big .ct-series-a .ct-point, .chartist-big .ct-series-a .ct-slice-donut, .chartist-big .ct-series-b .ct-bar, .chartist-big .ct-series-b .ct-line, .chartist-big .ct-series-b .ct-point, .chartist-big .ct-series-b .ct-slice-donut, .chartist-big .ct-series-c .ct-bar, .chartist-big .ct-series-c .ct-line, .chartist-big .ct-series-c .ct-point, .chartist-big .ct-series-c .ct-slice-donut, .chartist-big .ct-series-d .ct-bar, .chartist-big .ct-series-d .ct-line, .chartist-big .ct-series-d .ct-point, .chartist-big .ct-series-d .ct-slice-donut { stroke-width: 20px; } /*Set a big size for rows and bars..*/ .chartist-huge {} .chartist-huge .ct-series-a .ct-bar, .chartist-huge .ct-series-a .ct-line, .chartist-huge .ct-series-a .ct-point, .chartist-huge .ct-series-a .ct-slice-donut, .chartist-huge .ct-series-b .ct-bar, .chartist-huge .ct-series-b .ct-line, .chartist-huge .ct-series-b .ct-point, .chartist-huge .ct-series-b .ct-slice-donut, .chartist-huge .ct-series-c .ct-bar, .chartist-huge .ct-series-c .ct-line, .chartist-huge .ct-series-c .ct-point, .chartist-huge .ct-series-c .ct-slice-donut, .chartist-huge .ct-series-d .ct-bar, .chartist-huge .ct-series-d .ct-line, .chartist-huge .ct-series-d .ct-point, .chartist-huge .ct-series-d .ct-slice-donut { stroke-width: 30px; } /*Sets a color scheme for the chart.*/ .chartist-white {} .chartist-white.text-black .ct-label { fill: #000; color: #000; } .chartist-white.text-white .ct-label { fill:#fff; color:#fff; } .chartist-white .ct-label { fill: rgba(255,255,255,.4); color: rgba(255,255,255,.4); } .chartist-white .ct-grid { stroke: rgba(255,255,255,.2); } .chartist-white .ct-series-a .ct-bar, .chartist-white .ct-series-a .ct-line, .chartist-white .ct-series-a .ct-point, .chartist-white .ct-series-a .ct-slice-donut { stroke: rgba(255, 255, 255, 1); } .chartist-white .ct-series-b .ct-bar, .chartist-white .ct-series-b .ct-line, .chartist-white .ct-series-b .ct-point, .chartist-white .ct-series-b .ct-slice-donut { stroke: rgba(255, 255, 255, 0.7); } .chartist-white .ct-series-c .ct-bar, .chartist-white .ct-series-c .ct-line, .chartist-white .ct-series-c .ct-point, .chartist-white .ct-series-c .ct-slice-donut { stroke: rgba(255, 255, 255, 0.4); } .chartist-white .ct-series-d .ct-bar, .chartist-white .ct-series-d .ct-line, .chartist-white .ct-series-d .ct-point, .chartist-white .ct-series-d .ct-slice-donut { stroke: rgba(255, 255, 255, 0.2); } .chartist-white .ct-series-a .ct-area, .chartist-white .ct-series-a .ct-slice-donut-solid, .chartist-white .ct-series-a .ct-slice-pie { fill: rgba(255, 255, 255, 1); } .chartist-white .ct-series-b .ct-area, .chartist-white .ct-series-b .ct-slice-donut-solid, .chartist-white .ct-series-b .ct-slice-pie { fill: rgba(255, 255, 255, 0.7); } .chartist-white .ct-series-c .ct-area, .chartist-white .ct-series-c .ct-slice-donut-solid, .chartist-white .ct-series-c .ct-slice-pie { fill: rgba(255, 255, 255, 0.4); } .chartist-white .ct-series-d .ct-area, .chartist-white .ct-series-d .ct-slice-donut-solid, .chartist-white .ct-series-d .ct-slice-pie { fill: rgba(255, 255, 255, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-red {} .chartist-red.text-black .ct-label { fill: #000; color: #000; } .chartist-red.text-white .ct-label { fill:#fff; color:#fff; } .chartist-red .ct-label { fill: rgba(244, 67, 54,.4); color: rgba(244, 67, 54,.4); } .chartist-red .ct-grid { stroke: rgba(244, 67, 54,.2); } .chartist-red .ct-series-a .ct-bar, .chartist-red .ct-series-a .ct-line, .chartist-red .ct-series-a .ct-point, .chartist-red .ct-series-a .ct-slice-donut { stroke: rgba(244, 67, 54, 1); } .chartist-red .ct-series-b .ct-bar, .chartist-red .ct-series-b .ct-line, .chartist-red .ct-series-b .ct-point, .chartist-red .ct-series-b .ct-slice-donut { stroke: rgba(244, 67, 54, 0.7); } .chartist-red .ct-series-c .ct-bar, .chartist-red .ct-series-c .ct-line, .chartist-red .ct-series-c .ct-point, .chartist-red .ct-series-c .ct-slice-donut { stroke: rgba(244, 67, 54, 0.4); } .chartist-red .ct-series-d .ct-bar, .chartist-red .ct-series-d .ct-line, .chartist-red .ct-series-d .ct-point, .chartist-red .ct-series-d .ct-slice-donut { stroke: rgba(244, 67, 54, 0.2); } .chartist-red .ct-series-a .ct-area, .chartist-red .ct-series-a .ct-slice-donut-solid, .chartist-red .ct-series-a .ct-slice-pie { fill: rgba(244, 67, 54, 1); } .chartist-red .ct-series-b .ct-area, .chartist-red .ct-series-b .ct-slice-donut-solid, .chartist-red .ct-series-b .ct-slice-pie { fill: rgba(244, 67, 54, 0.7); } .chartist-red .ct-series-c .ct-area, .chartist-red .ct-series-c .ct-slice-donut-solid, .chartist-red .ct-series-c .ct-slice-pie { fill: rgba(244, 67, 54, 0.4); } .chartist-red .ct-series-d .ct-area, .chartist-red .ct-series-d .ct-slice-donut-solid, .chartist-red .ct-series-d .ct-slice-pie { fill: rgba(244, 67, 54, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-pink {} .chartist-pink.text-black .ct-label { fill: #000; color: #000; } .chartist-pink.text-white .ct-label { fill:#fff; color:#fff; } .chartist-pink .ct-label { fill: rgba(233, 30, 99,.4); color: rgba(233, 30, 99,.4); } .chartist-pink .ct-grid { stroke: rgba(233, 30, 99,.2); } .chartist-pink .ct-series-a .ct-bar, .chartist-pink .ct-series-a .ct-line, .chartist-pink .ct-series-a .ct-point, .chartist-pink .ct-series-a .ct-slice-donut { stroke: rgba(233, 30, 99, 1); } .chartist-pink .ct-series-b .ct-bar, .chartist-pink .ct-series-b .ct-line, .chartist-pink .ct-series-b .ct-point, .chartist-pink .ct-series-b .ct-slice-donut { stroke: rgba(233, 30, 99, 0.7); } .chartist-pink .ct-series-c .ct-bar, .chartist-pink .ct-series-c .ct-line, .chartist-pink .ct-series-c .ct-point, .chartist-pink .ct-series-c .ct-slice-donut { stroke: rgba(233, 30, 99, 0.4); } .chartist-pink .ct-series-d .ct-bar, .chartist-pink .ct-series-d .ct-line, .chartist-pink .ct-series-d .ct-point, .chartist-pink .ct-series-d .ct-slice-donut { stroke: rgba(233, 30, 99, 0.2); } .chartist-pink .ct-series-a .ct-area, .chartist-pink .ct-series-a .ct-slice-donut-solid, .chartist-pink .ct-series-a .ct-slice-pie { fill: rgba(233, 30, 99, 1); } .chartist-pink .ct-series-b .ct-area, .chartist-pink .ct-series-b .ct-slice-donut-solid, .chartist-pink .ct-series-b .ct-slice-pie { fill: rgba(233, 30, 99, 0.7); } .chartist-pink .ct-series-c .ct-area, .chartist-pink .ct-series-c .ct-slice-donut-solid, .chartist-pink .ct-series-c .ct-slice-pie { fill: rgba(233, 30, 99, 0.4); } .chartist-pink .ct-series-d .ct-area, .chartist-pink .ct-series-d .ct-slice-donut-solid, .chartist-pink .ct-series-d .ct-slice-pie { fill: rgba(233, 30, 99, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-purple {} .chartist-purple.text-black .ct-label { fill: #000; color: #000; } .chartist-purple.text-white .ct-label { fill:#fff; color:#fff; } .chartist-purple .ct-label { fill: rgba(156, 39, 176,.4); color: rgba(156, 39, 176,.4); } .chartist-purple .ct-grid { stroke: rgba(156, 39, 176,.2); } .chartist-purple .ct-series-a .ct-bar, .chartist-purple .ct-series-a .ct-line, .chartist-purple .ct-series-a .ct-point, .chartist-purple .ct-series-a .ct-slice-donut { stroke: rgba(156, 39, 176, 1); } .chartist-purple .ct-series-b .ct-bar, .chartist-purple .ct-series-b .ct-line, .chartist-purple .ct-series-b .ct-point, .chartist-purple .ct-series-b .ct-slice-donut { stroke: rgba(156, 39, 176, 0.7); } .chartist-purple .ct-series-c .ct-bar, .chartist-purple .ct-series-c .ct-line, .chartist-purple .ct-series-c .ct-point, .chartist-purple .ct-series-c .ct-slice-donut { stroke: rgba(156, 39, 176, 0.4); } .chartist-purple .ct-series-d .ct-bar, .chartist-purple .ct-series-d .ct-line, .chartist-purple .ct-series-d .ct-point, .chartist-purple .ct-series-d .ct-slice-donut { stroke: rgba(156, 39, 176, 0.2); } .chartist-purple .ct-series-a .ct-area, .chartist-purple .ct-series-a .ct-slice-donut-solid, .chartist-purple .ct-series-a .ct-slice-pie { fill: rgba(156, 39, 176, 1); } .chartist-purple .ct-series-b .ct-area, .chartist-purple .ct-series-b .ct-slice-donut-solid, .chartist-purple .ct-series-b .ct-slice-pie { fill: rgba(156, 39, 176, 0.7); } .chartist-purple .ct-series-c .ct-area, .chartist-purple .ct-series-c .ct-slice-donut-solid, .chartist-purple .ct-series-c .ct-slice-pie { fill: rgba(156, 39, 176, 0.4); } .chartist-purple .ct-series-d .ct-area, .chartist-purple .ct-series-d .ct-slice-donut-solid, .chartist-purple .ct-series-d .ct-slice-pie { fill: rgba(156, 39, 176, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-deep-purple {} .chartist-deep.text-white-purple .ct-label { fill:#fff; color:#fff; } .chartist-deep-purple .ct-label { fill: rgba(103, 58, 183,.4); color: rgba(103, 58, 183,.4); } .chartist-deep-purple .ct-grid { stroke: rgba(103, 58, 183,.2); } .chartist-deep-purple .ct-series-a .ct-bar, .chartist-deep-purple .ct-series-a .ct-line, .chartist-deep-purple .ct-series-a .ct-point, .chartist-deep-purple .ct-series-a .ct-slice-donut { stroke: rgba(103, 58, 183, 1); } .chartist-deep-purple .ct-series-b .ct-bar, .chartist-deep-purple .ct-series-b .ct-line, .chartist-deep-purple .ct-series-b .ct-point, .chartist-deep-purple .ct-series-b .ct-slice-donut { stroke: rgba(103, 58, 183, 0.7); } .chartist-deep-purple .ct-series-c .ct-bar, .chartist-deep-purple .ct-series-c .ct-line, .chartist-deep-purple .ct-series-c .ct-point, .chartist-deep-purple .ct-series-c .ct-slice-donut { stroke: rgba(103, 58, 183, 0.4); } .chartist-deep-purple .ct-series-d .ct-bar, .chartist-deep-purple .ct-series-d .ct-line, .chartist-deep-purple .ct-series-d .ct-point, .chartist-deep-purple .ct-series-d .ct-slice-donut { stroke: rgba(103, 58, 183, 0.2); } .chartist-deep-purple .ct-series-a .ct-area, .chartist-deep-purple .ct-series-a .ct-slice-donut-solid, .chartist-deep-purple .ct-series-a .ct-slice-pie { fill: rgba(103, 58, 183, 1); } .chartist-deep-purple .ct-series-b .ct-area, .chartist-deep-purple .ct-series-b .ct-slice-donut-solid, .chartist-deep-purple .ct-series-b .ct-slice-pie { fill: rgba(103, 58, 183, 0.7); } .chartist-deep-purple .ct-series-c .ct-area, .chartist-deep-purple .ct-series-c .ct-slice-donut-solid, .chartist-deep-purple .ct-series-c .ct-slice-pie { fill: rgba(103, 58, 183, 0.4); } .chartist-deep-purple .ct-series-d .ct-area, .chartist-deep-purple .ct-series-d .ct-slice-donut-solid, .chartist-deep-purple .ct-series-d .ct-slice-pie { fill: rgba(103, 58, 183, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-indigo {} .chartist-indigo.text-black .ct-label { fill: #000; color: #000; } .chartist-indigo.text-white .ct-label { fill:#fff; color:#fff; } .chartist-indigo .ct-label { fill: rgba(63, 81, 181,.4); color: rgba(63, 81, 181,.4); } .chartist-indigo .ct-grid { stroke: rgba(63, 81, 181,.2); } .chartist-indigo .ct-series-a .ct-bar, .chartist-indigo .ct-series-a .ct-line, .chartist-indigo .ct-series-a .ct-point, .chartist-indigo .ct-series-a .ct-slice-donut { stroke: rgba(63, 81, 181, 1); } .chartist-indigo .ct-series-b .ct-bar, .chartist-indigo .ct-series-b .ct-line, .chartist-indigo .ct-series-b .ct-point, .chartist-indigo .ct-series-b .ct-slice-donut { stroke: rgba(63, 81, 181, 0.7); } .chartist-indigo .ct-series-c .ct-bar, .chartist-indigo .ct-series-c .ct-line, .chartist-indigo .ct-series-c .ct-point, .chartist-indigo .ct-series-c .ct-slice-donut { stroke: rgba(63, 81, 181, 0.4); } .chartist-indigo .ct-series-d .ct-bar, .chartist-indigo .ct-series-d .ct-line, .chartist-indigo .ct-series-d .ct-point, .chartist-indigo .ct-series-d .ct-slice-donut { stroke: rgba(63, 81, 181, 0.2); } .chartist-indigo .ct-series-a .ct-area, .chartist-indigo .ct-series-a .ct-slice-donut-solid, .chartist-indigo .ct-series-a .ct-slice-pie { fill: rgba(63, 81, 181, 1); } .chartist-indigo .ct-series-b .ct-area, .chartist-indigo .ct-series-b .ct-slice-donut-solid, .chartist-indigo .ct-series-b .ct-slice-pie { fill: rgba(63, 81, 181, 0.7); } .chartist-indigo .ct-series-c .ct-area, .chartist-indigo .ct-series-c .ct-slice-donut-solid, .chartist-indigo .ct-series-c .ct-slice-pie { fill: rgba(63, 81, 181, 0.4); } .chartist-indigo .ct-series-d .ct-area, .chartist-indigo .ct-series-d .ct-slice-donut-solid, .chartist-indigo .ct-series-d .ct-slice-pie { fill: rgba(63, 81, 181, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-blue {} .chartist-blue.text-black .ct-label { fill: #000; color: #000; } .chartist-blue.text-white .ct-label { fill:#fff; color:#fff; } .chartist-blue .ct-label { fill: rgba(33, 150, 243,.4); color: rgba(33, 150, 243,.4); } .chartist-blue .ct-grid { stroke: rgba(33, 150, 243,.2); } .chartist-blue .ct-series-a .ct-bar, .chartist-blue .ct-series-a .ct-line, .chartist-blue .ct-series-a .ct-point, .chartist-blue .ct-series-a .ct-slice-donut { stroke: rgba(33, 150, 243, 1); } .chartist-blue .ct-series-b .ct-bar, .chartist-blue .ct-series-b .ct-line, .chartist-blue .ct-series-b .ct-point, .chartist-blue .ct-series-b .ct-slice-donut { stroke: rgba(33, 150, 243, 0.7); } .chartist-blue .ct-series-c .ct-bar, .chartist-blue .ct-series-c .ct-line, .chartist-blue .ct-series-c .ct-point, .chartist-blue .ct-series-c .ct-slice-donut { stroke: rgba(33, 150, 243, 0.4); } .chartist-blue .ct-series-d .ct-bar, .chartist-blue .ct-series-d .ct-line, .chartist-blue .ct-series-d .ct-point, .chartist-blue .ct-series-d .ct-slice-donut { stroke: rgba(33, 150, 243, 0.2); } .chartist-blue .ct-series-a .ct-area, .chartist-blue .ct-series-a .ct-slice-donut-solid, .chartist-blue .ct-series-a .ct-slice-pie { fill: rgba(33, 150, 243, 1); } .chartist-blue .ct-series-b .ct-area, .chartist-blue .ct-series-b .ct-slice-donut-solid, .chartist-blue .ct-series-b .ct-slice-pie { fill: rgba(33, 150, 243, 0.7); } .chartist-blue .ct-series-c .ct-area, .chartist-blue .ct-series-c .ct-slice-donut-solid, .chartist-blue .ct-series-c .ct-slice-pie { fill: rgba(33, 150, 243, 0.4); } .chartist-blue .ct-series-d .ct-area, .chartist-blue .ct-series-d .ct-slice-donut-solid, .chartist-blue .ct-series-d .ct-slice-pie { fill: rgba(33, 150, 243, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-light-blue {} .chartist-light.text-white-blue .ct-label { fill:#fff; color:#fff; } .chartist-light-blue .ct-label { fill: rgba(3, 169, 244,.4); color: rgba(3, 169, 244,.4); } .chartist-light-blue .ct-grid { stroke: rgba(3, 169, 244,.2); } .chartist-light-blue .ct-series-a .ct-bar, .chartist-light-blue .ct-series-a .ct-line, .chartist-light-blue .ct-series-a .ct-point, .chartist-light-blue .ct-series-a .ct-slice-donut { stroke: rgba(3, 169, 244, 1); } .chartist-light-blue .ct-series-b .ct-bar, .chartist-light-blue .ct-series-b .ct-line, .chartist-light-blue .ct-series-b .ct-point, .chartist-light-blue .ct-series-b .ct-slice-donut { stroke: rgba(3, 169, 244, 0.7); } .chartist-light-blue .ct-series-c .ct-bar, .chartist-light-blue .ct-series-c .ct-line, .chartist-light-blue .ct-series-c .ct-point, .chartist-light-blue .ct-series-c .ct-slice-donut { stroke: rgba(3, 169, 244, 0.4); } .chartist-light-blue .ct-series-d .ct-bar, .chartist-light-blue .ct-series-d .ct-line, .chartist-light-blue .ct-series-d .ct-point, .chartist-light-blue .ct-series-d .ct-slice-donut { stroke: rgba(3, 169, 244, 0.2); } .chartist-light-blue .ct-series-a .ct-area, .chartist-light-blue .ct-series-a .ct-slice-donut-solid, .chartist-light-blue .ct-series-a .ct-slice-pie { fill: rgba(3, 169, 244, 1); } .chartist-light-blue .ct-series-b .ct-area, .chartist-light-blue .ct-series-b .ct-slice-donut-solid, .chartist-light-blue .ct-series-b .ct-slice-pie { fill: rgba(3, 169, 244, 0.7); } .chartist-light-blue .ct-series-c .ct-area, .chartist-light-blue .ct-series-c .ct-slice-donut-solid, .chartist-light-blue .ct-series-c .ct-slice-pie { fill: rgba(3, 169, 244, 0.4); } .chartist-light-blue .ct-series-d .ct-area, .chartist-light-blue .ct-series-d .ct-slice-donut-solid, .chartist-light-blue .ct-series-d .ct-slice-pie { fill: rgba(3, 169, 244, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-cyan {} .chartist-cyan.text-black .ct-label { fill: #000; color: #000; } .chartist-cyan.text-white .ct-label { fill:#fff; color:#fff; } .chartist-cyan .ct-label { fill: rgba(0, 188, 212,.4); color: rgba(0, 188, 212,.4); } .chartist-cyan .ct-grid { stroke: rgba(0, 188, 212,.2); } .chartist-cyan .ct-series-a .ct-bar, .chartist-cyan .ct-series-a .ct-line, .chartist-cyan .ct-series-a .ct-point, .chartist-cyan .ct-series-a .ct-slice-donut { stroke: rgba(0, 188, 212, 1); } .chartist-cyan .ct-series-b .ct-bar, .chartist-cyan .ct-series-b .ct-line, .chartist-cyan .ct-series-b .ct-point, .chartist-cyan .ct-series-b .ct-slice-donut { stroke: rgba(0, 188, 212, 0.7); } .chartist-cyan .ct-series-c .ct-bar, .chartist-cyan .ct-series-c .ct-line, .chartist-cyan .ct-series-c .ct-point, .chartist-cyan .ct-series-c .ct-slice-donut { stroke: rgba(0, 188, 212, 0.4); } .chartist-cyan .ct-series-d .ct-bar, .chartist-cyan .ct-series-d .ct-line, .chartist-cyan .ct-series-d .ct-point, .chartist-cyan .ct-series-d .ct-slice-donut { stroke: rgba(0, 188, 212, 0.2); } .chartist-cyan .ct-series-a .ct-area, .chartist-cyan .ct-series-a .ct-slice-donut-solid, .chartist-cyan .ct-series-a .ct-slice-pie { fill: rgba(0, 188, 212, 1); } .chartist-cyan .ct-series-b .ct-area, .chartist-cyan .ct-series-b .ct-slice-donut-solid, .chartist-cyan .ct-series-b .ct-slice-pie { fill: rgba(0, 188, 212, 0.7); } .chartist-cyan .ct-series-c .ct-area, .chartist-cyan .ct-series-c .ct-slice-donut-solid, .chartist-cyan .ct-series-c .ct-slice-pie { fill: rgba(0, 188, 212, 0.4); } .chartist-cyan .ct-series-d .ct-area, .chartist-cyan .ct-series-d .ct-slice-donut-solid, .chartist-cyan .ct-series-d .ct-slice-pie { fill: rgba(0, 188, 212, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-teal {} .chartist-teal.text-black .ct-label { fill: #000; color: #000; } .chartist-teal.text-white .ct-label { fill:#fff; color:#fff; } .chartist-teal .ct-label { fill: rgba(0, 150, 136,.4); color: rgba(0, 150, 136,.4); } .chartist-teal .ct-grid { stroke: rgba(0, 150, 136,.2); } .chartist-teal .ct-series-a .ct-bar, .chartist-teal .ct-series-a .ct-line, .chartist-teal .ct-series-a .ct-point, .chartist-teal .ct-series-a .ct-slice-donut { stroke: rgba(0, 150, 136, 1); } .chartist-teal .ct-series-b .ct-bar, .chartist-teal .ct-series-b .ct-line, .chartist-teal .ct-series-b .ct-point, .chartist-teal .ct-series-b .ct-slice-donut { stroke: rgba(0, 150, 136, 0.7); } .chartist-teal .ct-series-c .ct-bar, .chartist-teal .ct-series-c .ct-line, .chartist-teal .ct-series-c .ct-point, .chartist-teal .ct-series-c .ct-slice-donut { stroke: rgba(0, 150, 136, 0.4); } .chartist-teal .ct-series-d .ct-bar, .chartist-teal .ct-series-d .ct-line, .chartist-teal .ct-series-d .ct-point, .chartist-teal .ct-series-d .ct-slice-donut { stroke: rgba(0, 150, 136, 0.2); } .chartist-teal .ct-series-a .ct-area, .chartist-teal .ct-series-a .ct-slice-donut-solid, .chartist-teal .ct-series-a .ct-slice-pie { fill: rgba(0, 150, 136, 1); } .chartist-teal .ct-series-b .ct-area, .chartist-teal .ct-series-b .ct-slice-donut-solid, .chartist-teal .ct-series-b .ct-slice-pie { fill: rgba(0, 150, 136, 0.7); } .chartist-teal .ct-series-c .ct-area, .chartist-teal .ct-series-c .ct-slice-donut-solid, .chartist-teal .ct-series-c .ct-slice-pie { fill: rgba(0, 150, 136, 0.4); } .chartist-teal .ct-series-d .ct-area, .chartist-teal .ct-series-d .ct-slice-donut-solid, .chartist-teal .ct-series-d .ct-slice-pie { fill: rgba(0, 150, 136, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-green {} .chartist-green.text-black .ct-label { fill: #000; color: #000; } .chartist-green.text-white .ct-label { fill:#fff; color:#fff; } .chartist-green .ct-label { fill: rgba(76, 175, 79,.4); color: rgba(76, 175, 79,.4); } .chartist-green .ct-grid { stroke: rgba(76, 175, 79,.2); } .chartist-green .ct-series-a .ct-bar, .chartist-green .ct-series-a .ct-line, .chartist-green .ct-series-a .ct-point, .chartist-green .ct-series-a .ct-slice-donut { stroke: rgba(76, 175, 79, 1); } .chartist-green .ct-series-b .ct-bar, .chartist-green .ct-series-b .ct-line, .chartist-green .ct-series-b .ct-point, .chartist-green .ct-series-b .ct-slice-donut { stroke: rgba(76, 175, 79, 0.7); } .chartist-green .ct-series-c .ct-bar, .chartist-green .ct-series-c .ct-line, .chartist-green .ct-series-c .ct-point, .chartist-green .ct-series-c .ct-slice-donut { stroke: rgba(76, 175, 79, 0.4); } .chartist-green .ct-series-d .ct-bar, .chartist-green .ct-series-d .ct-line, .chartist-green .ct-series-d .ct-point, .chartist-green .ct-series-d .ct-slice-donut { stroke: rgba(76, 175, 79, 0.2); } .chartist-green .ct-series-a .ct-area, .chartist-green .ct-series-a .ct-slice-donut-solid, .chartist-green .ct-series-a .ct-slice-pie { fill: rgba(76, 175, 79, 1); } .chartist-green .ct-series-b .ct-area, .chartist-green .ct-series-b .ct-slice-donut-solid, .chartist-green .ct-series-b .ct-slice-pie { fill: rgba(76, 175, 79, 0.7); } .chartist-green .ct-series-c .ct-area, .chartist-green .ct-series-c .ct-slice-donut-solid, .chartist-green .ct-series-c .ct-slice-pie { fill: rgba(76, 175, 79, 0.4); } .chartist-green .ct-series-d .ct-area, .chartist-green .ct-series-d .ct-slice-donut-solid, .chartist-green .ct-series-d .ct-slice-pie { fill: rgba(76, 175, 79, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-lime {} .chartist-lime.text-black .ct-label { fill: #000; color: #000; } .chartist-lime.text-white .ct-label { fill:#fff; color:#fff; } .chartist-lime .ct-label { fill: rgba(205, 220, 57,.4); color: rgba(205, 220, 57,.4); } .chartist-lime .ct-grid { stroke: rgba(205, 220, 57,.2); } .chartist-lime .ct-series-a .ct-bar, .chartist-lime .ct-series-a .ct-line, .chartist-lime .ct-series-a .ct-point, .chartist-lime .ct-series-a .ct-slice-donut { stroke: rgba(205, 220, 57, 1); } .chartist-lime .ct-series-b .ct-bar, .chartist-lime .ct-series-b .ct-line, .chartist-lime .ct-series-b .ct-point, .chartist-lime .ct-series-b .ct-slice-donut { stroke: rgba(205, 220, 57, 0.7); } .chartist-lime .ct-series-c .ct-bar, .chartist-lime .ct-series-c .ct-line, .chartist-lime .ct-series-c .ct-point, .chartist-lime .ct-series-c .ct-slice-donut { stroke: rgba(205, 220, 57, 0.4); } .chartist-lime .ct-series-d .ct-bar, .chartist-lime .ct-series-d .ct-line, .chartist-lime .ct-series-d .ct-point, .chartist-lime .ct-series-d .ct-slice-donut { stroke: rgba(205, 220, 57, 0.2); } .chartist-lime .ct-series-a .ct-area, .chartist-lime .ct-series-a .ct-slice-donut-solid, .chartist-lime .ct-series-a .ct-slice-pie { fill: rgba(205, 220, 57, 1); } .chartist-lime .ct-series-b .ct-area, .chartist-lime .ct-series-b .ct-slice-donut-solid, .chartist-lime .ct-series-b .ct-slice-pie { fill: rgba(205, 220, 57, 0.7); } .chartist-lime .ct-series-c .ct-area, .chartist-lime .ct-series-c .ct-slice-donut-solid, .chartist-lime .ct-series-c .ct-slice-pie { fill: rgba(205, 220, 57, 0.4); } .chartist-lime .ct-series-d .ct-area, .chartist-lime .ct-series-d .ct-slice-donut-solid, .chartist-lime .ct-series-d .ct-slice-pie { fill: rgba(205, 220, 57, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-yellow {} .chartist-yellow.text-black .ct-label { fill: #000; color: #000; } .chartist-yellow.text-white .ct-label { fill:#fff; color:#fff; } .chartist-yellow .ct-label { fill: rgba(255, 235, 59,.4); color: rgba(255, 235, 59,.4); } .chartist-yellow .ct-grid { stroke: rgba(255, 235, 59,.2); } .chartist-yellow .ct-series-a .ct-bar, .chartist-yellow .ct-series-a .ct-line, .chartist-yellow .ct-series-a .ct-point, .chartist-yellow .ct-series-a .ct-slice-donut { stroke: rgba(255, 235, 59, 1); } .chartist-yellow .ct-series-b .ct-bar, .chartist-yellow .ct-series-b .ct-line, .chartist-yellow .ct-series-b .ct-point, .chartist-yellow .ct-series-b .ct-slice-donut { stroke: rgba(255, 235, 59, 0.7); } .chartist-yellow .ct-series-c .ct-bar, .chartist-yellow .ct-series-c .ct-line, .chartist-yellow .ct-series-c .ct-point, .chartist-yellow .ct-series-c .ct-slice-donut { stroke: rgba(255, 235, 59, 0.4); } .chartist-yellow .ct-series-d .ct-bar, .chartist-yellow .ct-series-d .ct-line, .chartist-yellow .ct-series-d .ct-point, .chartist-yellow .ct-series-d .ct-slice-donut { stroke: rgba(255, 235, 59, 0.2); } .chartist-yellow .ct-series-a .ct-area, .chartist-yellow .ct-series-a .ct-slice-donut-solid, .chartist-yellow .ct-series-a .ct-slice-pie { fill: rgba(255, 235, 59, 1); } .chartist-yellow .ct-series-b .ct-area, .chartist-yellow .ct-series-b .ct-slice-donut-solid, .chartist-yellow .ct-series-b .ct-slice-pie { fill: rgba(255, 235, 59, 0.7); } .chartist-yellow .ct-series-c .ct-area, .chartist-yellow .ct-series-c .ct-slice-donut-solid, .chartist-yellow .ct-series-c .ct-slice-pie { fill: rgba(255, 235, 59, 0.4); } .chartist-yellow .ct-series-d .ct-area, .chartist-yellow .ct-series-d .ct-slice-donut-solid, .chartist-yellow .ct-series-d .ct-slice-pie { fill: rgba(255, 235, 59, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-amber {} .chartist-amber.text-black .ct-label { fill: #000; color: #000; } .chartist-amber.text-white .ct-label { fill:#fff; color:#fff; } .chartist-amber .ct-label { fill: rgba(255, 193, 7,.4); color: rgba(255, 193, 7,.4); } .chartist-amber .ct-grid { stroke: rgba(255, 193, 7,.2); } .chartist-amber .ct-series-a .ct-bar, .chartist-amber .ct-series-a .ct-line, .chartist-amber .ct-series-a .ct-point, .chartist-amber .ct-series-a .ct-slice-donut { stroke: rgba(255, 193, 7, 1); } .chartist-amber .ct-series-b .ct-bar, .chartist-amber .ct-series-b .ct-line, .chartist-amber .ct-series-b .ct-point, .chartist-amber .ct-series-b .ct-slice-donut { stroke: rgba(255, 193, 7, 0.7); } .chartist-amber .ct-series-c .ct-bar, .chartist-amber .ct-series-c .ct-line, .chartist-amber .ct-series-c .ct-point, .chartist-amber .ct-series-c .ct-slice-donut { stroke: rgba(255, 193, 7, 0.4); } .chartist-amber .ct-series-d .ct-bar, .chartist-amber .ct-series-d .ct-line, .chartist-amber .ct-series-d .ct-point, .chartist-amber .ct-series-d .ct-slice-donut { stroke: rgba(255, 193, 7, 0.2); } .chartist-amber .ct-series-a .ct-area, .chartist-amber .ct-series-a .ct-slice-donut-solid, .chartist-amber .ct-series-a .ct-slice-pie { fill: rgba(255, 193, 7, 1); } .chartist-amber .ct-series-b .ct-area, .chartist-amber .ct-series-b .ct-slice-donut-solid, .chartist-amber .ct-series-b .ct-slice-pie { fill: rgba(255, 193, 7, 0.7); } .chartist-amber .ct-series-c .ct-area, .chartist-amber .ct-series-c .ct-slice-donut-solid, .chartist-amber .ct-series-c .ct-slice-pie { fill: rgba(255, 193, 7, 0.4); } .chartist-amber .ct-series-d .ct-area, .chartist-amber .ct-series-d .ct-slice-donut-solid, .chartist-amber .ct-series-d .ct-slice-pie { fill: rgba(255, 193, 7, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-orange {} .chartist-orange.text-black .ct-label { fill: #000; color: #000; } .chartist-orange.text-white .ct-label { fill:#fff; color:#fff; } .chartist-orange .ct-label { fill: rgba(255, 152, 0,.4); color: rgba(255, 152, 0,.4); } .chartist-orange .ct-grid { stroke: rgba(255, 152, 0,.2); } .chartist-orange .ct-series-a .ct-bar, .chartist-orange .ct-series-a .ct-line, .chartist-orange .ct-series-a .ct-point, .chartist-orange .ct-series-a .ct-slice-donut { stroke: rgba(255, 152, 0, 1); } .chartist-orange .ct-series-b .ct-bar, .chartist-orange .ct-series-b .ct-line, .chartist-orange .ct-series-b .ct-point, .chartist-orange .ct-series-b .ct-slice-donut { stroke: rgba(255, 152, 0, 0.7); } .chartist-orange .ct-series-c .ct-bar, .chartist-orange .ct-series-c .ct-line, .chartist-orange .ct-series-c .ct-point, .chartist-orange .ct-series-c .ct-slice-donut { stroke: rgba(255, 152, 0, 0.4); } .chartist-orange .ct-series-d .ct-bar, .chartist-orange .ct-series-d .ct-line, .chartist-orange .ct-series-d .ct-point, .chartist-orange .ct-series-d .ct-slice-donut { stroke: rgba(255, 152, 0, 0.2); } .chartist-orange .ct-series-a .ct-area, .chartist-orange .ct-series-a .ct-slice-donut-solid, .chartist-orange .ct-series-a .ct-slice-pie { fill: rgba(255, 152, 0, 1); } .chartist-orange .ct-series-b .ct-area, .chartist-orange .ct-series-b .ct-slice-donut-solid, .chartist-orange .ct-series-b .ct-slice-pie { fill: rgba(255, 152, 0, 0.7); } .chartist-orange .ct-series-c .ct-area, .chartist-orange .ct-series-c .ct-slice-donut-solid, .chartist-orange .ct-series-c .ct-slice-pie { fill: rgba(255, 152, 0, 0.4); } .chartist-orange .ct-series-d .ct-area, .chartist-orange .ct-series-d .ct-slice-donut-solid, .chartist-orange .ct-series-d .ct-slice-pie { fill: rgba(255, 152, 0, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-brown {} .chartist-brown.text-black .ct-label { fill: #000; color: #000; } .chartist-brown.text-white .ct-label { fill:#fff; color:#fff; } .chartist-brown .ct-label { fill: rgba(121, 85, 72,.4); color: rgba(121, 85, 72,.4); } .chartist-brown .ct-grid { stroke: rgba(121, 85, 72,.2); } .chartist-brown .ct-series-a .ct-bar, .chartist-brown .ct-series-a .ct-line, .chartist-brown .ct-series-a .ct-point, .chartist-brown .ct-series-a .ct-slice-donut { stroke: rgba(121, 85, 72, 1); } .chartist-brown .ct-series-b .ct-bar, .chartist-brown .ct-series-b .ct-line, .chartist-brown .ct-series-b .ct-point, .chartist-brown .ct-series-b .ct-slice-donut { stroke: rgba(121, 85, 72, 0.7); } .chartist-brown .ct-series-c .ct-bar, .chartist-brown .ct-series-c .ct-line, .chartist-brown .ct-series-c .ct-point, .chartist-brown .ct-series-c .ct-slice-donut { stroke: rgba(121, 85, 72, 0.4); } .chartist-brown .ct-series-d .ct-bar, .chartist-brown .ct-series-d .ct-line, .chartist-brown .ct-series-d .ct-point, .chartist-brown .ct-series-d .ct-slice-donut { stroke: rgba(121, 85, 72, 0.2); } .chartist-brown .ct-series-a .ct-area, .chartist-brown .ct-series-a .ct-slice-donut-solid, .chartist-brown .ct-series-a .ct-slice-pie { fill: rgba(121, 85, 72, 1); } .chartist-brown .ct-series-b .ct-area, .chartist-brown .ct-series-b .ct-slice-donut-solid, .chartist-brown .ct-series-b .ct-slice-pie { fill: rgba(121, 85, 72, 0.7); } .chartist-brown .ct-series-c .ct-area, .chartist-brown .ct-series-c .ct-slice-donut-solid, .chartist-brown .ct-series-c .ct-slice-pie { fill: rgba(121, 85, 72, 0.4); } .chartist-brown .ct-series-d .ct-area, .chartist-brown .ct-series-d .ct-slice-donut-solid, .chartist-brown .ct-series-d .ct-slice-pie { fill: rgba(121, 85, 72, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-grey {} .chartist-grey.text-black .ct-label { fill: #000; color: #000; } .chartist-grey.text-white .ct-label { fill:#fff; color:#fff; } .chartist-grey .ct-label { fill: rgba(158, 158, 158,.4); color: rgba(158, 158, 158,.4); } .chartist-grey .ct-grid { stroke: rgba(158, 158, 158,.2); } .chartist-grey .ct-series-a .ct-bar, .chartist-grey .ct-series-a .ct-line, .chartist-grey .ct-series-a .ct-point, .chartist-grey .ct-series-a .ct-slice-donut { stroke: rgba(158, 158, 158, 1); } .chartist-grey .ct-series-b .ct-bar, .chartist-grey .ct-series-b .ct-line, .chartist-grey .ct-series-b .ct-point, .chartist-grey .ct-series-b .ct-slice-donut { stroke: rgba(158, 158, 158, 0.7); } .chartist-grey .ct-series-c .ct-bar, .chartist-grey .ct-series-c .ct-line, .chartist-grey .ct-series-c .ct-point, .chartist-grey .ct-series-c .ct-slice-donut { stroke: rgba(158, 158, 158, 0.4); } .chartist-grey .ct-series-d .ct-bar, .chartist-grey .ct-series-d .ct-line, .chartist-grey .ct-series-d .ct-point, .chartist-grey .ct-series-d .ct-slice-donut { stroke: rgba(158, 158, 158, 0.2); } .chartist-grey .ct-series-a .ct-area, .chartist-grey .ct-series-a .ct-slice-donut-solid, .chartist-grey .ct-series-a .ct-slice-pie { fill: rgba(158, 158, 158, 1); } .chartist-grey .ct-series-b .ct-area, .chartist-grey .ct-series-b .ct-slice-donut-solid, .chartist-grey .ct-series-b .ct-slice-pie { fill: rgba(158, 158, 158, 0.7); } .chartist-grey .ct-series-c .ct-area, .chartist-grey .ct-series-c .ct-slice-donut-solid, .chartist-grey .ct-series-c .ct-slice-pie { fill: rgba(158, 158, 158, 0.4); } .chartist-grey .ct-series-d .ct-area, .chartist-grey .ct-series-d .ct-slice-donut-solid, .chartist-grey .ct-series-d .ct-slice-pie { fill: rgba(158, 158, 158, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-blue-grey {} .chartist-blue.text-white-grey .ct-label { fill:#fff; color:#fff; } .chartist-blue-grey .ct-label { fill: rgba(96, 125, 139,.4); color: rgba(96, 125, 139,.4); } .chartist-blue-grey .ct-grid { stroke: rgba(96, 125, 139,.2); } .chartist-blue-grey .ct-series-a .ct-bar, .chartist-blue-grey .ct-series-a .ct-line, .chartist-blue-grey .ct-series-a .ct-point, .chartist-blue-grey .ct-series-a .ct-slice-donut { stroke: rgba(96, 125, 139, 1); } .chartist-blue-grey .ct-series-b .ct-bar, .chartist-blue-grey .ct-series-b .ct-line, .chartist-blue-grey .ct-series-b .ct-point, .chartist-blue-grey .ct-series-b .ct-slice-donut { stroke: rgba(96, 125, 139, 0.7); } .chartist-blue-grey .ct-series-c .ct-bar, .chartist-blue-grey .ct-series-c .ct-line, .chartist-blue-grey .ct-series-c .ct-point, .chartist-blue-grey .ct-series-c .ct-slice-donut { stroke: rgba(96, 125, 139, 0.4); } .chartist-blue-grey .ct-series-d .ct-bar, .chartist-blue-grey .ct-series-d .ct-line, .chartist-blue-grey .ct-series-d .ct-point, .chartist-blue-grey .ct-series-d .ct-slice-donut { stroke: rgba(96, 125, 139, 0.2); } .chartist-blue-grey .ct-series-a .ct-area, .chartist-blue-grey .ct-series-a .ct-slice-donut-solid, .chartist-blue-grey .ct-series-a .ct-slice-pie { fill: rgba(96, 125, 139, 1); } .chartist-blue-grey .ct-series-b .ct-area, .chartist-blue-grey .ct-series-b .ct-slice-donut-solid, .chartist-blue-grey .ct-series-b .ct-slice-pie { fill: rgba(96, 125, 139, 0.7); } .chartist-blue-grey .ct-series-c .ct-area, .chartist-blue-grey .ct-series-c .ct-slice-donut-solid, .chartist-blue-grey .ct-series-c .ct-slice-pie { fill: rgba(96, 125, 139, 0.4); } .chartist-blue-grey .ct-series-d .ct-area, .chartist-blue-grey .ct-series-d .ct-slice-donut-solid, .chartist-blue-grey .ct-series-d .ct-slice-pie { fill: rgba(96, 125, 139, 0.2); } /*Sets a color scheme for the chart.*/ .chartist-black {} .chartist-black.text-black .ct-label { fill: #000; color: #000; } .chartist-black.text-white .ct-label { fill:#fff; color:#fff; } .chartist-black .ct-label { fill: rgba(0, 0, 0,.4); color: rgba(0, 0, 0,.4); } .chartist-black .ct-grid { stroke: rgba(0, 0, 0,.2); } .chartist-black .ct-series-a .ct-bar, .chartist-black .ct-series-a .ct-line, .chartist-black .ct-series-a .ct-point, .chartist-black .ct-series-a .ct-slice-donut { stroke: rgba(0, 0, 0, 1); } .chartist-black .ct-series-b .ct-bar, .chartist-black .ct-series-b .ct-line, .chartist-black .ct-series-b .ct-point, .chartist-black .ct-series-b .ct-slice-donut { stroke: rgba(0, 0, 0, 0.7); } .chartist-black .ct-series-c .ct-bar, .chartist-black .ct-series-c .ct-line, .chartist-black .ct-series-c .ct-point, .chartist-black .ct-series-c .ct-slice-donut { stroke: rgba(0, 0, 0, 0.4); } .chartist-black .ct-series-d .ct-bar, .chartist-black .ct-series-d .ct-line, .chartist-black .ct-series-d .ct-point, .chartist-black .ct-series-d .ct-slice-donut { stroke: rgba(0, 0, 0, 0.2); } .chartist-black .ct-series-a .ct-area, .chartist-black .ct-series-a .ct-slice-donut-solid, .chartist-black .ct-series-a .ct-slice-pie { fill: rgba(0, 0, 0, 1); } .chartist-black .ct-series-b .ct-area, .chartist-black .ct-series-b .ct-slice-donut-solid, .chartist-black .ct-series-b .ct-slice-pie { fill: rgba(0, 0, 0, 0.7); } .chartist-black .ct-series-c .ct-area, .chartist-black .ct-series-c .ct-slice-donut-solid, .chartist-black .ct-series-c .ct-slice-pie { fill: rgba(0, 0, 0, 0.4); } .chartist-black .ct-series-d .ct-area, .chartist-black .ct-series-d .ct-slice-donut-solid, .chartist-black .ct-series-d .ct-slice-pie { fill: rgba(0, 0, 0, 0.2); } ================================================ FILE: chartist-plugin-tooltip/component.json ================================================ { "name":"chartist-plugin-tooltip", "author": "tmmdata", "dependencies": [ "chartist" ] } ================================================ FILE: chartist-plugin-tooltip/script.js ================================================ /* chartist-plugin-tooltip 0.0.18 * Copyright © 2017 Markus Padourek * Free to use under the WTFPL license. * http://www.wtfpl.net/ */ !function(a,b){"function"==typeof define&&define.amd?define(["chartist"],function(c){return a.returnExportsGlobal=b(c)}):"object"==typeof exports?module.exports=b(require("chartist")):a["Chartist.plugins.tooltip"]=b(Chartist)}(this,function(a){return function(a,b,c){"use strict";function d(a){f(a,"tooltip-show")||(a.className=a.className+" tooltip-show")}function e(a){var b=new RegExp("tooltip-show\\s*","gi");a.className=a.className.replace(b,"").trim()}function f(a,b){return(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")>-1}function g(a,b){do{a=a.nextSibling}while(a&&!f(a,b));return a}function h(a){return a.innerText||a.textContent}var i={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!1,class:void 0,pointClass:"ct-point"};c.plugins=c.plugins||{},c.plugins.tooltip=function(j){return j=c.extend({},i,j),function(i){function k(a,b,c){n.addEventListener(a,function(a){b&&!f(a.target,b)||c(a)})}function l(b){p=p||o.offsetHeight,q=q||o.offsetWidth;var c,d,e=-q/2+j.tooltipOffset.x,f=-p+j.tooltipOffset.y;if(j.appendToBody)o.style.top=b.pageY+f+"px",o.style.left=b.pageX+e+"px";else{var g=n.getBoundingClientRect(),h=b.pageX-g.left-a.pageXOffset,i=b.pageY-g.top-a.pageYOffset;!0===j.anchorToPoint&&b.target.x2&&b.target.y2&&(c=parseInt(b.target.x2.baseVal.value),d=parseInt(b.target.y2.baseVal.value)),o.style.top=(d||i)+f+"px",o.style.left=(c||h)+e+"px"}}var m=j.pointClass;i.constructor.name==c.Bar.prototype.constructor.name?m="ct-bar":i.constructor.name==c.Pie.prototype.constructor.name&&(m=i.options.donut?"ct-slice-donut":"ct-slice-pie");var n=i.container,o=n.querySelector(".chartist-tooltip");o||(o=b.createElement("div"),o.className=j.class?"chartist-tooltip "+j.class:"chartist-tooltip",j.appendToBody?b.body.appendChild(o):n.appendChild(o));var p=o.offsetHeight,q=o.offsetWidth;e(o),k("mouseover",m,function(a){var e=a.target,f="",k=i instanceof c.Pie?e:e.parentNode,m=k?e.parentNode.getAttribute("ct:meta")||e.parentNode.getAttribute("ct:series-name"):"",n=e.getAttribute("ct:meta")||m||"",r=!!n,s=e.getAttribute("ct:value");if(j.transformTooltipTextFnc&&"function"==typeof j.transformTooltipTextFnc&&(s=j.transformTooltipTextFnc(s)),j.tooltipFnc&&"function"==typeof j.tooltipFnc)f=j.tooltipFnc(n,s);else{if(j.metaIsHTML){var t=b.createElement("textarea");t.innerHTML=n,n=t.value}if(n=''+n+"",r)f+=n+"
";else if(i instanceof c.Pie){var u=g(e,"ct-label");u&&(f+=h(u)+"
")}s&&(j.currency&&(s=void 0!=j.currencyFormatCallback?j.currencyFormatCallback(s,j):j.currency+s.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),s=''+s+"",f+=s)}f&&(o.innerHTML=f,l(a),d(o),p=o.offsetHeight,q=o.offsetWidth)}),k("mouseout",m,function(){e(o)}),k("mousemove",null,function(a){!1===j.anchorToPoint&&l(a)})}}}(window,document,a),a.plugins.tooltip}); //# sourceMappingURL=chartist-plugin-tooltip.min.js.map ================================================ FILE: chartist-plugin-tooltip/style.css ================================================ .chartist-tooltip { position: absolute; display: inline-block; opacity: 0; min-width: 5em; padding: .5em; background: #F4C63D; color: #453D3F; font-family: Oxygen,Helvetica,Arial,sans-serif; font-weight: 700; text-align: center; pointer-events: none; z-index: 1; -webkit-transition: opacity .2s linear; -moz-transition: opacity .2s linear; -o-transition: opacity .2s linear; transition: opacity .2s linear; } .chartist-tooltip:before { content: ""; position: absolute; top: 100%; left: 50%; width: 0; height: 0; margin-left: -15px; border: 15px solid transparent; border-top-color: #F4C63D; } .chartist-tooltip.tooltip-show { opacity: 1; } .ct-area, .ct-line { pointer-events: none; } /*# sourceMappingURL=chartist-plugin-tooltip.css.map */ ================================================ FILE: chartjs/component.json ================================================ { "name":"chartjs", "author": "nnnick", "dependencies": [] } ================================================ FILE: chartjs/index.html ================================================

Chart.js

Simple HTML5 Charts using the canvas element chartjs.org.

To use this component you need install with the command:

mobileui install chartjs

MobileUI use this lib for create another components!

================================================ FILE: chartjs/script.js ================================================ /*! * Chart.js * http://chartjs.org/ * Version: 2.6.0 * * Copyright 2017 Nick Downie * Released under the MIT license * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md */ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){return function t(e,n,i){function a(r,l){if(!n[r]){if(!e[r]){var s="function"==typeof require&&require;if(!l&&s)return s(r,!0);if(o)return o(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[r]={exports:{}};e[r][0].call(d.exports,function(t){var n=e[r][1][t];return a(n?n:t)},d,d.exports,t,e,n,i)}return n[r].exports}for(var o="function"==typeof require&&require,r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return e<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,a=void 0===e?.5:e,o=2*a-1,r=n.alpha()-i.alpha(),l=((o*r===-1?o:(o+r)/(1+o*r))+1)/2,s=1-l;return this.rgb(l*n.red()+s*i.red(),l*n.green()+s*i.green(),l*n.blue()+s*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new o,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],e={}.toString.call(t),"[object Array]"===e?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var a=.4124*e+.3576*n+.1805*i,o=.2126*e+.7152*n+.0722*i,r=.0193*e+.1192*n+.9505*i;return[100*a,100*o,100*r]}function d(t){var e,n,i,a=u(t),o=a[0],r=a[1],l=a[2];return o/=95.047,r/=100,l/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,e=116*r-16,n=500*(o-r),i=200*(r-l),[e,n,i]}function c(t){return B(d(t))}function h(t){var e,n,i,a,o,r=t[0]/360,l=t[1]/100,s=t[2]/100;if(0==l)return o=255*s,[o,o,o];n=s<.5?s*(1+l):s+l-s*l,e=2*s-n,a=[0,0,0];for(var u=0;u<3;u++)i=r+1/3*-(u-1),i<0&&i++,i>1&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*o;return a}function f(t){var e,n,i=t[0],a=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,a*=o<=1?o:2-o,n=(o+a)/2,e=2*a/(o+a),[i,100*e,100*n])}function p(t){return o(h(t))}function m(t){return l(h(t))}function v(t){return s(h(t))}function x(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*i*(1-n),l=255*i*(1-n*o),s=255*i*(1-n*(1-o)),i=255*i;switch(a){case 0:return[i,s,r];case 1:return[l,i,r];case 2:return[r,i,s];case 3:return[r,l,i];case 4:return[s,r,i];case 5:return[i,r,l]}}function y(t){var e,n,i=t[0],a=t[1]/100,o=t[2]/100;return n=(2-a)*o,e=a*o,e/=n<=1?n:2-n,e=e||0,n/=2,[i,100*e,100*n]}function k(t){return o(x(t))}function w(t){return l(x(t))}function M(t){return s(x(t))}function S(t){var e,n,i,a,o=t[0]/360,l=t[1]/100,s=t[2]/100,u=l+s;switch(u>1&&(l/=u,s/=u),e=Math.floor(6*o),n=1-s,i=6*o-e,0!=(1&e)&&(i=1-i),a=l+i*(n-l),e){default:case 6:case 0:r=n,g=a,b=l;break;case 1:r=a,g=n,b=l;break;case 2:r=l,g=n,b=a;break;case 3:r=l,g=a,b=n;break;case 4:r=a,g=l,b=n;break;case 5:r=n,g=l,b=a}return[255*r,255*g,255*b]}function C(t){return i(S(t))}function D(t){return a(S(t))}function I(t){return l(S(t))}function A(t){return s(S(t))}function P(t){var e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100,l=t[3]/100;return e=1-Math.min(1,a*(1-l)+l),n=1-Math.min(1,o*(1-l)+l),i=1-Math.min(1,r*(1-l)+l),[255*e,255*n,255*i]}function _(t){return i(P(t))}function T(t){return a(P(t))}function F(t){return o(P(t))}function R(t){return s(P(t))}function L(t){var e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100;return e=3.2406*a+o*-1.5372+r*-.4986,n=a*-.9689+1.8758*o+.0415*r,i=.0557*a+o*-.204+1.057*r,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,e=Math.min(Math.max(0,e),1),n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),[255*e,255*n,255*i]}function V(t){var e,n,i,a=t[0],o=t[1],r=t[2];return a/=95.047,o/=100,r/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*o-16,n=500*(a-o),i=200*(o-r),[e,n,i]}function O(t){return B(V(t))}function z(t){var e,n,i,a,o=t[0],r=t[1],l=t[2];return o<=8?(n=100*o/903.3,a=7.787*(n/100)+16/116):(n=100*Math.pow((o+16)/116,3),a=Math.pow(n/100,1/3)),e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i=i/108.883<=.008859?i=108.883*(a-l/200-16/116)/7.787:108.883*Math.pow(a-l/200,3),[e,n,i]}function B(t){var e,n,i,a=t[0],o=t[1],r=t[2];return e=Math.atan2(r,o),n=360*e/2/Math.PI,n<0&&(n+=360),i=Math.sqrt(o*o+r*r),[a,i,n]}function W(t){return L(z(t))}function N(t){var e,n,i,a=t[0],o=t[1],r=t[2];return i=r/360*2*Math.PI,e=o*Math.cos(i),n=o*Math.sin(i),[a,e,n]}function E(t){return z(N(t))}function H(t){return W(N(t))}function q(t){return J[t]}function j(t){return i(q(t))}function Y(t){return a(q(t))}function U(t){return o(q(t))}function X(t){return l(q(t))}function K(t){return d(q(t))}function G(t){return u(q(t))}e.exports={rgb2hsl:i,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:l,rgb2keyword:s,rgb2xyz:u,rgb2lab:d,rgb2lch:c,hsl2rgb:h,hsl2hsv:f,hsl2hwb:p,hsl2cmyk:m,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:k,hsv2cmyk:w,hsv2keyword:M,hwb2rgb:S,hwb2hsl:C,hwb2hsv:D,hwb2cmyk:I,hwb2keyword:A,cmyk2rgb:P,cmyk2hsl:_,cmyk2hsv:T,cmyk2hwb:F,cmyk2keyword:R,keyword2rgb:q,keyword2hsl:j,keyword2hsv:Y,keyword2hwb:U,keyword2cmyk:X,keyword2lab:K,keyword2xyz:G,xyz2rgb:L,xyz2lab:V,xyz2lch:O,lab2xyz:z,lab2rgb:W,lab2lch:B,lch2lab:N,lch2xyz:E,lch2rgb:H};var J={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Z={};for(var Q in J)Z[JSON.stringify(J[Q])]=Q},{}],5:[function(t,e,n){var i=t(4),a=function(){return new u};for(var o in i){a[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var r=/(\w+)2(\w+)/.exec(o),l=r[1],s=r[2];a[l]=a[l]||{},a[l][s]=a[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var a=0;a=0&&a>0)&&(m+=a));return o=c.getPixelForValue(m),r=c.getPixelForValue(m+f),l=(r-o)/2,{size:l,base:o,head:r,center:r+l/2}},calculateBarIndexPixels:function(t,e,n){var i=this,a=n.scale,o=i.chart.isCombo,r=i.getStackIndex(t),l=a.getPixelForValue(null,e,t,o),s=n.barSize;return l-=o?n.tickSize/2:0,l+=n.fullBarSize*r,l+=n.categorySpacing/2,l+=n.barSpacing/2,{size:s,base:l,head:l+s,center:l+s/2}},draw:function(){var t,n=this,i=n.chart,a=n.getMeta().data,o=n.getDataset(),r=a.length,l=0;for(e.canvas.clipArea(i.ctx,i.chartArea);l0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var o=0;o'),a[o]&&e.push(a[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var n=t.data;return n.labels.length&&n.datasets.length?n.labels.map(function(i,a){var o=t.getDatasetMeta(0),r=n.datasets[0],l=o.data[a],s=l&&l.custom||{},u=e.getValueAtIndexOrDefault,d=t.options.elements.arc,c=s.backgroundColor?s.backgroundColor:u(r.backgroundColor,a,d.backgroundColor),h=s.borderColor?s.borderColor:u(r.borderColor,a,d.borderColor),f=s.borderWidth?s.borderWidth:u(r.borderWidth,a,d.borderWidth);return{text:i,fillStyle:c,strokeStyle:h,lineWidth:f,hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n=Math.PI?-1:g<-Math.PI?1:0);var p=g+f,m={x:Math.cos(g),y:Math.sin(g)},v={x:Math.cos(p),y:Math.sin(p)},b=g<=0&&0<=p||g<=2*Math.PI&&2*Math.PI<=p,x=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,y=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,k=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,w=h/100,M={x:y?-1:Math.min(m.x*(m.x<0?1:w),v.x*(v.x<0?1:w)),y:k?-1:Math.min(m.y*(m.y<0?1:w),v.y*(v.y<0?1:w))},S={x:b?1:Math.max(m.x*(m.x>0?1:w),v.x*(v.x>0?1:w)),y:x?1:Math.max(m.y*(m.y>0?1:w),v.y*(v.y>0?1:w))},C={width:.5*(S.x-M.x),height:.5*(S.y-M.y)};u=Math.min(l/C.width,s/C.height),d={x:(S.x+M.x)*-.5,y:(S.y+M.y)*-.5}}i.borderWidth=n.getMaxBorderWidth(c.data),i.outerRadius=Math.max((u-i.borderWidth)/2,0),i.innerRadius=Math.max(h?i.outerRadius/100*h:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=d.x*i.outerRadius,i.offsetY=d.y*i.outerRadius,c.total=n.calculateTotal(),n.outerRadius=i.outerRadius-i.radiusLength*n.getRingIndex(n.index),n.innerRadius=Math.max(n.outerRadius-i.radiusLength,0),e.each(c.data,function(e,i){n.updateElement(e,i,t)})},updateElement:function(t,n,i){var a=this,o=a.chart,r=o.chartArea,l=o.options,s=l.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=l.rotation,h=l.rotation,f=a.getDataset(),g=i&&s.animateRotate?0:t.hidden?0:a.calculateCircumference(f.data[n])*(l.circumference/(2*Math.PI)),p=i&&s.animateScale?0:a.innerRadius,m=i&&s.animateScale?0:a.outerRadius,v=e.getValueAtIndexOrDefault;e.extend(t,{_datasetIndex:a.index,_index:n,_model:{x:u+o.offsetX,y:d+o.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:m,innerRadius:p,label:v(f.label,n,o.data.labels[n])}});var b=t._model;this.removeHoverStyle(t),i&&s.animateRotate||(0===n?b.startAngle=l.rotation:b.startAngle=a.getMeta().data[n-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,n=this.getDataset(),i=this.getMeta(),a=0;return e.each(i.data,function(e,i){t=n.data[i],isNaN(t)||e.hidden||(a+=Math.abs(t))}),a},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,a=this.index,o=t.length,r=0;ri?e:i,i=n>i?n:i;return i}})}},{}],18:[function(t,e,n){"use strict";e.exports=function(t){function e(t,e){return n.getValueOrDefault(t.showLine,e.showLines)}var n=t.helpers;t.defaults.line={showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},t.controllers.line=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,update:function(t){var i,a,o,r=this,l=r.getMeta(),s=l.dataset,u=l.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(l.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(o=s.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),s._scale=h,s._datasetIndex=r.index,s._children=u,s._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:o.tension?o.tension:n.getValueOrDefault(f.lineTension,c.tension),backgroundColor:o.backgroundColor?o.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:f.borderWidth||c.borderWidth,borderColor:o.borderColor?o.borderColor:f.borderColor||c.borderColor,borderCapStyle:o.borderCapStyle?o.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:o.borderDash?o.borderDash:f.borderDash||c.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:o.fill?o.fill:void 0!==f.fill?f.fill:c.fill,steppedLine:o.steppedLine?o.steppedLine:n.getValueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:o.cubicInterpolationMode?o.cubicInterpolationMode:n.getValueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode)},s.pivot()),i=0,a=u.length;i');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var o=0;o'),a[o]&&e.push(a[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var n=t.data;return n.labels.length&&n.datasets.length?n.labels.map(function(i,a){var o=t.getDatasetMeta(0),r=n.datasets[0],l=o.data[a],s=l.custom||{},u=e.getValueAtIndexOrDefault,d=t.options.elements.arc,c=s.backgroundColor?s.backgroundColor:u(r.backgroundColor,a,d.backgroundColor),h=s.borderColor?s.borderColor:u(r.borderColor,a,d.borderColor),f=s.borderWidth?s.borderWidth:u(r.borderWidth,a,d.borderWidth);return{text:i,fillStyle:c,strokeStyle:h,lineWidth:f,hidden:isNaN(r.data[a])||o.data[a].hidden,index:a}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{}],20:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.radar={aspectRatio:1,scale:{type:"radialLinear"},elements:{line:{tension:0}}},t.controllers.radar=t.DatasetController.extend({datasetElementType:t.elements.Line,dataElementType:t.elements.Point,linkScales:e.noop,update:function(t){var n=this,i=n.getMeta(),a=i.dataset,o=i.data,r=a.custom||{},l=n.getDataset(),s=n.chart.options.elements.line,u=n.chart.scale;void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),e.extend(i.dataset,{_datasetIndex:n.index,_scale:u,_children:o,_loop:!0,_model:{tension:r.tension?r.tension:e.getValueOrDefault(l.lineTension,s.tension),backgroundColor:r.backgroundColor?r.backgroundColor:l.backgroundColor||s.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:l.borderWidth||s.borderWidth,borderColor:r.borderColor?r.borderColor:l.borderColor||s.borderColor,fill:r.fill?r.fill:void 0!==l.fill?l.fill:s.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:l.borderCapStyle||s.borderCapStyle,borderDash:r.borderDash?r.borderDash:l.borderDash||s.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:l.borderDashOffset||s.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:l.borderJoinStyle||s.borderJoinStyle}}),i.dataset.pivot(),e.each(o,function(e,i){n.updateElement(e,i,t)},n),n.updateBezierControlPoints()},updateElement:function(t,n,i){var a=this,o=t.custom||{},r=a.getDataset(),l=a.chart.scale,s=a.chart.options.elements.point,u=l.getPointPositionForValue(n,r.data[n]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),e.extend(t,{_datasetIndex:a.index,_index:n,_scale:l,_model:{x:i?l.xCenter:u.x,y:i?l.yCenter:u.y,tension:o.tension?o.tension:e.getValueOrDefault(r.lineTension,a.chart.options.elements.line.tension),radius:o.radius?o.radius:e.getValueAtIndexOrDefault(r.pointRadius,n,s.radius),backgroundColor:o.backgroundColor?o.backgroundColor:e.getValueAtIndexOrDefault(r.pointBackgroundColor,n,s.backgroundColor),borderColor:o.borderColor?o.borderColor:e.getValueAtIndexOrDefault(r.pointBorderColor,n,s.borderColor),borderWidth:o.borderWidth?o.borderWidth:e.getValueAtIndexOrDefault(r.pointBorderWidth,n,s.borderWidth),pointStyle:o.pointStyle?o.pointStyle:e.getValueAtIndexOrDefault(r.pointStyle,n,s.pointStyle),hitRadius:o.hitRadius?o.hitRadius:e.getValueAtIndexOrDefault(r.pointHitRadius,n,s.hitRadius)}}),t._model.skip=o.skip?o.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,n=this.getMeta();e.each(n.data,function(i,a){var o=i._model,r=e.splineCurve(e.previousItem(n.data,a,!0)._model,o,e.nextItem(n.data,a,!0)._model,o.tension);o.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),o.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),o.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),o.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var n=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},a=t._index,o=t._model;o.radius=i.hoverRadius?i.hoverRadius:e.getValueAtIndexOrDefault(n.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),o.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:e.getValueAtIndexOrDefault(n.pointHoverBackgroundColor,a,e.getHoverColor(o.backgroundColor)),o.borderColor=i.hoverBorderColor?i.hoverBorderColor:e.getValueAtIndexOrDefault(n.pointHoverBorderColor,a,e.getHoverColor(o.borderColor)),o.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:e.getValueAtIndexOrDefault(n.pointHoverBorderWidth,a,o.borderWidth)},removeHoverStyle:function(t){var n=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},a=t._index,o=t._model,r=this.chart.options.elements.point;o.radius=i.radius?i.radius:e.getValueAtIndexOrDefault(n.pointRadius,a,r.radius),o.backgroundColor=i.backgroundColor?i.backgroundColor:e.getValueAtIndexOrDefault(n.pointBackgroundColor,a,r.backgroundColor),o.borderColor=i.borderColor?i.borderColor:e.getValueAtIndexOrDefault(n.pointBorderColor,a,r.borderColor),o.borderWidth=i.borderWidth?i.borderWidth:e.getValueAtIndexOrDefault(n.pointBorderWidth,a,r.borderWidth)}})}},{}],21:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var a,o,r=this.animations;for(e.chart=t,i||(t.animating=!0),a=0,o=r.length;a1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var n,i,a=this.animations,o=0;o=n.numSteps?(e.callback(n.onAnimationComplete,[n],i),i.animating=!1,a.splice(o,1)):++o}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{}],22:[function(t,e,n){"use strict";e.exports=function(t){var e=t.canvasHelpers={};e.drawPoint=function(e,n,i,a,o){var r,l,s,u,d,c;if("object"==typeof n&&(r=n.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return void e.drawImage(n,a-n.width/2,o-n.height/2,n.width,n.height);if(!(isNaN(i)||i<=0)){switch(n){default:e.beginPath(),e.arc(a,o,i,0,2*Math.PI),e.closePath(),e.fill();break;case"triangle":e.beginPath(),l=3*i/Math.sqrt(3),d=l*Math.sqrt(3)/2,e.moveTo(a-l/2,o+d/3),e.lineTo(a+l/2,o+d/3),e.lineTo(a,o-2*d/3),e.closePath(),e.fill();break;case"rect":c=1/Math.SQRT2*i,e.beginPath(),e.fillRect(a-c,o-c,2*c,2*c),e.strokeRect(a-c,o-c,2*c,2*c);break;case"rectRounded":var h=i/Math.SQRT2,f=a-h,g=o-h,p=Math.SQRT2*i;t.helpers.drawRoundedRectangle(e,f,g,p,p,i/2),e.fill();break;case"rectRot":c=1/Math.SQRT2*i,e.beginPath(),e.moveTo(a-c,o),e.lineTo(a,o+c),e.lineTo(a+c,o),e.lineTo(a,o-c),e.closePath(),e.fill();break;case"cross":e.beginPath(),e.moveTo(a,o+i),e.lineTo(a,o-i),e.moveTo(a-i,o),e.lineTo(a+i,o),e.closePath();break;case"crossRot":e.beginPath(),s=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,e.moveTo(a-s,o-u),e.lineTo(a+s,o+u),e.moveTo(a-s,o+u),e.lineTo(a+s,o-u),e.closePath();break;case"star":e.beginPath(),e.moveTo(a,o+i),e.lineTo(a,o-i),e.moveTo(a-i,o),e.lineTo(a+i,o),s=Math.cos(Math.PI/4)*i,u=Math.sin(Math.PI/4)*i,e.moveTo(a-s,o-u),e.lineTo(a+s,o+u),e.moveTo(a-s,o+u),e.lineTo(a+s,o-u),e.closePath();break;case"line":e.beginPath(),e.moveTo(a-i,o),e.lineTo(a+i,o),e.closePath();break;case"dash":e.beginPath(),e.moveTo(a,o),e.lineTo(a+i,o),e.closePath()}e.stroke()}},e.clipArea=function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},e.unclipArea=function(t){t.restore()},e.lineTo=function(t,e,n,i){return n.steppedLine?("after"===n.steppedLine?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y)):n.tension?void t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):void t.lineTo(n.x,n.y)},t.helpers.canvas=e}},{}],23:[function(t,e,n){"use strict";e.exports=function(t){function e(e){e=e||{};var n=e.data=e.data||{};return n.datasets=n.datasets||[],n.labels=n.labels||[],e.options=a.configMerge(t.defaults.global,t.defaults[e.type],e.options||{}),e}function n(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}function i(t){return"top"===t||"bottom"===t}var a=t.helpers,o=t.plugins,r=t.platform;t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(n,i){var o=this;i=e(i);var l=r.acquireContext(n,i),s=l&&l.canvas,u=s&&s.height,d=s&&s.width;return o.id=a.uid(),o.ctx=l,o.canvas=s,o.config=i,o.width=d,o.height=u,o.aspectRatio=u?d/u:null,o.options=i.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),l&&s?(o.initialize(),void o.update()):void console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return o.notify(t,"beforeInit"),a.retinaScale(t),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),o.notify(t,"afterInit"),t},clear:function(){return a.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,l=Math.floor(a.getMaximumWidth(i)),s=Math.floor(r?l/r:a.getMaximumHeight(i));if((e.width!==l||e.height!==s)&&(i.width=e.width=l,i.height=e.height=s,i.style.width=l+"px",i.style.height=s+"px",a.retinaScale(e),!t)){var u={width:l,height:s};o.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,n=e.options,o=e.scales={},r=[];n.scales&&(r=r.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&r.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(r,function(n){var r=n.options,l=a.getValueOrDefault(r.type,n.dtype),s=t.scaleService.getScaleConstructor(l);if(s){i(r.position)!==i(n.dposition)&&(r.position=n.dposition);var u=new s({id:r.id,options:r,ctx:e.ctx,chart:e});o[u.id]=u,n.isDefault&&(e.scale=u)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];if(a.each(e.data.datasets,function(a,o){var r=e.getDatasetMeta(o);if(r.type||(r.type=a.type||e.config.type),n.push(r.type),r.controller)r.controller.updateIndex(o);else{var l=t.controllers[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(e,o),i.push(r.controller)}},e),n.length>1)for(var o=1;o=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);o.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};o.notify(n,"beforeDatasetDraw",[a])!==!1&&(i.controller.draw(e),o.notify(n,"afterDatasetDraw",[a]))},getElementAtEvent:function(e){return t.Interaction.modes.single(this,e)},getElementsAtEvent:function(e){return t.Interaction.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return t.Interaction.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,n,i){var a=t.Interaction.modes[n];return"function"==typeof a?a(this,e,i):[]},getDatasetAtEvent:function(e){return t.Interaction.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(a.forEach(function(e){delete t[e]}),delete t._chartjs)}}var i=t.helpers,a=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=n.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],o=i.data;for(t=0,e=a.length;ti&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;n=0;a--)e.call(n,t[a],a);else for(a=0;a=i[n].length||!i[n][a].type?i[n].push(o.configMerge(l,e)):e.type&&e.type!==i[n][a].type?i[n][a]=o.configMerge(i[n][a],l,e):i[n][a]=o.configMerge(i[n][a],e)}):(i[n]=[],o.each(e,function(e){var a=o.getValueOrDefault(e.type,"xAxes"===n?"category":"linear");i[n].push(o.configMerge(t.scaleService.getScaleDefaults(a),e))})):i.hasOwnProperty(n)&&"object"==typeof i[n]&&null!==i[n]&&"object"==typeof e?i[n]=o.configMerge(i[n],e):i[n]=e}),i},o.getValueAtIndexOrDefault=function(t,e,n){return void 0===t||null===t?n:o.isArray(t)?e=0;i--){var a=t[i];if(e(a))return a}},o.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=o.inherits,t&&o.extend(n.prototype,t),n.__super__=e.prototype,n},o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return Math.abs(t-e)t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return t=+t,0===t||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2===0?0:.5},o.splineCurve=function(t,e,n,i){var a=t.skip?e:t,o=e,r=n.skip?e:n,l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),s=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=l/(l+s),d=s/(l+s);u=isNaN(u)?0:u,d=isNaN(d)?0:d;var c=i*u,h=i*d;return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,n,i,a,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),l=r.length;for(e=0;e0?r[e-1]:null,a=e0?r[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var n,i=Math.floor(o.log10(t)),a=t/Math.pow(10,i);return n=e?a<1.5?1:a<3?2:a<7?5:10:a<=1?1:a<=2?2:a<=5?5:10,n*Math.pow(10,i)};var r=o.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===(t/=1)?1:(n||(n=.3),i0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=l.right-l.left-u-c,g=l.bottom-l.top-d-h;return n=Math.round((n-l.left-u)/f*r.width/e.currentDevicePixelRatio),i=Math.round((i-l.top-d)/g*r.height/e.currentDevicePixelRatio),{x:n,y:i}},o.addEvent=function(t,e,n){t.addEventListener?t.addEventListener(e,n):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},o.removeEvent=function(t,e,n){t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=o.noop},o.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode,n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-n-i,r=o.getConstraintWidth(t);return isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var e=t.parentNode,n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-n-i,r=o.getConstraintHeight(t);return isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t){var e=t.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==e){var n=t.canvas,i=t.height,a=t.width;n.height=i*e,n.width=a*e,t.ctx.scale(e,e),n.style.height=i+"px",n.style.width=a+"px"}},o.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},o.fontString=function(t,e,n){return e+" "+t+"px "+n},o.longestText=function(t,e,n,i){i=i||{};var a=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var l=0;o.each(n,function(e){void 0!==e&&null!==e&&o.isArray(e)!==!0?l=o.measureText(t,a,r,l,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(l=o.measureText(t,a,r,l,e))})});var s=r.length/2;if(s>n.length){for(var u=0;ui&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.drawRoundedRectangle=function(t,e,n,i,a,o){t.beginPath(),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+o),t.lineTo(e+i,n+a-o),t.quadraticCurveTo(e+i,n+a,e+i-o,n+a),t.lineTo(e+o,n+a),t.quadraticCurveTo(e,n+a,e,n+a-o),t.lineTo(e,n+o),t.quadraticCurveTo(e,n,e+o,n),t.closePath()},o.color=i?function(e){return e instanceof CanvasGradient&&(e=t.defaults.global.defaultColor),i(e)}:function(t){return console.error("Color.js not found!"),t},o.isArray=Array.isArray?function(t){return Array.isArray(t)}:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.arrayEquals=function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n0&&(l=t.getDatasetMeta(l[0]._datasetIndex).data),l},"x-axis":function(t,e){return o(t,e,!0)},point:function(t,n){var a=e(n,t);return i(t,a)},nearest:function(t,n,i){var o=e(n,t),r=a(t,o,i.intersect);return r.length>1&&r.sort(function(t,e){var n=t.getArea(),i=e.getArea(),a=n-i;return 0===a&&(a=t._datasetIndex-e._datasetIndex),a}),r.slice(0,1)},x:function(t,i,a){var o=e(i,t),r=[],l=!1;return n(t,function(t){t.inXRange(o.x)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),a.intersect&&!l&&(r=[]),r},y:function(t,i,a){var o=e(i,t),r=[],l=!1;return n(t,function(t){t.inYRange(o.y)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),a.intersect&&!l&&(r=[]),r}}}}},{}],28:[function(t,e,n){"use strict";e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},legendCallback:function(t){var e=[];e.push('
    ');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push("
"),e.join("")}}},t.Chart=t,t}},{}],29:[function(t,e,n){"use strict";e.exports=function(t){function e(t,e){return i.where(t,function(t){return t.position===e})}function n(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}var i=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],o=a.length,r=0;rc&&rt.maxHeight){r--;break}r++,d=l*u}t.labelRotation=r},afterCalculateTickRotation:function(){i.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){i.callback(this.options.beforeFit,[this])},fit:function(){var t=this,a=t.minSize={width:0,height:0},o=t.options,r=o.ticks,l=o.scaleLabel,s=o.gridLines,u=o.display,d=t.isHorizontal(),c=n(r),h=1.5*n(l).size,f=o.gridLines.tickMarkLength;if(d?a.width=t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:a.width=u&&s.drawTicks?f:0,d?a.height=u&&s.drawTicks?f:0:a.height=t.maxHeight,l.display&&u&&(d?a.height+=h:a.width+=h),r.display&&u){var g=i.longestText(t.ctx,c.font,t.ticks,t.longestTextCache),p=i.numberOfLabelLines(t.ticks),m=.5*c.size;if(d){t.longestLabelWidth=g;var v=i.toRadians(t.labelRotation),b=Math.cos(v),x=Math.sin(v),y=x*g+c.size*p+m*p;a.height=Math.min(t.maxHeight,a.height+y),t.ctx.font=c.font;var k=t.ticks[0],w=e(t.ctx,k,c.font),M=t.ticks[t.ticks.length-1],S=e(t.ctx,M,c.font);0!==t.labelRotation?(t.paddingLeft="bottom"===o.position?b*w+3:b*m+3,t.paddingRight="bottom"===o.position?b*m+3:b*S+3):(t.paddingLeft=w/2+3,t.paddingRight=S/2+3)}else r.mirror?g=0:g+=t.options.ticks.padding,a.width=Math.min(t.maxWidth,a.width+g),t.paddingTop=c.size/2,t.paddingBottom=c.size/2}t.handleMargins(),t.width=a.width,t.height=a.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){i.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){return null===t||"undefined"==typeof t?NaN:"number"!=typeof t||isFinite(t)?"object"==typeof t?t instanceof Date||t.isValid?t:this.getRightValue(this.isHorizontal()?t.x:t.y):t:NaN},getLabelForIndex:i.noop,getPixelForValue:i.noop,getValueForPixel:i.noop,getPixelForTick:function(t,e){var n=this;if(n.isHorizontal()){var i=n.width-(n.paddingLeft+n.paddingRight),a=i/Math.max(n.ticks.length-(n.options.gridLines.offsetGridLines?0:1),1),o=a*t+n.paddingLeft;e&&(o+=a/2);var r=n.left+Math.round(o);return r+=n.isFullWidth()?n.margins.left:0}var l=n.height-(n.paddingTop+n.paddingBottom);return n.top+t*(l/(n.ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=e.width-(e.paddingLeft+e.paddingRight),i=n*t+e.paddingLeft,a=e.left+Math.round(i);return a+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},draw:function(e){var a=this,o=a.options;if(o.display){var r,l,s=a.ctx,u=t.defaults.global,d=o.ticks,c=o.gridLines,h=o.scaleLabel,f=0!==a.labelRotation,g=d.autoSkip,p=a.isHorizontal();d.maxTicksLimit&&(l=d.maxTicksLimit);var m=i.getValueOrDefault(d.fontColor,u.defaultFontColor),v=n(d),b=c.drawTicks?c.tickMarkLength:0,x=i.getValueOrDefault(h.fontColor,u.defaultFontColor),y=n(h),k=i.toRadians(a.labelRotation),w=Math.cos(k),M=a.longestLabelWidth*w;s.fillStyle=m;var S=[];if(p){if(r=!1,(M+d.autoSkipPadding)*a.ticks.length>a.width-(a.paddingLeft+a.paddingRight)&&(r=1+Math.floor((M+d.autoSkipPadding)*a.ticks.length/(a.width-(a.paddingLeft+a.paddingRight)))),l&&a.ticks.length>l)for(;!r||a.ticks.length/(r||1)>l;)r||(r=1),r+=1;g||(r=!1)}var C="right"===o.position?a.left:a.right-b,D="right"===o.position?a.left+b:a.right,I="bottom"===o.position?a.top:a.bottom-b,A="bottom"===o.position?a.top+b:a.bottom;if(i.each(a.ticks,function(t,n){if(void 0!==t&&null!==t){var l=a.ticks.length===n+1,s=r>1&&n%r>0||n%r===0&&n+r>=a.ticks.length;if((!s||l)&&void 0!==t&&null!==t){var h,g,m,v;n===("undefined"!=typeof a.zeroLineIndex?a.zeroLineIndex:0)?(h=c.zeroLineWidth,g=c.zeroLineColor,m=c.zeroLineBorderDash,v=c.zeroLineBorderDashOffset):(h=i.getValueAtIndexOrDefault(c.lineWidth,n),g=i.getValueAtIndexOrDefault(c.color,n),m=i.getValueOrDefault(c.borderDash,u.borderDash),v=i.getValueOrDefault(c.borderDashOffset,u.borderDashOffset));var x,y,w,M,P,_,T,F,R,L,V="middle",O="middle";if(p){"bottom"===o.position?(O=f?"middle":"top",V=f?"right":"center",L=a.top+b):(O=f?"middle":"bottom",V=f?"left":"center",L=a.bottom-b);var z=a.getPixelForTick(n)+i.aliasPixel(h);R=a.getPixelForTick(n,c.offsetGridLines)+d.labelOffset,x=w=P=T=z,y=I,M=A,_=e.top,F=e.bottom}else{var B,W="left"===o.position,N=d.padding;d.mirror?(V=W?"left":"right",B=N):(V=W?"right":"left", B=b+N),R=W?a.right-B:a.left+B;var E=a.getPixelForTick(n);E+=i.aliasPixel(h),L=a.getPixelForTick(n,c.offsetGridLines),x=C,w=D,P=e.left,T=e.right,y=M=_=F=E}S.push({tx1:x,ty1:y,tx2:w,ty2:M,x1:P,y1:_,x2:T,y2:F,labelX:R,labelY:L,glWidth:h,glColor:g,glBorderDash:m,glBorderDashOffset:v,rotation:-1*k,label:t,textBaseline:O,textAlign:V})}}}),i.each(S,function(t){if(c.display&&(s.save(),s.lineWidth=t.glWidth,s.strokeStyle=t.glColor,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),c.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),c.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),d.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=v.font,s.textBaseline=t.textBaseline,s.textAlign=t.textAlign;var e=t.label;if(i.isArray(e))for(var n=0,a=0;n0)i=t.stepSize;else{var o=e.niceNum(n.max-n.min,!1);i=e.niceNum(o/(t.maxTicks-1),!0)}var r=Math.floor(n.min/i)*i,l=Math.ceil(n.max/i)*i;t.min&&t.max&&t.stepSize&&e.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(r=t.min,l=t.max);var s=(l-r)/i;s=e.almostEquals(s,Math.round(s),i/1e3)?Math.round(s):Math.ceil(s),a.push(void 0!==t.min?t.min:r);for(var u=1;u3?i[2]-i[1]:i[1]-i[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=e.log10(Math.abs(a)),r="";if(0!==t){var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,n,i){var a=t/Math.pow(10,Math.floor(e.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===n||n===i.length-1?t.toExponential():""}}}}},{}],34:[function(t,e,n){"use strict";e.exports=function(t){function e(t,e){var n=s.color(t);return n.alpha(e*n.alpha()).rgbaString()}function n(t,e){return e&&(s.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function i(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,a=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(i,a):"",yLabel:n?n.getLabelForIndex(i,a):"",index:i,datasetIndex:a,x:t._model.x,y:t._model.y}}function a(e){var n=t.defaults.global,i=s.getValueOrDefault;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:i(e.bodyFontFamily,n.defaultFontFamily),_bodyFontStyle:i(e.bodyFontStyle,n.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:i(e.bodyFontSize,n.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:i(e.titleFontFamily,n.defaultFontFamily),_titleFontStyle:i(e.titleFontStyle,n.defaultFontStyle),titleFontSize:i(e.titleFontSize,n.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:i(e.footerFontFamily,n.defaultFontFamily),_footerFontStyle:i(e.footerFontStyle,n.defaultFontStyle),footerFontSize:i(e.footerFontSize,n.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function o(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,o=e.body,r=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);r+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;i+=l*d,i+=l?(l-1)*e.titleSpacing:0,i+=l?e.titleMarginBottom:0,i+=r*c,i+=r?(r-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*h,i+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){a=Math.max(a,n.measureText(t).width+f)};return n.font=s.fontString(d,e._titleFontStyle,e._titleFontFamily),s.each(e.title,g),n.font=s.fontString(c,e._bodyFontStyle,e._bodyFontFamily),s.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,s.each(o,function(t){s.each(t.before,g),s.each(t.lines,g),s.each(t.after,g)}),f=0,n.font=s.fontString(h,e._footerFontStyle,e._footerFontFamily),s.each(e.footer,g),a+=2*e.xPadding,{width:a,height:i}}function r(t,e){var n=t._model,i=t._chart,a=t._chart.chartArea,o="center",r="center";n.yi.height-e.height&&(r="bottom");var l,s,u,d,c,h=(a.left+a.right)/2,f=(a.top+a.bottom)/2;"center"===r?(l=function(t){return t<=h},s=function(t){return t>h}):(l=function(t){return t<=e.width/2},s=function(t){return t>=i.width-e.width/2}),u=function(t){return t+e.width>i.width},d=function(t){return t-e.width<0},c=function(t){return t<=f?"top":"bottom"},l(n.x)?(o="left",u(n.x)&&(o="center",r=c(n.y))):s(n.x)&&(o="right",d(n.x)&&(o="center",r=c(n.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:r}}function l(t,e,n){var i=t.x,a=t.y,o=t.caretSize,r=t.caretPadding,l=t.cornerRadius,s=n.xAlign,u=n.yAlign,d=o+r,c=l+r;return"right"===s?i-=e.width:"center"===s&&(i-=e.width/2),"top"===u?a+=d:a-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===s?i+=d:"right"===s&&(i-=d):"left"===s?i-=c:"right"===s&&(i+=c),{x:i,y:a}}var s=t.helpers;t.defaults.global.tooltips={enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:s.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?n=o.xLabel:a>0&&o.index0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,a),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,a),this.drawBody(i,e,t,a),this.drawFooter(i,e,t,a))}},handleEvent:function(t){var e=this,n=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),i=!s.arrayEquals(e._active,e._lastActive),!i)return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var a=e._model;e.update(!0),e.pivot(),i|=a.x!==e._model.x||a.y!==e._model.y}return i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,o=0;for(e=0,n=t.length;es;)o-=2*Math.PI;for(;o=l&&o<=s,d=r>=i.innerRadius&&r<=i.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],36:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n=t.defaults.global;t.defaults.global.elements.line={tension:.4,backgroundColor:n.defaultColor,borderWidth:3,borderColor:n.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0},t.elements.Line=t.Element.extend({draw:function(){var t,i,a,o,r=this,l=r._view,s=r._chart.ctx,u=l.spanGaps,d=r._children.slice(),c=n.elements.line,h=-1;for(r._loop&&d.length&&d.push(d[0]),s.save(),s.lineCap=l.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(l.borderDash||c.borderDash),s.lineDashOffset=l.borderDashOffset||c.borderDashOffset,s.lineJoin=l.borderJoinStyle||c.borderJoinStyle,s.lineWidth=l.borderWidth||c.borderWidth,s.strokeStyle=l.borderColor||n.defaultColor,s.beginPath(),h=-1,t=0;te?1:-1,r=1,l=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,i=u.y,a=u.base,o=1,r=a>i?1:-1,l=u.borderSkipped||"bottom"),d){var c=Math.min(Math.abs(e-n),Math.abs(i-a));d=d>c?c:d;var h=d/2,f=e+("left"!==l?h*o:0),g=n+("right"!==l?-h*o:0),p=i+("top"!==l?h*r:0),m=a+("bottom"!==l?-h*r:0);f!==g&&(i=p,a=m),p!==m&&(e=f,n=g)}s.beginPath(),s.fillStyle=u.backgroundColor,s.strokeStyle=u.borderColor,s.lineWidth=d;var v=[[e,a],[e,i],[n,i],[n,a]],b=["bottom","left","top","right"],x=b.indexOf(l,0);x===-1&&(x=0);var y=t(0);s.moveTo(y[0],y[1]);for(var k=1;k<4;k++)y=t(k),s.lineTo(y[0],y[1]);s.fill(),d&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var a=n(this);i=t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom}return i},inLabelRange:function(t,i){var a=this;if(!a._view)return!1;var o=!1,r=n(a);return o=e(a)?t>=r.left&&t<=r.right:i>=r.top&&i<=r.bottom},inXRange:function(t){var e=n(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=n(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,n,i=this._view;return e(this)?(t=i.x,n=(i.y+i.base)/2):(t=(i.x+i.base)/2,n=i.y),{x:t,y:n}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],39:[function(t,e,n){"use strict";e.exports=function(t){function e(t,e){var n=s.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function n(t,n){var i=t.style,a=t.getAttribute("height"),o=t.getAttribute("width");if(t._chartjs={initial:{height:a,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===o||""===o){var r=e(t,"width");void 0!==r&&(t.width=r)}if(null===a||""===a)if(""===t.style.height)t.height=t.width/(n.options.aspectRatio||2);else{var l=e(t,"height");void 0!==r&&(t.height=l)}return t}function i(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function a(t,e){var n=u[t.type]||t.type,a=s.getRelativePosition(t,e);return i(n,e,a.x,a.y,t)}function o(t){var e=document.createElement("iframe");return e.className="chartjs-hidden-iframe",e.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;",e.tabIndex=-1,s.addEvent(e,"load",function(){s.addEvent(e.contentWindow||e,"resize",t),t()}),e}function r(t,e,n){var a=t._chartjs={ticking:!1},r=function(){a.ticking||(a.ticking=!0,s.requestAnimFrame.call(window,function(){if(a.resizer)return a.ticking=!1,e(i("resize",n))}))};a.resizer=o(r),t.insertBefore(a.resizer,t.firstChild)}function l(t){if(t&&t._chartjs){var e=t._chartjs.resizer;e&&(e.parentNode.removeChild(e),t._chartjs.resizer=null),delete t._chartjs}}var s=t.helpers,u={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};return{acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(n(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e._chartjs){var n=e._chartjs.initial;["height","width"].forEach(function(t){var i=n[t];void 0===i||null===i?e.removeAttribute(t):e.setAttribute(t,i)}),s.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e._chartjs}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"===e)return void r(i.parentNode,n,t);var o=n._chartjs||(n._chartjs={}),l=o.proxies||(o.proxies={}),u=l[t.id+"_"+e]=function(e){n(a(e,t))};s.addEvent(i,e,u)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"===e)return void l(i.parentNode,n);var a=n._chartjs||{},o=a.proxies||{},r=o[t.id+"_"+e];r&&s.removeEvent(i,e,r)}}}},{}],40:[function(t,e,n){"use strict";var i=t(39);e.exports=function(t){t.platform={acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},t.helpers.extend(t.platform,i(t))}},{39:39}],41:[function(t,e,n){"use strict";e.exports=function(t){function e(t,e,n){var i,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),o===!1||null===o)return!1;if(o===!0)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function n(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return e=i.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function i(t,e,n){var i,a=t[e],o=a.fill,r=[e];if(!n)return o;for(;o!==!1&&r.indexOf(o)===-1;){if(!isFinite(o))return o;if(i=t[o],!i)return!1;if(i.visible)return o;r.push(o),o=i.fill}return!1}function a(t){var e=t.fill,n="dataset";return e===!1?null:(isFinite(e)||(n="boundary"),d[n](t))}function o(t){return t&&!t.skip}function r(t,e,n,i,a){var o;if(i&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o0;--o)u.canvas.lineTo(t,n[o],n[o-1],!0)}}function l(t,e,n,i,a,l){var s,u,d,c,h,f,g,p=e.length,m=i.spanGaps,v=[],b=[],x=0,y=0;for(t.beginPath(),s=0,u=p+!!l;s=n.width&&(b+=d+o.padding,v[v.length]=n.left),g[i]={left:0,top:0,width:r,height:d},v[v.length-1]+=r+o.padding}),p.height+=b}else{var x=o.padding,y=n.columnWidths=[],k=o.padding,w=0,M=0,S=d+x;i.each(n.legendItems,function(t,n){var i=e(o,d),a=i+d/2+l.measureText(t.text).width;M+S>p.height&&(k+=w+o.padding,y.push(w),w=0,M=0),w=Math.max(w,a),M+=S,g[n]={left:0,top:0,width:a,height:d}}),k+=w,y.push(w),p.width+=k}n.width=p.width,n.height=p.height},afterFit:o,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var n=this,a=n.options,o=a.labels,r=t.defaults.global,l=r.elements.line,s=n.width,u=n.lineWidths;if(a.display){var d,c=n.ctx,h=i.getValueOrDefault,f=h(o.fontColor,r.defaultFontColor),g=h(o.fontSize,r.defaultFontSize),p=h(o.fontStyle,r.defaultFontStyle),m=h(o.fontFamily,r.defaultFontFamily),v=i.fontString(g,p,m);c.textAlign="left",c.textBaseline="top",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=v;var b=e(o,g),x=n.legendHitBoxes,y=function(e,n,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,r.defaultColor),c.lineCap=h(i.lineCap,l.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,l.borderDashOffset),c.lineJoin=h(i.lineJoin,l.borderJoinStyle),c.lineWidth=h(i.lineWidth,l.borderWidth),c.strokeStyle=h(i.strokeStyle,r.defaultColor);var o=0===h(i.lineWidth,l.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,l.borderDash)),a.labels&&a.labels.usePointStyle){var s=g*Math.SQRT2/2,u=s/Math.SQRT2,d=e+u,f=n+u;t.canvasHelpers.drawPoint(c,i.pointStyle,s,d,f)}else o||c.strokeRect(e,n,b,g),c.fillRect(e,n,b,g);c.restore()}},k=function(t,e,n,i){c.fillText(n.text,b+g/2+t,e),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(b+g/2+t,e+g/2),c.lineTo(b+g/2+t+i,e+g/2),c.stroke())},w=n.isHorizontal();d=w?{x:n.left+(s-u[0])/2,y:n.top+o.padding,line:0}:{x:n.left+o.padding,y:n.top+o.padding,line:0};var M=g+o.padding;i.each(n.legendItems,function(t,e){var i=c.measureText(t.text).width,a=b+g/2+i,r=d.x,l=d.y;w?r+a>=s&&(l=d.y+=M,d.line++,r=d.x=n.left+(s-u[d.line])/2):l+M>n.bottom&&(r=d.x=r+n.columnWidths[d.line]+o.padding,l=d.y=n.top+o.padding,d.line++),y(r,l,t),x[e].left=r,x[e].top=l,k(r,l,t,i),w?d.x+=a+o.padding:d.y+=M})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var l=e.legendHitBoxes,s=0;s=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[s]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[s]),a=!0;break}}}return a}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(e){var o=e.options.legend,r=e.legend;o?(o=i.configMerge(t.defaults.global.legend,o),r?(a.configure(e,r,o),r.options=o):n(e,o)):r&&(a.removeBox(e,r),delete e.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{}],43:[function(t,e,n){"use strict";e.exports=function(t){function e(e,n){var a=new t.Title({ctx:e.ctx,options:n,chart:e});i.configure(e,a,n),i.addBox(e,a),e.titleBlock=a}var n=t.helpers,i=t.layoutService,a=n.noop;return t.defaults.global.title={display:!1,position:"top",fullWidth:!0,weight:2e3,fontStyle:"bold",padding:10,text:""},t.Title=t.Element.extend({initialize:function(t){var e=this;n.extend(e,t),e.legendHitBoxes=[]; },beforeUpdate:a,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:a,beforeSetDimensions:a,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:a,beforeBuildLabels:a,buildLabels:a,afterBuildLabels:a,beforeFit:a,fit:function(){var e=this,i=n.getValueOrDefault,a=e.options,o=t.defaults.global,r=a.display,l=i(a.fontSize,o.defaultFontSize),s=e.minSize;e.isHorizontal()?(s.width=e.maxWidth,s.height=r?l+2*a.padding:0):(s.width=r?l+2*a.padding:0,s.height=e.maxHeight),e.width=s.width,e.height=s.height},afterFit:a,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var e=this,i=e.ctx,a=n.getValueOrDefault,o=e.options,r=t.defaults.global;if(o.display){var l,s,u,d=a(o.fontSize,r.defaultFontSize),c=a(o.fontStyle,r.defaultFontStyle),h=a(o.fontFamily,r.defaultFontFamily),f=n.fontString(d,c,h),g=0,p=e.top,m=e.left,v=e.bottom,b=e.right;i.fillStyle=a(o.fontColor,r.defaultFontColor),i.font=f,e.isHorizontal()?(l=m+(b-m)/2,s=p+(v-p)/2,u=b-m):(l="left"===o.position?m+d/2:b-d/2,s=p+(v-p)/2,u=v-p,g=Math.PI*("left"===o.position?-.5:.5)),i.save(),i.translate(l,s),i.rotate(g),i.textAlign="center",i.textBaseline="middle",i.fillText(o.text,0,0,u),i.restore()}}}),{id:"title",beforeInit:function(t){var n=t.options.title;n&&e(t,n)},beforeUpdate:function(a){var o=a.options.title,r=a.titleBlock;o?(o=n.configMerge(t.defaults.global.title,o),r?(i.configure(a,r,o),r.options=o):e(a,o)):r&&(t.layoutService.removeBox(a,r),delete a.titleBlock)}}}},{}],44:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n={position:"bottom"},i=t.Scale.extend({getLabels:function(){var t=this.chart.data;return(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,n=t.getLabels();t.minIndex=0,t.maxIndex=n.length-1;var i;void 0!==t.options.ticks.min&&(i=e.indexOf(n,t.options.ticks.min),t.minIndex=i!==-1?i:t.minIndex),void 0!==t.options.ticks.max&&(i=e.indexOf(n,t.options.ticks.max),t.maxIndex=i!==-1?i:t.maxIndex),t.min=n[t.minIndex],t.max=n[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart.data,a=n.isHorizontal();return i.yLabels&&!a?n.getRightValue(i.datasets[e].data[t]):n.ticks[t-n.minIndex]},getPixelForValue:function(t,e,n,i){var a,o=this,r=Math.max(o.maxIndex+1-o.minIndex-(o.options.gridLines.offsetGridLines?0:1),1);if(void 0!==t&&null!==t&&(a=o.isHorizontal()?t.x:t.y),void 0!==a||void 0!==t&&isNaN(e)){var l=o.getLabels();t=a||t;var s=l.indexOf(t);e=s!==-1?s:e}if(o.isHorizontal()){var u=o.width/r,d=u*(e-o.minIndex);return(o.options.gridLines.offsetGridLines&&i||o.maxIndex===o.minIndex&&i)&&(d+=u/2),o.left+Math.round(d)}var c=o.height/r,h=c*(e-o.minIndex);return o.options.gridLines.offsetGridLines&&i&&(h+=c/2),o.top+Math.round(h)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,n=this,i=Math.max(n.ticks.length-(n.options.gridLines.offsetGridLines?0:1),1),a=n.isHorizontal(),o=(a?n.width:n.height)/i;return t-=a?n.left:n.top,n.options.gridLines.offsetGridLines&&(t-=o/2),e=t<=0?0:Math.round(t/o)},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",i,n)}},{}],45:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n={position:"left",ticks:{callback:t.Ticks.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return l?t.xAxisID===n.id:t.yAxisID===n.id}var n=this,i=n.options,a=n.chart,o=a.data,r=o.datasets,l=n.isHorizontal(),s=0,u=1;n.min=null,n.max=null;var d=i.stacked;if(void 0===d&&e.each(r,function(e,n){if(!d){var i=a.getDatasetMeta(n);a.isDatasetVisible(n)&&t(i)&&void 0!==i.stack&&(d=!0)}}),i.stacked||d){var c={};e.each(r,function(o,r){var l=a.getDatasetMeta(r),s=[l.type,void 0===i.stacked&&void 0===l.stack?r:"",l.stack].join(".");void 0===c[s]&&(c[s]={positiveValues:[],negativeValues:[]});var u=c[s].positiveValues,d=c[s].negativeValues;a.isDatasetVisible(r)&&t(l)&&e.each(o.data,function(t,e){var a=+n.getRightValue(t);isNaN(a)||l.data[e].hidden||(u[e]=u[e]||0,d[e]=d[e]||0,i.relativePoints?u[e]=100:a<0?d[e]+=a:u[e]+=a)})}),e.each(c,function(t){var i=t.positiveValues.concat(t.negativeValues),a=e.min(i),o=e.max(i);n.min=null===n.min?a:Math.min(n.min,a),n.max=null===n.max?o:Math.max(n.max,o)})}else e.each(r,function(i,o){var r=a.getDatasetMeta(o);a.isDatasetVisible(o)&&t(r)&&e.each(i.data,function(t,e){var i=+n.getRightValue(t);isNaN(i)||r.data[e].hidden||(null===n.min?n.min=i:in.max&&(n.max=i))})});n.min=isFinite(n.min)?n.min:s,n.max=isFinite(n.max)?n.max:u,this.handleTickRangeOptions()},getTickLimit:function(){var n,i=this,a=i.options.ticks;if(i.isHorizontal())n=Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(i.width/50));else{var o=e.getValueOrDefault(a.fontSize,t.defaults.global.defaultFontSize);n=Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(i.height/(2*o)))}return n},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,n=this,i=n.start,a=+n.getRightValue(t),o=n.end-i;return n.isHorizontal()?(e=n.left+n.width/o*(a-i),Math.round(e)):(e=n.bottom-n.height/o*(a-i),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,a=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,n)}},{}],46:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n=e.noop;t.LinearScaleBase=t.Scale.extend({handleTickRangeOptions:function(){var t=this,n=t.options,i=n.ticks;if(i.beginAtZero){var a=e.sign(t.min),o=e.sign(t.max);a<0&&o<0?t.max=0:a>0&&o>0&&(t.min=0)}void 0!==i.min?t.min=i.min:void 0!==i.suggestedMin&&(null===t.min?t.min=i.suggestedMin:t.min=Math.min(t.min,i.suggestedMin)),void 0!==i.max?t.max=i.max:void 0!==i.suggestedMax&&(null===t.max?t.max=i.suggestedMax:t.max=Math.max(t.max,i.suggestedMax)),t.min===t.max&&(t.max++,i.beginAtZero||t.min--)},getTickLimit:n,handleDirectionalChanges:n,buildTicks:function(){var n=this,i=n.options,a=i.ticks,o=n.getTickLimit();o=Math.max(2,o);var r={maxTicks:o,min:a.min,max:a.max,stepSize:e.getValueOrDefault(a.fixedStepSize,a.stepSize)},l=n.ticks=t.Ticks.generators.linear(r,n);n.handleDirectionalChanges(),n.max=e.max(l),n.min=e.min(l),a.reverse?(l.reverse(),n.start=n.max,n.end=n.min):(n.start=n.min,n.end=n.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{}],47:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n={position:"left",ticks:{callback:t.Ticks.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){function t(t){return u?t.xAxisID===n.id:t.yAxisID===n.id}var n=this,i=n.options,a=i.ticks,o=n.chart,r=o.data,l=r.datasets,s=e.getValueOrDefault,u=n.isHorizontal();n.min=null,n.max=null,n.minNotZero=null;var d=i.stacked;if(void 0===d&&e.each(l,function(e,n){if(!d){var i=o.getDatasetMeta(n);o.isDatasetVisible(n)&&t(i)&&void 0!==i.stack&&(d=!0)}}),i.stacked||d){var c={};e.each(l,function(a,r){var l=o.getDatasetMeta(r),s=[l.type,void 0===i.stacked&&void 0===l.stack?r:"",l.stack].join(".");o.isDatasetVisible(r)&&t(l)&&(void 0===c[s]&&(c[s]=[]),e.each(a.data,function(t,e){var a=c[s],o=+n.getRightValue(t);isNaN(o)||l.data[e].hidden||(a[e]=a[e]||0,i.relativePoints?a[e]=100:a[e]+=o)}))}),e.each(c,function(t){var i=e.min(t),a=e.max(t);n.min=null===n.min?i:Math.min(n.min,i),n.max=null===n.max?a:Math.max(n.max,a)})}else e.each(l,function(i,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&e.each(i.data,function(t,e){var i=+n.getRightValue(t);isNaN(i)||r.data[e].hidden||(null===n.min?n.min=i:in.max&&(n.max=i),0!==i&&(null===n.minNotZero||ia?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function o(t){var o,r,l,s=n(t),u=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},c={};t.ctx.font=s.font,t._pointLabelSizes=[];var h=e(t);for(o=0;od.r&&(d.r=m.end,c.r=g),v.startd.b&&(d.b=v.end,c.b=g)}t.setReductions(u,d,c)}function r(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function l(t){return 0===t||180===t?"center":t<180?"left":"right"}function s(t,e,n,i){if(f.isArray(e))for(var a=n.y,o=1.5*i,r=0;r270||t<90)&&(n.y-=e.h)}function d(t){var i=t.ctx,a=f.getValueOrDefault,o=t.options,r=o.angleLines,d=o.pointLabels;i.lineWidth=r.lineWidth,i.strokeStyle=r.color;var c=t.getDistanceFromCenterForValue(o.reverse?t.min:t.max),h=n(t);i.textBaseline="top";for(var p=e(t)-1;p>=0;p--){if(r.display){var m=t.getPointPosition(p,c);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(m.x,m.y),i.stroke(),i.closePath()}if(d.display){var v=t.getPointPosition(p,c+5),b=a(d.fontColor,g.defaultFontColor);i.font=h.font,i.fillStyle=b;var x=t.getIndexAngle(p),y=f.toDegrees(x);i.textAlign=l(y),u(y,t._pointLabelSizes[p],v),s(i,t.pointLabels[p]||"",v,h.size)}}}function c(t,n,i,a){var o=t.ctx;if(o.strokeStyle=f.getValueAtIndexOrDefault(n.color,a-1),o.lineWidth=f.getValueAtIndexOrDefault(n.lineWidth,a-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),o.closePath(),o.stroke();else{var r=e(t);if(0===r)return;o.beginPath();var l=t.getPointPosition(0,i);o.moveTo(l.x,l.y);for(var s=1;s0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,i=e.ticks,a=f.getValueOrDefault;if(e.display){var o=t.ctx,r=a(i.fontSize,g.defaultFontSize),l=a(i.fontStyle,g.defaultFontStyle),s=a(i.fontFamily,g.defaultFontFamily),u=f.fontString(r,l,s);f.each(t.ticks,function(l,s){if(s>0||e.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]),h=t.yCenter-d;if(n.display&&0!==s&&c(t,n,d,s),i.display){var f=a(i.fontColor,g.defaultFontColor);if(o.font=u,i.showLabelBackdrop){var p=o.measureText(l).width;o.fillStyle=i.backdropColor,o.fillRect(t.xCenter-p/2-i.backdropPaddingX,h-r/2-i.backdropPaddingY,p+2*i.backdropPaddingX,r+2*i.backdropPaddingY)}o.textAlign="center",o.textBaseline="middle",o.fillStyle=f,o.fillText(l,t.xCenter,h)}}}),(e.angleLines.display||e.pointLabels.display)&&d(t)}}});t.scaleService.registerScaleType("radialLinear",m,p)}},{}],49:[function(t,e,n){"use strict";var i=t(1);i="function"==typeof i?i:window.moment,e.exports=function(t){function e(t,e){var n=t.options.time;if("string"==typeof n.parser)return i(e,n.parser);if("function"==typeof n.parser)return n.parser(e);if("function"==typeof e.getMonth||"number"==typeof e)return i(e);if(e.isValid&&e.isValid())return e;var a=n.format;return"string"!=typeof a&&a.call?(console.warn("options.time.format is deprecated and replaced by options.time.parser."),a(e)):i(e,a)}function n(t,e,n,i){for(var a,o=Object.keys(l),r=o.length,s=o.indexOf(t);si;c++)s=a.steps[c],r=Math.ceil(u/(o*s));else for(;r>i&&i>0;)++s,r=Math.ceil(u/(o*s));return s}function o(t,e,n){var a=[];if(t.maxTicks){var o=t.stepSize;a.push(void 0!==t.min?t.min:n.min);for(var r=i(n.min);r.add(o,t.unit).valueOf()0&&a.add(1,"week"),a=a.valueOf()):(n=i(e.min).startOf(t.unit).valueOf(),a=i(e.max).startOf(t.unit),e.max-a>0&&a.add(1,t.unit),a=a.valueOf()),o(t,e,{min:n,max:a})};var u=t.Scale.extend({initialize:function(){if(!i)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");t.Scale.prototype.initialize.call(this)},determineDataLimits:function(){var t,n=this,i=n.options.time,a=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,l=n.chart.data,s={labels:[],datasets:[]};r.each(l.labels,function(r,l){var u=e(n,r);u.isValid()&&(i.round&&u.startOf(i.round),t=u.valueOf(),a=Math.min(t,a),o=Math.max(t,o),s.labels[l]=t)}),r.each(l.datasets,function(l,u){var d=[];"object"==typeof l.data[0]&&null!==l.data[0]&&n.chart.isDatasetVisible(u)?r.each(l.data,function(r,l){var s=e(n,n.getRightValue(r));s.isValid()&&(i.round&&s.startOf(i.round),t=s.valueOf(),a=Math.min(t,a),o=Math.max(t,o),d[l]=t)}):d=s.labels.slice(),s.datasets[u]=d}),n.dataMin=a,n.dataMax=o,n._parsedData=s},buildTicks:function(){var i,o,l=this,s=l.options.time,u=l.dataMin,d=l.dataMax;if(s.min){var c=e(l,s.min);s.round&&c.round(s.round),i=c.valueOf()}s.max&&(o=e(l,s.max).valueOf());var h=l.getLabelCapacity(i||u),f=s.unit||n(s.minUnit,i||u,o||d,h);l.displayFormat=s.displayFormats[f];var g=s.stepSize||a(i||u,o||d,f,h);l.ticks=t.Ticks.generators.time({maxTicks:h,min:i,max:o,stepSize:g,unit:f,isoWeekday:s.isoWeekday},{min:u,max:d}),l.max=r.max(l.ticks),l.min=r.min(l.ticks)},getLabelForIndex:function(t,n){var i=this,a=i.chart.data.labels&&t

Cover

This component allows you to create teasers using images. Regardless of what kind of element, it will always be centered vertically and horizontally and cover its container without losing its proportions. You can also place additional content, like text or image, on top of the image.

To use this component you need install with the command:

Dependency: base. The dependencies will be installed together with this module
mobileui install cover

You can use all features the base MobileUI in this component.

You can add color with transparent layer adding class blend-soft-light, blend-darken, blend-luminosity, blend-multiply, blend-screen and blend-overlay. See this example with header component.

You can combinate with button circle and list component.

You can combinate this component with list, card, badge, icons and grid.

================================================ FILE: cover/style.css ================================================ /*Define that an element has a background-image and must cover the space required.*/ .cover { padding: 15px; background-position: 50% 50%; background-size: cover; background-repeat: no-repeat; width: 100%; position: relative; } /*Fixed height size.*/ .cover.cover-200 { height: 300px; } /*Fixed height size.*/ .cover.cover-200 { height: 300px; } /*Fixed height size.*/ .cover.cover-400 { height: 400px; } /*Fixed height size.*/ .cover.cover-500 { height: 500px; } /*Remove space inner the cover.*/ .cover.no-padding { padding: 0; } /*Limit the size of an image and add large border.*/ .cover .avatar { height: 100px; border-width: 4px; margin-bottom: 5px; } .cover .item .avatar { height: 50px; } /*Float an element in the footer on the left.*/ .cover .float-bottom-right, .cover .float-bottom-center, .cover .float-bottom-left { margin-bottom: -30px; z-index: 99; position: absolute; } /*Float an element in the footer on the right.*/ .cover .big.float-bottom-left, .cover .big.float-bottom-center, .cover .big.float-bottom-right { margin-bottom: -35px; } /*Float an element in the footer on the center.*/ .cover .small.float-bottom-right, .cover .small.float-bottom-left, .cover .small.float-bottom-center { margin-bottom: -25px; } .cover .float-bottom-center { left: 50%; margin-left: -21px; } .cover .small.float-bottom-center { left: 50%; margin-left: -15px; } .cover .big.float-bottom-center { left: 50%; margin-left: -25px; } /*Set a gradient effect from black to transparent in the background of an element.*/ .cover .gradient { background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%); background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%); width: 100%; padding-bottom: 10px; padding-top: 20px; } /*Used when a background-image is set to apply the multiply effect of CSS3 in the background. See more at: multiply blend mode*/ .cover.blend-multiply { background-blend-mode: multiply; } /*Used when a background-image is set to apply the screen effect of CSS3 in the background. See more at: screen blend mode*/ .cover.blend-screen { background-blend-mode: screen; } /*Used when a background-image is set to apply the overlay effect of CSS3 in the background. See more at: overlay blend mode*/ .cover.blend-overlay { background-blend-mode: overlay; } /*Used when a background-image is set to apply the darken effect of CSS3 in the background. See more at: darken blend mode*/ .cover.blend-darken { background-blend-mode: darken; } /*Used when a background-image is set to apply the lighten effect of CSS3 in the background. See more at: lighten blend mode*/ .cover.blend-lighten { background-blend-mode: lighten; } /*Used when a background-image is set to apply the color-dodge effect of CSS3 in the background. See more at: color-dodge blend mode*/ .cover.blend-color-dodge { background-blend-mode: color-dodge; } /*Used when a background-image is set to apply the color-burn effect of CSS3 in the background. See more at: color-burn blend mode*/ .cover.blend-color-burn { background-blend-mode: color-burn; } /*Used when a background-image is set to apply the hard-light effect of CSS3 in the background. See more at: hard-light blend mode*/ .cover.blend-hard-light { background-blend-mode: hard-light; } /*Used when a background-image is set to apply the soft-light effect of CSS3 in the background. See more at: soft-light blend mode*/ .cover.blend-soft-light { background-blend-mode: soft-light; } /*Used when a background-image is set to apply the luminosity effect of CSS3 in the background. See more at: luminosity blend mode*/ .cover.blend-luminosity { background-blend-mode: luminosity; } ================================================ FILE: dist/alert.json ================================================ { "name":"alert", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: dist/base.json ================================================ { "name":"base", "dependencies": [], "files":[ "fonts/ionicons.woff", "fonts/roboto.woff2", "fonts/robotoblack.woff2", "fonts/robotolight.woff2" ] } ================================================ FILE: dist/button.json ================================================ { "name":"button", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: dist/chart-bar.json ================================================ { "name":"chart-bar", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: dist/chartist-plugin-tooltip.json ================================================ { "name":"chartist-plugin-tooltip", "author": "tmmdata", "dependencies": [ "chartist" ] } ================================================ FILE: dist/chartist.json ================================================ { "name":"chartist", "author": "gionkunz", "dependencies": [] } ================================================ FILE: dist/chartjs.json ================================================ { "name":"chartjs", "author": "nnnick", "dependencies": [] } ================================================ FILE: dist/cover.json ================================================ { "name":"cover", "author": "fabiorogeriosj", "dependencies": [ "base", "grid" ] } ================================================ FILE: dist/grid.json ================================================ { "name":"grid", "author": "gustavoquinalha", "dependencies": [] } ================================================ FILE: dist/header.json ================================================ { "name":"header", "author": "fabiorogeriosj", "dependencies": [ "base", "button" ] } ================================================ FILE: dist/horizontal-scroll.json ================================================ { "name":"horizontal-scroll", "author": "Yash-Handa", "dependencies": [ "base" ] } ================================================ FILE: dist/imports.css ================================================ @import url("./alert.min.css"); @import url("./base.min.css"); @import url("./button.min.css"); @import url("./chart-bar.min.css"); @import url("./chartist.min.css"); @import url("./chartist-plugin-tooltip.min.css"); @import url("./chartjs.min.css"); @import url("./cover.min.css"); @import url("./grid.min.css"); @import url("./header.min.css"); @import url("./horizontal-scroll.min.css"); @import url("./include.min.css"); @import url("./input.min.css"); @import url("./jquery.min.css"); @import url("./list.min.css"); @import url("./loading.min.css"); @import url("./menu.min.css"); @import url("./mobileui-colors.min.css"); @import url("./mobileuijs.min.css"); @import url("./momentjs.min.css"); @import url("./page.min.css"); @import url("./popover.min.css"); @import url("./progress-circle.min.css"); @import url("./progress-semicircle.min.css"); @import url("./progressbarjs.min.css"); @import url("./pulltorefresh.min.css"); @import url("./swiper.min.css"); @import url("./tab.min.css"); @import url("./timeline.min.css"); @import url("./toast.min.css"); ================================================ FILE: dist/include.json ================================================ { "name":"include", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: dist/input.json ================================================ { "name":"input", "author": "fabiorogeriosj", "dependencies": [ "base", "list" ] } ================================================ FILE: dist/jquery.json ================================================ { "name":"jquery", "author": "madrobby", "dependencies": [] } ================================================ FILE: dist/list.json ================================================ { "name":"list", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: dist/loading.json ================================================ { "name":"loading", "author": "fabiorogeriosj", "dependencies": [ "alert" ] } ================================================ FILE: dist/menu.json ================================================ { "name":"menu", "author": "fabiorogeriosj", "dependencies": [ "base", "list" ] } ================================================ FILE: dist/mobileui-colors.json ================================================ { "name":"mobileui-colors", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: dist/mobileuijs.json ================================================ { "name":"mobileuijs", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: dist/momentjs.json ================================================ { "name":"momentjs", "author": "timrwood", "dependencies": [] } ================================================ FILE: dist/page.json ================================================ { "name":"page", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: dist/popover.json ================================================ { "name":"popover", "author": "fabiorogeriosj", "dependencies": [ "base", "list" ] } ================================================ FILE: dist/progress-circle.json ================================================ { "name":"progress-circle", "author": "fabiorogeriosj", "dependencies": [ "mobileui-colors", "progressbarjs" ] } ================================================ FILE: dist/progress-circular.json ================================================ { "name":"progress-circular", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: dist/progress-semicircle.json ================================================ { "name":"progress-semicircle", "author": "fabiorogeriosj", "dependencies": [ "mobileui-colors", "progressbarjs" ] } ================================================ FILE: dist/progressbarjs.json ================================================ { "name":"progressbarjs", "author": "kimmobrunfeldt", "dependencies": [] } ================================================ FILE: dist/pulltorefresh.json ================================================ { "name":"pulltorefresh", "author": "BoxFactura", "dependencies": [] } ================================================ FILE: dist/swiper.json ================================================ { "name":"swiper", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: dist/tab.json ================================================ { "name":"tab", "author": "fabiorogeriosj", "dependencies": [ "base", "button" ] } ================================================ FILE: dist/templates.json ================================================ ================================================ FILE: dist/timeline.json ================================================ { "name":"timeline", "author": "gustavoquinalha", "dependencies": ["base", "grid"] } ================================================ FILE: dist/toast.json ================================================ { "name":"toast", "author": "lucasssv", "dependencies": [ "base" ] } ================================================ FILE: docs.json ================================================ { "site_dir": "../mobileui.github.io", "docs": [ { "category": "Getting started", "itens": [ { "key":"getting-started", "label":"Install", "path":"./base/install.html" }, { "key":"templates", "label":"Templates", "path":"./base/templates.html" }, { "key":"demos", "label":"Demos", "link": "/demos" } ] }, { "category": "Components base", "itens": [ { "key":"base", "label":"Base", "path":"./base/base.html" }, { "key":"colors", "label":"Colors", "path":"./base/colors.html" }, { "key":"icons", "label":"Icons", "path":"./base/icons.html" }, { "key":"fonts", "label":"Fonts", "path":"./base/fonts.html" }, { "key":"header", "label":"Header", "path":"./header/index.html" }, { "key":"button", "label":"Button", "path":"./button/index.html" }, { "key":"input", "label":"Input", "path":"./input/index.html" }, { "key":"list", "label":"List", "path":"./list/index.html" }, { "key":"tab", "label":"Tab", "path":"./tab/index.html" }, { "key":"card", "label":"Card", "path":"./base/card.html" }, { "key":"badge", "label":"Badge", "path":"./base/badge.html" }, { "key":"cover", "label":"Cover", "path":"./cover/index.html" }, { "key":"menu", "label":"Menu", "path":"./menu/index.html" }, { "key":"grid", "label":"Grid", "path":"./grid/index.html" }, { "key":"swiper", "label":"Swiper", "path":"./swiper/index.html" }, { "key":"page", "label":"Page", "path":"./page/index.html" }, { "key":"include", "label":"Include", "path":"./include/index.html" }, { "key":"popover", "label":"Popover", "path":"./popover/index.html" }, { "key":"alert", "label":"Alert", "path":"./alert/index.html" }, { "key":"toast", "label":"Toast", "path":"./toast/index.html" }, { "key":"loading", "label":"Loading", "path":"./loading/index.html" }, { "key":"timeline", "label":"Timeline", "path":"./timeline/index.html" } ] }, { "category": "Components charts", "itens": [ { "key":"chartist", "label":"Chartist", "path":"./chartist/index.html" }, { "key":"progress-circle", "label":"Progress Circle", "path":"./progress-circle/index.html" }, { "key":"progress-semicircle", "label":"Progress Semicircle", "path":"./progress-semicircle/index.html" }, { "key":"chart-bar", "label":"Chart Bar", "path":"./chart-bar/index.html" } ] }, { "category": "Libs", "itens": [ { "key":"mobileuijs", "label":"MobileUI.js", "path":"./mobileuijs/index.html" }, { "key":"jquery", "label":"jQuery", "path":"./jquery/index.html" }, { "key":"progressbarjs", "label":"ProgressBar.js", "path":"./progressbarjs/index.html" }, { "key":"chartjs", "label":"Chart.js", "path":"./chartjs/index.html" }, { "key":"momentjs", "label":"Moment.js", "path":"./momentjs/index.html" }, { "key":"pulltorefresh", "label":"PullToRefresh", "path":"./pulltorefresh/index.html" } ] } ] } ================================================ FILE: generate_dist.js ================================================ const fs = require('fs') const path = require('path') const compressor = require('node-minify') const wrench = require('wrench') function getDirectories (srcpath) { return fs.readdirSync(srcpath) .filter(function(file){ return fs.statSync(path.join(srcpath, file)).isDirectory() && file.indexOf('.') < 0 && file !== 'node_modules' && file !== 'dist' && file !== 'assets' }) } var importsAll = '' var dir = getDirectories('./') for(var i in dir) { var item = dir[i] importsAll += `@import url("./${item}.min.css");\n` fs.createReadStream(`./${item}/component.json`).pipe(fs.createWriteStream(`./dist/${item}.json`)); if(item === 'base') { compressor.minify({ compressor: 'clean-css', input: ['./base/reset.css','./base/mobileui.css','./base/colors.css','./base/font.css','./base/icons.css'], output: './dist/base.min.css', options: { advanced: false, aggressiveMerging: false }, callback: function (err, min) { if(err) console.log('ERROR: ', err) wrench.copyDirSyncRecursive('./base/fonts', './dist/fonts', { forceDelete: true }) } }) compressor.minify({ compressor: 'gcc', input: './base/base.js', output: './dist/base.min.js', callback: function (err, min) { if(err) console.log('ERROR: ', err) } }); } else { if(fs.existsSync(`./${item}/style.css`)){ compressor.minify({ compressor: 'clean-css', input: `./${item}/style.css`, output: `./dist/${item}.min.css`, options: { advanced: false, aggressiveMerging: false }, callback: function (err, min) { if(err) console.log('ERROR: ', err) } }) } if(fs.existsSync(`./${item}/script.js`)){ compressor.minify({ compressor: 'uglifyjs', input: `./${item}/script.js`, output: `./dist/${item}.min.js`, callback: function (err, min) { if(err) console.log('ERROR: ', err) } }); } } } var fileNameImport = './dist/imports.css' if (fs.existsSync(fileNameImport)) { fs.unlinkSync(fileNameImport) } var fd = fs.openSync(fileNameImport, 'w') fs.writeSync(fd, importsAll) ================================================ FILE: generate_doc.js ================================================ const fs = require('fs') const path = require('path') const wrench = require('wrench') const docs = require('./docs.json') var template = fs.readFileSync(path.join(docs.site_dir, 'template.html')).toString() var menu = '' var content = '' for (var i in docs.docs) { var item = docs.docs[i] menu += `

${item.category}

` menu += `
    ` for (var subitem of item.itens) { var href = subitem.link ? subitem.link : '#' + subitem.key menu += `
  • ${subitem.label}
  • ` if (fs.existsSync(subitem.path)) { var docHtml = fs.readFileSync(subitem.path).toString() var urlDoc = 'https://github.com/MobileUI/components/tree/master/' + subitem.path.replace('./', '') docHtml = docHtml.replace('', 'Contribute on Github! Edit this section.\n') docHtml = docHtml.split('')[1].split('')[0] docHtml = docHtml.replace(`id="_DOC_GENERATE_SPACE_"`, `id="${subitem.key}"`) var docCss = '' if (subitem.key === 'base') { docCss = fs.readFileSync('./base/mobileui.css').toString() } else if (subitem.path.indexOf('./base') < 0) { var uriFile = subitem.path.replace('index.html', 'style.css') if (fs.existsSync(uriFile)) { docCss = fs.readFileSync(uriFile).toString() } } if (docCss) { docCss = docCss.split('/*') var listCssDoc = [] for (i in docCss) { if (docCss[i].split('{')[0].indexOf('*/') >= 0) { var description = docCss[i].split('{')[0].split('*/')[0] var classes = docCss[i].split('{')[0].split('*/')[1].split('.') var className = classes[classes.length - 1] className = className.split(':')[0] if (description && className) { listCssDoc.push({className: className, description: description}) } } } if (listCssDoc.length) { var htmlCssDoc = '

    The features of this component are:

    ' htmlCssDoc += '
    ' for (var doc of listCssDoc) { htmlCssDoc += `` } htmlCssDoc += '
    ClassDescription
    ${doc.className}${doc.description}
    ' docHtml = docHtml.replace('', htmlCssDoc) } } content += '
    ' + docHtml + '
    ' } } menu += `
` } var index = template.replace(``, `
${content}
`) index = index.replace(new RegExp(`../assets/`, 'g'), `/`) fs.writeFileSync(path.join(docs.site_dir, 'index.html'), index) if (!fs.existsSync(path.join(docs.site_dir, 'mobileui/'))) { fs.mkdirSync(path.join(docs.site_dir, 'mobileui/')) } wrench.copyDirSyncRecursive('./dist', path.join(docs.site_dir, 'mobileui/'), { forceDelete: true }) ================================================ FILE: grid/component.json ================================================ { "name":"grid", "author": "gustavoquinalha", "dependencies": [] } ================================================ FILE: grid/index.html ================================================

Grid

MobileUI uses CSS Flexible Box Layout Module standard.

Simply add columns you want in a row, and they'll evenly take up the available space. If you want three columns, add three columns, if you want five columns, add five columns. There's no restriction to a 12 column grid, or having to explicitly state how large each column should be.

The row class name is used to designate, surprise, a row, and col is used for a column. In the demo to the right we chose to have four, then two, columns, but we could have just as easily used 3, 6, 7, 23, etc., it doesn't matter. Point is, add the number of columns your layout requires and don't worry about figuring out the percentages because it figures it out automatically.

To use this component you need install with the command:

mobileui install grid

See this good example using row-between.


See this good example using row-around.


See how is easy align a column in the center, using row-center.


You can create a row with column direction, using column.


See this good example using row and vertical-align-top.


See this good example using row and vertical-align-center.


See this good example using row and vertical-align-bottom.


See this good example using row and horizontal-align-left.


See this good example using row and horizontal-align-center.


See this good example using row and horizontal-align-right.


See this good example using row, horizontal-align-right and vertical-align-center.
You can customize all classes of horizontal-align-X and vertical-align-Y.


When you use the vertical-align-* classes, you need to define height off element, for example: style="height: 100px;".
Or you can use helper class .full-height


See this good example using header, cover and list components.

================================================ FILE: grid/style.css ================================================ /*Create a line.*/ .row { display: -webkit-box; display: -ms-flexbox; display: flex; } /*Create a line that the columns are distributed in an equal space.*/ .row-between { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; } /*Create a line that the columns are distributed in an equal space around.*/ .row-around { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-pack: distribute; justify-content: space-around; } /*Create a stretch row, you need define height value.*/ .row-stretch { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; } /*Create a column.*/ .column { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } /*Default all items will be on one line, whit this class add to row all items will wrap onto multiple lines, from top to bottom.*/ .wrap { -ms-flex-wrap: wrap; flex-wrap: wrap; } /*Align col to the top(Axis Y).*/ .vertical-align-top { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } /*Align col to the center(Axis Y).*/ .vertical-align-center { -webkit-box-align: center; -ms-flex-align: center; align-items: center; } /*Align col to the bottom(Axis Y).*/ .vertical-align-bottom { -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; } /*Align col to the left(Axis X).*/ .horizontal-align-left { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; } /*Align col to the center(Axis X).*/ .horizontal-align-center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } /*Align col to the right(Axis X).*/ .horizontal-align-right { -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } /*Center a column on the row.*/ .row-center { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } /*Create a column with remaining space of the row.*/ .col { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; position: relative; } /*Create a column with 10% of the row.*/ .col-10 { position: relative; -ms-flex-preferred-size: 10%; flex-basis: 10%; } /*Create a column with 20% of the row.*/ .col-20 { position: relative; -ms-flex-preferred-size: 20%; flex-basis: 20%; } /*Create a column with 25% of the row.*/ .col-25 { position: relative; -ms-flex-preferred-size: 25%; flex-basis: 25%; } /*Create a column with 33.3333% of the row.*/ .col-33, .col-34 { position: relative; -ms-flex-preferred-size: 33.3333%; flex-basis: 33.3333%; } /*Create a column with 50% of the row.*/ .col-50 { position: relative; -ms-flex-preferred-size: 50%; flex-basis: 50%; } /*Create a column with 66.6666% of the row.*/ .col-66, .col-67 { position: relative; -ms-flex-preferred-size:66.6666%; flex-basis:66.6666%; } /*Create a column with 75% of the row.*/ .col-75 { position: relative; -ms-flex-preferred-size: 75%; flex-basis: 75%; } /*Create a column with 80% of the row.*/ .col-80 { position: relative; -ms-flex-preferred-size: 80%; flex-basis: 80%; } /*Create a column with 90% of the row.*/ .col-90 { position: relative; -ms-flex-preferred-size: 90%; flex-basis: 90%; } .full-width { width: 100%; margin: 0 auto } .full-height { height: 100%; margin: 0 auto } ================================================ FILE: header/component.json ================================================ { "name":"header", "author": "fabiorogeriosj", "dependencies": [ "base", "button" ] } ================================================ FILE: header/index.html ================================================

Header

Headers are fixed regions at the top of a screen that can contain a title label, and left/right buttons for navigation or to carry out various actions.

To use this component you need install with the command:

Dependency: base and button. The dependencies will be installed together with this module
mobileui install header

You can use all features the base MobileUI in this component.

You can put the title in center or right add class align-center or align-right.

For put buttons in left and right you need create a div with class left or right.

You can put buttons with text and another options of buttons settings, see section Button.

If you need the header transparent just add text color class.

If you don't use transparent header you need add class has-header in your content or div for top position add margin. For this example the component list was used too.

For this example you need to install the following components:

mobileui install header list

A secondary header bar can be placed below the original header bar. There are quite a few more ways to customize Headers.

You can add group of buttons in header.

You can create a header in bottom of screen, just add class footer.

================================================ FILE: header/style.css ================================================ /*Create a fixed bar at the top of the page.*/ .footer, .header { font-size: 18px; display: inline-block; width: 100%; position: fixed; top: 0; left: 0; height: 52px; z-index: 9; } /*Create a fixed bar at the bottom of the page.*/ .footer { top: initial; bottom: 0; } /*If used with header create a fixed sub-bar at the top of the page, if using with footer creates a fixed sub-bar at the bottom.*/ .header.sub { top:52px; } .footer.sub { top: initial; bottom: 52px; } /*Used in the parent element of the header, or body element, to define that the page uses header.*/ .has-header { padding-top: 52px !important; } /*Used in the parent element of the header and sub, or body element, to define that the page uses sub.*/ .has-header.has-sub-header { padding-top: 104px !important; } /*Used in the parent element of the header and footer, or body element, to define that the page uses header in bottom.*/ .has-footer { padding-bottom: 52px !important } /*Used in the parent element of the header with sub and bottom, or body element, to define that the page uses sub in bottom.*/ .has-footer.has-sub-footer { padding-bottom: 104px !important } .header .left, .header .right, .header .title, .header h1, .footer .left, .footer .right, .footer .title, .footer h1 { margin-top: 15px; margin-bottom: 5px; } /*Set a fixed size for an image.*/ .header .avatar { height: 40px; margin-top: -8px; margin-left: 4px; } /*Add big border in element.*/ .header .border-big { border-width: 2px; border-style: solid; } .header h2, .footer h2 { padding-top: 8px; padding-left: 10px; } .header p, .footer p { padding-left: 10px; margin: 0; margin-top: -4px; } .header .left, .footer .left { padding-left: 5px } .header .right, .footer .right { padding-right: 5px } /*Create a title in the header, you can just use h1 element.*/ .header h1, .header .title, .footer h1, .footer .title { margin-bottom: 15px; padding-left: 10px; padding-right: 15px; display: inline-block; } .header button, .footer button { margin-top: -10px; } .header button.icon, .footer button.icon { font-size: 30px; margin-top: -10px; z-index: 99; background: none; border: none; padding: 0 6px; } .header button.icon:not([class*=red]):not([class*=pink]):not([class*=white]):not([class*=purple]):not([class*=indigo]):not([class*=blue]):not([class*=cyan]):not([class*=teal]):not([class*=green]):not([class*=lime]):not([class*=yellow]):not([class*=amber]):not([class*=orange]):not([class*=brown]):not([class*=grey]):not([class*=black]):not([class*=white]), .footer button.icon:not([class*=red]):not([class*=pink]):not([class*=white]):not([class*=purple]):not([class*=indigo]):not([class*=blue]):not([class*=cyan]):not([class*=teal]):not([class*=green]):not([class*=lime]):not([class*=yellow]):not([class*=amber]):not([class*=orange]):not([class*=brown]):not([class*=grey]):not([class*=black]):not([class*=white]) { color: #fff; } .header button.icon.left, .footer button.icon.left, .header button.icon.right, .footer button.icon.right { margin-top: 5px; margin-bottom: 5px; } .header button.icon.left, .footer button.icon.left { margin-left: 5px; } .header button.icon.right, .footer button.icon.right { margin-right: 5px; } .header .title.align-center, .footer .title.align-center, .header h1.align-center, .footer h1.align-center, .header p.align-center, .footer p.align-center { width: 100%; position: inherit; padding-right: 15px; left: 0; z-index: 9; } /*Create a floating badge next to an icon.*/ .header .icon-badge, .footer .icon-badge { position: absolute; margin-left: -6px; margin-top: -8px; border-radius: 8px; z-index: 999; } .header .buttons-group, .footer .buttons-group { margin-top: 15px; margin-left: 5px; margin-right: 5px; } .header .buttons-group.small, .footer .buttons-group.small { margin-top: 20px; margin-left: 10px; margin-right: 10px; } .header input::-webkit-input-placeholder { color: rgba(0, 0, 0, 0.8); } /*Defines a light color for the placeholder.*/ .header input.placeholder-white::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.8); } .header input { padding: 15px; position: absolute; } .header .left+input { padding-right: 50px; } ================================================ FILE: horizontal-scroll/component.json ================================================ { "name":"horizontal-scroll", "author": "Yash-Handa", "dependencies": [ "base" ] } ================================================ FILE: horizontal-scroll/index.html ================================================

Horizontal Scroll

To use this component you need install with the command:

Dependency: base. The dependencies will be installed together with this module
mobileui install horizontal-scroll

You can use all features the base MobileUI in this component.

You can add class full, half, three-fourth, one-fourth to an item class to manipulate its width with respect to the horizontal-scroll component.

You can put images and icons in Horizontal Scroll.

You can combinate with others components and class.

Another example of a combination of components header, button and cover.

You can add class mark for change color border.

Same Example as above but with no scroll bar by using classno-scroll-bar on horizontal-scroll component.

================================================ FILE: horizontal-scroll/style.css ================================================ /*Define an element as horizontal-scroll. This feature depends on the item to function properly.*/ .horizontal-scroll { width: 100%; position: relative; border: 1px solid #ddd; display: flex; display: -moz-flex; display: -ms-flexbox; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* Hides the Scroll Bar. This is for webkit browsers only, however. */ .horizontal-scroll.no-scroll-bar::-webkit-scrollbar { display: none; } /*Define an element as item. This feature depends on the horizontal-scroll to function properly.*/ .horizontal-scroll .item { padding: 15px; display: inline-block; flex: 0 0 auto; width: 100%; border-right: 1px solid #ddd; position: relative; font-size: 18px; } .horizontal-scroll .item.hidden { display: none; } .horizontal-scroll .item.mark { border-right: 0; border-bottom: 0; border-top: 0; } /*Block line space with left avatar.*/ .item .block { display: -webkit-box; display: flex; } .horizontal-scroll .item.mark.margin-right { border-right: 0; margin-right: 10px; } /*Define a small space between the left and right elements.*/ .horizontal-scroll .item.space-small { padding-left: 5px; padding-right: 5px; } .horizontal-scroll.space-small .item { padding-left: 5px; padding-right: 5px; } /*Remove space in left item.*/ .horizontal-scroll .item.no-space-left { padding-left: 0 !important; } /*Remove space in right item.*/ .horizontal-scroll .item.no-space-right { padding-right: 0 !important; } .horizontal-scroll.no-space-left .item { padding-left: 0 !important; } .horizontal-scroll.no-space-right .item { padding-right: 0 !important; } .horizontal-scroll.no-space-top .item { padding-top: 0 !important; } .horizontal-scroll.no-space-bottom .item { padding-bottom: 0 !important; } .horizontal-scroll.no-space .item { padding-left: 0 !important; padding-right: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; } .horizontal-scroll .item.row { display: -moz-flex; display: -ms-flexbox; display: flex; } /* Display the element in full width of the container ( default ) */ .horizontal-scroll .item.full { width: 100%; } /* Display the element in 75% width of the container */ .horizontal-scroll .item.three-fourth { width: 75%; } /* Display the element in 50% width of the container */ .horizontal-scroll .item.half { width: 50%; } /* Display the element in 25% width of the container */ .horizontal-scroll .item.one-fourth { width: 25%; } .horizontal-scroll .item h1, .horizontal-scroll .item h2 { font-size: 16px; margin: 0; padding: 0; } .horizontal-scroll .item h1 { margin-top: 7px; } .horizontal-scroll .item p { font-size: 14px; margin: 0; padding: 0; line-height: 20px; } .horizontal-scroll .left { margin-right: 10px; min-width: 25px; } .horizontal-scroll .right { margin-right: 20px; position: absolute; top: 0; right: 0; height: 100%; display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-align: center; -webkit-align-items: center; -webkit-box-align: center; align-items: center; } .horizontal-scroll .right i { margin-left: 5px; } .horizontal-scroll .align-top { -ms-flex-align: center; -webkit-align-items: center; align-items: baseline; margin-top: 10px; } /*Set a fixed size for an image.*/ .horizontal-scroll .avatar { height: 50px; } /*Set a floating badge above the image.*/ .avatar-badge { position: absolute; margin-left: -4px; margin-top: -3px; border-radius: 8px; } .horizontal-scroll .item small, .horizontal-scroll .item small .icon { font-size: 14px; } .horizontal-scroll .item .icon { font-size: 18px; } .horizontal-scroll .item .icon.text-huge { font-size: 32px; } .horizontal-scroll .left .icon, .horizontal-scroll .right .icon { vertical-align: -webkit-baseline-middle; } /*Add big border in item or element.*/ .horizontal-scroll .border-big { border-width: 3px; border-style: solid; } /*Define that a .horizontal-scroll or an item has no borders.*/ .horizontal-scroll.no-border { border: 0; } /*Define that a .horizontal-scroll or an item has a right border.*/ .horizontal-scroll.no-border .item.border-right, .horizontal-scroll .item.no-border.border-right { border-right-width: 1px; border-right-style: solid; } .horizontal-scroll.no-border .item, .horizontal-scroll .item.no-border { border: none; } .horizontal-scroll .item:last-child { border-right:0; } .horizontal-scroll .item .right .icon, .horizontal-scroll .item .right.icon { font-size: 24px; padding: 0; margin: 0; } ================================================ FILE: include/component.json ================================================ { "name":"include", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: include/index.html ================================================

Include

This component include an external file HTML in your page.

To use this component you need install with the command:

mobileui install include
myfile1.html myfile2.html

You can invoke callback function after include page: include('myFrame','myfile', myFunctionCallback)

================================================ FILE: include/myfile1.html ================================================ This is my file

Included when load file.


================================================ FILE: include/myfile2.html ================================================ This is another file

Included by click button.


================================================ FILE: include/script.js ================================================ window.include = function(element, file, callback){ if(file.indexOf('.html') < 0){ file =file+'.html'; } var xhttp = new XMLHttpRequest(); xhttp.onload = function() { if (this.readyState == 4) { var page = this.responseText; var div = typeof(element) === 'string' ? document.getElementById(element) : element; console.log(div) if(div){ div.innerHTML = page } if(callback){ callback(); } } }; xhttp.open("GET", file + '?cache='+new Date().getTime(), true); xhttp.send(); } window.bindIncludeEvent = function(){ document.querySelectorAll('[include]').forEach(function(element, i){ window.include(element, element.getAttribute('include')); }); } window.bindIncludeEvent(); document.addEventListener("openPage", function(){ window.bindIncludeEvent(); }); ================================================ FILE: include/style.css ================================================ ================================================ FILE: input/component.json ================================================ { "name":"input", "author": "fabiorogeriosj", "dependencies": [ "base", "list" ] } ================================================ FILE: input/index.html ================================================

Input

Inputs are essential in an application to collect user data, so we need to worry about the layout and MobileUI does it for you.

To use this component you need install with the command:

Dependency: base and list. The dependencies will be installed together with this module
mobileui install input

You can use all features the base and list components in this component.

If you put label on the items, you can have a line view of the component.

Use class label-fixed in item of the list for fixed the label.

Input floating is a good option for forms login, just add class label-float in item.

You can put align-right for align your text in right item.

You can use icons in your input. Simply add a class icon and your ion-*. By default the icon will take the left. However, you can put them on the right by adding the class icon-right.

You can be creative and also use the other components such as cover and grid components. And you can install new fonts using feature fonts.

A switch is an input component that holds a boolean value. Like the checkbox, switches are often used to allow the user to switch a setting on or off. Attributes like value, disabled, and checked can be applied to the toggle to control its behavior.

A checkbox is an input component that holds a boolean value. Checkboxes are no different than HTML checkbox inputs. However, like other Ionic components, checkboxes are styled differently on each platform.

Like the checkbox, a radio is an input component that holds a boolean value. Under the hood, radios are no different than HTML radio inputs. Radios are styled differently on each platform

You can use a range input for control that lets users select from a range of values by moving a slider knob along the slider bar or track.

================================================ FILE: input/script.js ================================================ (function bindInputEvent(){ setTimeout(function(){ var inputs = document.getElementsByTagName('input'); for(i in inputs){ var parent = inputs[i].parentNode; if(parent && (parent.className.indexOf('left') >=0 || parent.className.indexOf('right') >=0) && parent.parentNode.className.indexOf('item') >= 0){ parent = parent.parentNode; } if(parent && parent.className.indexOf('item') >=0 && parent.className.indexOf('bind-input-event-click') < 0 ){ parent.className += ' bind-input-event-click'; parent.addEventListener('click', function(){ if(this.getElementsByTagName('input').length) { this.getElementsByTagName('input')[0].focus(); if(this.getElementsByTagName('input')[0].type === 'radio' && !this.getElementsByTagName('input')[0].disabled) { this.getElementsByTagName('input')[0].checked=true; } } }, false); } } var labelsFloat = document.getElementsByClassName('label-float'); for(i in labelsFloat) { if(labelsFloat[i].className && labelsFloat[i].className.indexOf('bind-input-event-focus') < 0 && labelsFloat[i].querySelectorAll('input,textarea').length) { labelsFloat[i].className += ' bind-input-event-focus'; labelsFloat[i].querySelectorAll('input,textarea')[0].addEventListener('focus', function(){ if(this.parentNode.getElementsByTagName('label').length && this.parentNode.getElementsByTagName('label')[0].className.indexOf('focus') < 0) { this.parentNode.getElementsByTagName('label')[0].className += ' focus' } }, false); labelsFloat[i].querySelectorAll('input,textarea')[0].addEventListener('blur', function(){ if(this.parentNode.getElementsByTagName('label').length && this.parentNode.getElementsByTagName('label')[0].className && !this.value.length) { this.parentNode.getElementsByTagName('label')[0].className = this.parentNode.getElementsByTagName('label')[0].className.replace('focus',''); } }, false); if(labelsFloat[i].querySelectorAll('input,textarea')[0].value && labelsFloat[i].querySelectorAll('input,textarea')[0].value.length) { labelsFloat[i].querySelectorAll('input,textarea')[0].parentNode.getElementsByTagName('label')[0].className += ' focus' } } } bindInputEvent(); },500); })(); ================================================ FILE: input/style.css ================================================ input, textarea, select { border: none; background: none; font-size: 14px; width: 100%; -webkit-flex: 1; -ms-flex: 1; flex: 1; } input[disabled], textarea[disabled], select[disabled] { opacity: 0.8; } label { font-size: 14px; } /*Define a fixed label beside the input element.*/ .label-fixed, .item.label-fixed { display: -moz-flex !important; display: -ms-flexbox !important; display: flex !important; width: 100%; } .label-fixed label { -webkit-flex: 0 0 100px; -ms-flex: 0 0 100px; flex: 0 0 100px; width: 100px; min-width: 100px; max-width: 200px; } /*Define a floating label above the input element.*/ .label-float { } .label-float label { margin-bottom: 0; -webkit-transform: translate3d(0, 27px, 0); transform: translate3d(0, 27px, 0); -webkit-transform-origin: left top; transform-origin: left top; transition: -webkit-transform 150ms ease-in-out; transition: transform 150ms ease-in-out; transition: transform 150ms ease-in-out, -webkit-transform 150ms ease-in-out; align-self: stretch; -webkit-flex: initial; -ms-flex: initial; flex: initial; display: block; } .label-float label.focus { -webkit-transform: translate3d(0, 0, 0) scale(0.8); transform: translate3d(0, 0, 0) scale(0.8); } .item.icon { display: flex; } .item.icon.radius { border-radius: 6px; } .item.icon:not([class*="text-"]) { color: #9f9f9f; } .item input::-webkit-input-placeholder { color: rgba(0, 0, 0, 0.6); } /*Defines a light color for the placeholder.*/ .item input.placeholder-white::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.6); } .item.icon:before { position: absolute; } /*Align an icon from a field to the right.*/ .item.icon.icon-right:before { right: 20px; } .item.icon input, .item.icon select { padding-left: 30px; } .item.icon.icon-right input, .item.icon.icon-right select { padding-left: 0; padding-right: 30px; } input[type="checkbox"] { width: 17px; height: 17px; z-index: 1; border: 0; vertical-align: top; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; border-radius: 2px; } .platform-ios input[type="checkbox"]{ height: 23px; width: 23px; border-radius: 50%; } input[type="checkbox"]:not(:checked) { background-color: #fff !important; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.5); } .platform-ios input[type="checkbox"]:not(:checked){ box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4); } input[type="checkbox"]:disabled { opacity: 0.4; } input[type="checkbox"]::before { content: ''; position: absolute; margin-top: 1px; margin-left: 5px; width: 5px; height: 10px; border-width: 2px; border-top-width: 0; border-left-width: 0; border-style: solid; border-color: #fff; -webkit-transform: rotate(45deg); transform: rotate(45deg); } .platform-ios input[type="checkbox"]::before { margin-top: 5px; margin-left: 9px; width: 4px; height: 9px; border-width: 1px; border-top-width: 0; border-left-width: 0; } input[type="checkbox"].switch { width: 36px; height: 14px; box-shadow: inset 0 0 0 30px rgba(255,255,255,0.4); border-radius: 28px; -webkit-transition-property: all; transition-property: all; -webkit-transition-duration: 0.35s; transition-duration: 0.35s; -webkit-transition-timing-function: ease-out; transition-timing-function: ease-out; } .platform-ios input[type="checkbox"].switch { height: 32px; width: 51px; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.05); } input[type="checkbox"].switch:not(:checked) { background-color: #fff !important; box-shadow: inset 0 0 0 30px rgba(0,0,0,0.35); } .platform-ios input[type="checkbox"].switch:not(:checked) { box-shadow: inset 0 0 0 2px rgba(0,0,0,0.1); } input[type="checkbox"].switch::before { content: ''; border-radius: 28px; height: 20px; width: 20px; margin-left: -1px; margin-top: -3px; -webkit-transition-duration: .35s; transition-duration: .35s; box-shadow: 0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4); border: 0; } .platform-ios input[type="checkbox"].switch::before { height: 28px; width: 28px; box-shadow: 0 0 0 1px #e4e4e4, 0 3px 2px rgba(0, 0, 0, .25); margin-top: 2px; margin-left: 2px; background-color: #fff !important; } input[type="checkbox"].switch:checked::before { margin-left: 16px; } input[type="checkbox"].switch:not(:checked)::before { background-color: #fff !important; } .platform-ios input[type="checkbox"].switch:checked::before { margin-left: 21px; box-shadow: 0 3px 2px rgba(0, 0, 0, .25); background-color: #fff; } input[type="radio"] { width: 20px; height: 20px; border-radius: 50%; position: relative; overflow: hidden; z-index: 1; vertical-align: top; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: none; } .platform-ios input[type="radio"] { background: none !important; } input[type="radio"]::after { content: ''; width: 100%; height: 100%; position: absolute; border-radius: 50%; } .platform-ios input[type="radio"]:not(:checked)::after { box-shadow:none; } input[type="radio"]:not(:checked)::after { box-shadow: inset 0 0 0 2px rgba(0,0,0,0.4); background-color: #fff !important; } input[type="radio"]:checked::before { content: ''; width: 10px; height: 10px; position: absolute; border: 3px solid #fff; z-index: 1; border-radius: 50%; margin-top: 2px; margin-left: 2px; } input[type="radio"]:disabled { opacity: 0.4; } .platform-ios input[type="radio"]::after { background: none !important; } .platform-ios input[type="radio"]:checked::before { position: absolute; margin-top: 4px; margin-left: 7px; width: 5px; height: 12px; border-width: 2px; border-top-width: 0; border-left-width: 0; border-style: solid; -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 0; } /*Defines a item of list is range input.*/ .item.range { position: relative; -ms-flex-item-align: center; -webkit-align-self: center; align-self: center; } .item.range input{ position: absolute;; height: 28px; width: calc(100% - 110px); margin: 4px 0 5px 0; -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; appearance: none; background: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#ccc),color-stop(100%,#ccc)); background: linear-gradient(to right,#ccc 0,#ccc 100%); background-position: center; background-size: 100% 2px; background-repeat: no-repeat; outline: 0; border: none; box-sizing: content-box; -ms-background-position-y: 500px; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; background-color: #666; width: 13px; height: 13px; border-radius: 50%; } input[type="range"]:active::-webkit-slider-thumb { width: 20px; height: 20px; } .platform-ios input[type="range"]::-webkit-slider-thumb { background-color: #fff; box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3); width: 25px; height: 25px; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 50%; } input[type="radio"].red-50::after, input[type="checkbox"].red-50.switch::before { background-color: #ffebee; } input[type="radio"].red-100::after, input[type="checkbox"].red-100.switch::before { background-color: #ffcdd2; } input[type="radio"].red-200::after, input[type="checkbox"].red-200.switch::before { background-color: #ef9a9a; } input[type="radio"].red-300::after, input[type="checkbox"].red-300.switch::before { background-color: #e57373; } input[type="radio"].red-400::after, input[type="checkbox"].red-400.switch::before { background-color: #ef5350; } input[type="radio"].red-500::after, input[type="checkbox"].red-500.switch::before { background-color: #f44336; } input[type="radio"].red-600::after, input[type="checkbox"].red-600.switch::before { background-color: #e53935; } input[type="radio"].red-700::after, input[type="checkbox"].red-700.switch::before { background-color: #d32f2f; } input[type="radio"].red-800::after, input[type="checkbox"].red-800.switch::before { background-color: #c62828; } input[type="radio"].red-900::after, input[type="checkbox"].red-900.switch::before { background-color: #b71c1c; } input[type="radio"].pink::after, input[type="checkbox"].pink.switch::before { background-color: #E91E63; } input[type="radio"].pink-50::after, input[type="checkbox"].pink-50.switch::before { background-color: #fce4ec; } input[type="radio"].pink-100::after, input[type="checkbox"].pink-100.switch::before { background-color: #f8bbd0; } input[type="radio"].pink-200::after, input[type="checkbox"].pink-200.switch::before { background-color: #f48fb1; } input[type="radio"].Pink-300::after, input[type="checkbox"].Pink-300.switch::before { background-color: #f06292; } input[type="radio"].pink-400::after, input[type="checkbox"].pink-400.switch::before { background-color: #ec407a; } input[type="radio"].pink-500::after, input[type="checkbox"].pink-500.switch::before { background-color: #e91e63; } input[type="radio"].pink-600::after, input[type="checkbox"].pink-600.switch::before { background-color: #d81b60; } input[type="radio"].pink-700::after, input[type="checkbox"].pink-700.switch::before { background-color: #c2185b; } input[type="radio"].pink-800::after, input[type="checkbox"].pink-800.switch::before { background-color: #ad1457; } input[type="radio"].pink-900::after, input[type="checkbox"].pink-900.switch::before { background-color: #880e4f; } input[type="radio"].purple::after, input[type="checkbox"].purple.switch::before { background-color: #9c27b0; } input[type="radio"].purple-50::after, input[type="checkbox"].purple-50.switch::before { background-color: #f3e5f5; } input[type="radio"].purple-100::after, input[type="checkbox"].purple-100.switch::before { background-color: #e1bee7; } input[type="radio"].purple-200::after, input[type="checkbox"].purple-200.switch::before { background-color: #ce93d8; } input[type="radio"].Purple-300::after, input[type="checkbox"].Purple-300.switch::before { background-color: #ba68c8; } input[type="radio"].Purple-400::after, input[type="checkbox"].Purple-400.switch::before { background-color: #ab47bc; } input[type="radio"].purple-500::after, input[type="checkbox"].purple-500.switch::before { background-color: #9c27b0; } input[type="radio"].purple-600::after, input[type="checkbox"].purple-600.switch::before { background-color: #8e24aa; } input[type="radio"].purple-700::after, input[type="checkbox"].purple-700.switch::before { background-color: #7b1fa2; } input[type="radio"].purple-800::after, input[type="checkbox"].purple-800.switch::before { background-color: #6a1b9a; } input[type="radio"].purple-900::after, input[type="checkbox"].purple-900.switch::before { background-color: #4a148c; } input[type="radio"].deep-purple::after, input[type="checkbox"].deep-purple.switch::before { background-color: #673ab7; } input[type="radio"].deep-purple-300::after, input[type="checkbox"].deep-purple-300.switch::before { background-color: #9575cd; } input[type="radio"].deep-purple-400::after, input[type="checkbox"].deep-purple-400.switch::before { background-color: #7e57c2; } input[type="radio"].deep-purple-500::after, input[type="checkbox"].deep-purple-500.switch::before { background-color: #673ab7; } input[type="radio"].deep-purple-600::after, input[type="checkbox"].deep-purple-600.switch::before { background-color: #5e35b1; } input[type="radio"].deep-purple-700::after, input[type="checkbox"].deep-purple-700.switch::before { background-color: #512da8; } input[type="radio"].deep-purple-800::after, input[type="checkbox"].deep-purple-800.switch::before { background-color: #4527a0; } input[type="radio"].deep-purple-900::after, input[type="checkbox"].deep-purple-900.switch::before { background-color: #311b92; } input[type="radio"].indigo::after, input[type="checkbox"].indigo.switch::before { background-color: #3f51b5; } input[type="radio"].indigo-50::after, input[type="checkbox"].indigo-50.switch::before { background-color: #e8eaf6; } input[type="radio"].indigo-100::after, input[type="checkbox"].indigo-100.switch::before { background-color: #c5cae9; } input[type="radio"].indigo-200::after, input[type="checkbox"].indigo-200.switch::before { background-color: #9fa8da; } input[type="radio"].indigo-300::after, input[type="checkbox"].indigo-300.switch::before { background-color: #7986cb; } input[type="radio"].indigo-400::after, input[type="checkbox"].indigo-400.switch::before { background-color: #5c6bc0; } input[type="radio"].indigo-500::after, input[type="checkbox"].indigo-500.switch::before { background-color: #3f51b5; } input[type="radio"].indigo-600::after, input[type="checkbox"].indigo-600.switch::before { background-color: #3949ab; } input[type="radio"].indigo-700::after, input[type="checkbox"].indigo-700.switch::before { background-color: #303f9f; } input[type="radio"].indigo-800::after, input[type="checkbox"].indigo-800.switch::before { background-color: #283593; } input[type="radio"].indigo-900::after, input[type="checkbox"].indigo-900.switch::before { background-color: #1a237e; } input[type="radio"].blue::after, input[type="checkbox"].blue.switch::before { background-color: #2196F3; } input[type="radio"].blue-50::after, input[type="checkbox"].blue-50.switch::before { background-color: #e3f2fd; } input[type="radio"].blue-100::after, input[type="checkbox"].blue-100.switch::before { background-color: #bbdefb; } input[type="radio"].blue-200::after, input[type="checkbox"].blue-200.switch::before { background-color: #90caf9; } input[type="radio"].blue-300::after, input[type="checkbox"].blue-300.switch::before { background-color: #64b5f6; } input[type="radio"].blue-400::after, input[type="checkbox"].blue-400.switch::before { background-color: #42a5f5; } input[type="radio"].blue-500::after, input[type="checkbox"].blue-500.switch::before { background-color: #2196f3; } input[type="radio"].blue-600::after, input[type="checkbox"].blue-600.switch::before { background-color: #1e88e5; } input[type="radio"].blue-700::after, input[type="checkbox"].blue-700.switch::before { background-color: #1976d2; } input[type="radio"].blue-800::after, input[type="checkbox"].blue-800.switch::before { background-color: #1565c0; } input[type="radio"].blue-900::after, input[type="checkbox"].blue-900.switch::before { background-color: #0d47a1; } input[type="radio"].light-blue::after, input[type="checkbox"].light-blue.switch::before { background-color: #03a9f4; } input[type="radio"].light-blue-50::after, input[type="checkbox"].light-blue-50.switch::before { background-color: #e1f5fe; } input[type="radio"].light-blue-100::after, input[type="checkbox"].light-blue-100.switch::before { background-color: #b3e5fc; } input[type="radio"].light-blue-200::after, input[type="checkbox"].light-blue-200.switch::before { background-color: #81d4fa; } input[type="radio"].light-blue-300::after, input[type="checkbox"].light-blue-300.switch::before { background-color: #4fc3f7; } input[type="radio"].light-blue-400::after, input[type="checkbox"].light-blue-400.switch::before { background-color: #29b6f6; } input[type="radio"].light-blue-500::after, input[type="checkbox"].light-blue-500.switch::before { background-color: #03a9f4; } input[type="radio"].light-blue-600::after, input[type="checkbox"].light-blue-600.switch::before { background-color: #039be5; } input[type="radio"].light-blue-700::after, input[type="checkbox"].light-blue-700.switch::before { background-color: #0288d1; } input[type="radio"].light-blue-800::after, input[type="checkbox"].light-blue-800.switch::before { background-color: #0277bd; } input[type="radio"].light-blue-900::after, input[type="checkbox"].light-blue-900.switch::before { background-color: #01579b; } input[type="radio"].cyan::after, input[type="checkbox"].cyan.switch::before { background-color: #00bcd4; } input[type="radio"].cyan-50::after, input[type="checkbox"].cyan-50.switch::before { background-color: #e0f7fa; } input[type="radio"].cyan-100::after, input[type="checkbox"].cyan-100.switch::before { background-color: #b2ebf2; } input[type="radio"].cyan-200::after, input[type="checkbox"].cyan-200.switch::before { background-color: #80deea; } input[type="radio"].cyan-300::after, input[type="checkbox"].cyan-300.switch::before { background-color: #4dd0e1; } input[type="radio"].cyan-400::after, input[type="checkbox"].cyan-400.switch::before { background-color: #26c6da; } input[type="radio"].cyan-500::after, input[type="checkbox"].cyan-500.switch::before { background-color: #00bcd4; } input[type="radio"].cyan-600::after, input[type="checkbox"].cyan-600.switch::before { background-color: #00acc1; } input[type="radio"].cyan-700::after, input[type="checkbox"].cyan-700.switch::before { background-color: #0097a7; } input[type="radio"].cyan-800::after, input[type="checkbox"].cyan-800.switch::before { background-color: #00838f; } input[type="radio"].cyan-900::after, input[type="checkbox"].cyan-900.switch::before { background-color: #006064; } input[type="radio"].teal::after, input[type="checkbox"].teal.switch::before { background-color: #009688; } input[type="radio"].teal-50::after, input[type="checkbox"].teal-50.switch::before { background-color: #e0f2f1; } input[type="radio"].teal-100::after, input[type="checkbox"].teal-100.switch::before { background-color: #b2dfdb; } input[type="radio"].teal-200::after, input[type="checkbox"].teal-200.switch::before { background-color: #80cbc4; } input[type="radio"].teal-300::after, input[type="checkbox"].teal-300.switch::before { background-color: #4db6ac; } input[type="radio"].teal-400::after, input[type="checkbox"].teal-400.switch::before { background-color: #26a69a; } input[type="radio"].teal-500::after, input[type="checkbox"].teal-500.switch::before { background-color: #009688; } input[type="radio"].teal-600::after, input[type="checkbox"].teal-600.switch::before { background-color: #00897b; } input[type="radio"].teal-700::after, input[type="checkbox"].teal-700.switch::before { background-color: #00796b; } input[type="radio"].teal-800::after, input[type="checkbox"].teal-800.switch::before { background-color: #00695c; } input[type="radio"].teal-900::after, input[type="checkbox"].teal-900.switch::before { background-color: #004d40; } input[type="radio"].green::after, input[type="checkbox"].green.switch::before { background-color: #4caf50; } input[type="radio"].green-50::after, input[type="checkbox"].green-50.switch::before { background-color: #e8f5e9; } input[type="radio"].green-100::after, input[type="checkbox"].green-100.switch::before { background-color: #c8e6c9; } input[type="radio"].green-200::after, input[type="checkbox"].green-200.switch::before { background-color: #a5d6a7; } input[type="radio"].green-300::after, input[type="checkbox"].green-300.switch::before { background-color: #81c784; } input[type="radio"].green-400::after, input[type="checkbox"].green-400.switch::before { background-color: #66bb6a; } input[type="radio"].green-500::after, input[type="checkbox"].green-500.switch::before { background-color: #4caf50; } input[type="radio"].green-600::after, input[type="checkbox"].green-600.switch::before { background-color: #43a047; } input[type="radio"].green-700::after, input[type="checkbox"].green-700.switch::before { background-color: #388e3c; } input[type="radio"].green-800::after, input[type="checkbox"].green-800.switch::before { background-color: #2e7d32; } input[type="radio"].green-900::after, input[type="checkbox"].green-900.switch::before { background-color: #1b5e20; } input[type="radio"].light-green::after, input[type="checkbox"].light-green.switch::before { background-color: #8bc34a; } input[type="radio"].light-green-50::after, input[type="checkbox"].light-green-50.switch::before { background-color: #f1f8e9; } input[type="radio"].light-green-100::after, input[type="checkbox"].light-green-100.switch::before { background-color: #dcedc8; } input[type="radio"].light-green-200::after, input[type="checkbox"].light-green-200.switch::before { background-color: #c5e1a5; } input[type="radio"].light-green-300::after, input[type="checkbox"].light-green-300.switch::before { background-color: #aed581; } input[type="radio"].light-green-400::after, input[type="checkbox"].light-green-400.switch::before { background-color: #9ccc65; } input[type="radio"].light-green-500::after, input[type="checkbox"].light-green-500.switch::before { background-color: #8bc34a; } input[type="radio"].light-green-600::after, input[type="checkbox"].light-green-600.switch::before { background-color: #7cb342; } input[type="radio"].light-green-700::after, input[type="checkbox"].light-green-700.switch::before { background-color: #689f38; } input[type="radio"].light-green-800::after, input[type="checkbox"].light-green-800.switch::before { background-color: #558b2f; } input[type="radio"].light-green-900::after, input[type="checkbox"].light-green-900.switch::before { background-color: #33691e; } input[type="radio"].lime::after, input[type="checkbox"].lime.switch::before { background-color: #cddc39; } input[type="radio"].lime-50::after, input[type="checkbox"].lime-50.switch::before { background-color: #f9fbe7; } input[type="radio"].lime-100::after, input[type="checkbox"].lime-100.switch::before { background-color: #f0f4c3; } input[type="radio"].lime-200::after, input[type="checkbox"].lime-200.switch::before { background-color: #e6ee9c; } input[type="radio"].lime-300::after, input[type="checkbox"].lime-300.switch::before { background-color: #dce775; } input[type="radio"].lime-400::after, input[type="checkbox"].lime-400.switch::before { background-color: #d4e157; } input[type="radio"].lime-500::after, input[type="checkbox"].lime-500.switch::before { background-color: #cddc39; } input[type="radio"].lime-600::after, input[type="checkbox"].lime-600.switch::before { background-color: #c0ca33; } input[type="radio"].lime-700::after, input[type="checkbox"].lime-700.switch::before { background-color: #afb42b; } input[type="radio"].lime-800::after, input[type="checkbox"].lime-800.switch::before { background-color: #9e9d24; } input[type="radio"].lime-900::after, input[type="checkbox"].lime-900.switch::before { background-color: #827717; } input[type="radio"].yellow::after, input[type="checkbox"].yellow.switch::before { background-color: #ffeb3b; } input[type="radio"].yellow-50::after, input[type="checkbox"].yellow-50.switch::before { background-color: #fffde7; } input[type="radio"].yellow-100::after, input[type="checkbox"].yellow-100.switch::before { background-color: #fff9c4; } input[type="radio"].yellow-200::after, input[type="checkbox"].yellow-200.switch::before { background-color: #fff59d; } input[type="radio"].yellow-300::after, input[type="checkbox"].yellow-300.switch::before { background-color: #fff176; } input[type="radio"].yellow-500::after, input[type="checkbox"].yellow-500.switch::before { background-color: #ffeb3b; } input[type="radio"].yellow-600::after, input[type="checkbox"].yellow-600.switch::before { background-color: #fdd835; } input[type="radio"].yellow-700::after, input[type="checkbox"].yellow-700.switch::before { background-color: #fbc02d; } input[type="radio"].yellow-800::after, input[type="checkbox"].yellow-800.switch::before { background-color: #f9a825; } input[type="radio"].yellow-900::after, input[type="checkbox"].yellow-900.switch::before { background-color: #f57f17; } input[type="radio"].amber-50::after, input[type="checkbox"].amber-50.switch::before { background-color: #fff8e1; } input[type="radio"].amber-100::after, input[type="checkbox"].amber-100.switch::before { background-color: #ffecb3; } input[type="radio"].amber-200::after, input[type="checkbox"].amber-200.switch::before { background-color: #ffe082; } input[type="radio"].amber-300::after, input[type="checkbox"].amber-300.switch::before { background-color: #ffd54f; } input[type="radio"].amber-500::after, input[type="checkbox"].amber-500.switch::before { background-color: #ffc107; } input[type="radio"].amber-600::after, input[type="checkbox"].amber-600.switch::before { background-color: #ffb300; } input[type="radio"].amber-700::after, input[type="checkbox"].amber-700.switch::before { background-color: #ffa000; } input[type="radio"].amber-800::after, input[type="checkbox"].amber-800.switch::before { background-color: #ff8f00; } input[type="radio"].amber-900::after, input[type="checkbox"].amber-900.switch::before { background-color: #ff6f00; } input[type="radio"].orange-50::after, input[type="checkbox"].orange-50.switch::before { background-color: #fff3e0; } input[type="radio"].orange-100::after, input[type="checkbox"].orange-100.switch::before { background-color: #ffe0b2; } input[type="radio"].orange-200::after, input[type="checkbox"].orange-200.switch::before { background-color: #ffcc80; } input[type="radio"].orange-300::after, input[type="checkbox"].orange-300.switch::before { background-color: #ffb74d; } input[type="radio"].orange-400::after, input[type="checkbox"].orange-400.switch::before { background-color: #ffa726; } input[type="radio"].orange-500::after, input[type="checkbox"].orange-500.switch::before { background-color: #ff9800; } input[type="radio"].orange-600::after, input[type="checkbox"].orange-600.switch::before { background-color: #fb8c00; } input[type="radio"].orange-700::after, input[type="checkbox"].orange-700.switch::before { background-color: #f57c00; } input[type="radio"].orange-800::after, input[type="checkbox"].orange-800.switch::before { background-color: #ef6c00; } input[type="radio"].orange-900::after, input[type="checkbox"].orange-900.switch::before { background-color: #e65100; } input[type="radio"].deep-orange::after, input[type="checkbox"].deep-orange.switch::before { background-color: #ff5722; } input[type="radio"].deep-orange-50::after, input[type="checkbox"].deep-orange-50.switch::before { background-color: #fbe9e7; } input[type="radio"].deep-orange-100::after, input[type="checkbox"].deep-orange-100.switch::before { background-color: #ffccbc; } input[type="radio"].deep-orange-200::after, input[type="checkbox"].deep-orange-200.switch::before { background-color: #ffab91; } input[type="radio"].deep-orange-300::after, input[type="checkbox"].deep-orange-300.switch::before { background-color: #ff8a65; } input[type="radio"].deep-orange-400::after, input[type="checkbox"].deep-orange-400.switch::before { background-color: #ff7043; } input[type="radio"].deep-orange-500::after, input[type="checkbox"].deep-orange-500.switch::before { background-color: #ff5722; } input[type="radio"].deep-orange-600::after, input[type="checkbox"].deep-orange-600.switch::before { background-color: #f4511e; } input[type="radio"].deep-orange-700::after, input[type="checkbox"].deep-orange-700.switch::before { background-color: #e64a19; } input[type="radio"].deep-orange-800::after, input[type="checkbox"].deep-orange-800.switch::before { background-color: #d84315; } input[type="radio"].deep-orange-900::after, input[type="checkbox"].deep-orange-900.switch::before { background-color: #bf360c; } input[type="radio"].brown::after, input[type="checkbox"].brown.switch::before { background-color: #795548; } input[type="radio"].brown-50::after, input[type="checkbox"].brown-50.switch::before { background-color: #efebe9; } input[type="radio"].brown-100::after, input[type="checkbox"].brown-100.switch::before { background-color: #d7ccc8; } input[type="radio"].brown-200::after, input[type="checkbox"].brown-200.switch::before { background-color: #bcaaa4; } input[type="radio"].brown-300::after, input[type="checkbox"].brown-300.switch::before { background-color: #a1887f; } input[type="radio"].brown-400::after, input[type="checkbox"].brown-400.switch::before { background-color: #8d6e63; } input[type="radio"].brown-500::after, input[type="checkbox"].brown-500.switch::before { background-color: #795548; } input[type="radio"].brown-600::after, input[type="checkbox"].brown-600.switch::before { background-color: #6d4c41; } input[type="radio"].brown-700::after, input[type="checkbox"].brown-700.switch::before { background-color: #5d4037; } input[type="radio"].brown-800::after, input[type="checkbox"].brown-800.switch::before { background-color: #4e342e; } input[type="radio"].brown-900::after, input[type="checkbox"].brown-900.switch::before { background-color: #3e2723; } input[type="radio"].grey::after, input[type="checkbox"].grey.switch::before { background-color: #9e9e9e; } input[type="radio"].grey-50::after, input[type="checkbox"].grey-50.switch::before { background-color: #fafafa; } input[type="radio"].grey-100::after, input[type="checkbox"].grey-100.switch::before { background-color: #f5f5f5; } input[type="radio"].grey-200::after, input[type="checkbox"].grey-200.switch::before { background-color: #eee; } input[type="radio"].grey-300::after, input[type="checkbox"].grey-300.switch::before { background-color: #e0e0e0; } input[type="radio"].grey-400::after, input[type="checkbox"].grey-400.switch::before { background-color: #bdbdbd; } input[type="radio"].grey-500::after, input[type="checkbox"].grey-500.switch::before { background-color: #9e9e9e; } input[type="radio"].grey-600::after, input[type="checkbox"].grey-600.switch::before { background-color: #757575; } input[type="radio"].grey-700::after, input[type="checkbox"].grey-700.switch::before { background-color: #616161; } input[type="radio"].grey-800::after, input[type="checkbox"].grey-800.switch::before { background-color: #424242; } input[type="radio"].grey-900::after, input[type="checkbox"].grey-900.switch::before { background-color: #212121; } input[type="radio"].blue-grey::after, input[type="checkbox"].blue-grey.switch::before { background-color: #607d8b; } input[type="radio"].blue-grey-50::after, input[type="checkbox"].blue-grey-50.switch::before { background-color: #eceff1; } input[type="radio"].blue-grey-100::after, input[type="checkbox"].blue-grey-100.switch::before { background-color: #cfd8dc; } input[type="radio"].blue-grey-200::after, input[type="checkbox"].blue-grey-200.switch::before { background-color: #b0bec5; } input[type="radio"].blue-grey-300::after, input[type="checkbox"].blue-grey-300.switch::before { background-color: #90a4ae; } input[type="radio"].blue-grey-400::after, input[type="checkbox"].blue-grey-400.switch::before { background-color: #78909c; } input[type="radio"].blue-grey-500::after, input[type="checkbox"].blue-grey-500.switch::before { background-color: #607d8b; } input[type="radio"].blue-grey-600::after, input[type="checkbox"].blue-grey-600.switch::before { background-color: #546e7a; } input[type="radio"].blue-grey-700::after, input[type="checkbox"].blue-grey-700.switch::before { background-color: #455a64; } input[type="radio"].blue-grey-800::after, input[type="checkbox"].blue-grey-800.switch::before { background-color: #37474f; } input[type="radio"].blue-grey-900::after, input[type="checkbox"].blue-grey-900.switch::before { background-color: #263238; } input[type="radio"].black::after, input[type="checkbox"].black.switch::before { background-color: #000; } .platform-ios input[type="radio"].red-50::before { border-color: #ffebee; } .platform-ios input[type="radio"].red-100::before { border-color: #ffcdd2; } .platform-ios input[type="radio"].red-200::before { border-color: #ef9a9a; } .platform-ios input[type="radio"].red-300::before { border-color: #e57373; } .platform-ios input[type="radio"].red-400::before { border-color: #ef5350; } .platform-ios input[type="radio"].red-500::before { border-color: #f44336; } .platform-ios input[type="radio"].red-600::before { border-color: #e53935; } .platform-ios input[type="radio"].red-700::before { border-color: #d32f2f; } .platform-ios input[type="radio"].red-800::before { border-color: #c62828; } .platform-ios input[type="radio"].red-900::before { border-color: #b71c1c; } .platform-ios input[type="radio"].pink::before { border-color: #E91E63; } .platform-ios input[type="radio"].pink-50::before { border-color: #fce4ec; } .platform-ios input[type="radio"].pink-100::before { border-color: #f8bbd0; } .platform-ios input[type="radio"].pink-200::before { border-color: #f48fb1; } .platform-ios input[type="radio"].Pink-300::before { border-color: #f06292; } .platform-ios input[type="radio"].pink-400::before { border-color: #ec407a; } .platform-ios input[type="radio"].pink-500::before { border-color: #e91e63; } .platform-ios input[type="radio"].pink-600::before { border-color: #d81b60; } .platform-ios input[type="radio"].pink-700::before { border-color: #c2185b; } .platform-ios input[type="radio"].pink-800::before { border-color: #ad1457; } .platform-ios input[type="radio"].pink-900::before { border-color: #880e4f; } .platform-ios input[type="radio"].purple::before { border-color: #9c27b0; } .platform-ios input[type="radio"].purple-50::before { border-color: #f3e5f5; } .platform-ios input[type="radio"].purple-100::before { border-color: #e1bee7; } .platform-ios input[type="radio"].purple-200::before { border-color: #ce93d8; } .platform-ios input[type="radio"].Purple-300::before { border-color: #ba68c8; } .platform-ios input[type="radio"].Purple-400::before { border-color: #ab47bc; } .platform-ios input[type="radio"].purple-500::before { border-color: #9c27b0; } .platform-ios input[type="radio"].purple-600::before { border-color: #8e24aa; } .platform-ios input[type="radio"].purple-700::before { border-color: #7b1fa2; } .platform-ios input[type="radio"].purple-800::before { border-color: #6a1b9a; } .platform-ios input[type="radio"].purple-900::before { border-color: #4a148c; } .platform-ios input[type="radio"].deep-purple::before { border-color: #673ab7; } .platform-ios input[type="radio"].deep-purple-300::before { border-color: #9575cd; } .platform-ios input[type="radio"].deep-purple-400::before { border-color: #7e57c2; } .platform-ios input[type="radio"].deep-purple-500::before { border-color: #673ab7; } .platform-ios input[type="radio"].deep-purple-600::before { border-color: #5e35b1; } .platform-ios input[type="radio"].deep-purple-700::before { border-color: #512da8; } .platform-ios input[type="radio"].deep-purple-800::before { border-color: #4527a0; } .platform-ios input[type="radio"].deep-purple-900::before { border-color: #311b92; } .platform-ios input[type="radio"].indigo::before { border-color: #3f51b5; } .platform-ios input[type="radio"].indigo-50::before { border-color: #e8eaf6; } .platform-ios input[type="radio"].indigo-100::before { border-color: #c5cae9; } .platform-ios input[type="radio"].indigo-200::before { border-color: #9fa8da; } .platform-ios input[type="radio"].indigo-300::before { border-color: #7986cb; } .platform-ios input[type="radio"].indigo-400::before { border-color: #5c6bc0; } .platform-ios input[type="radio"].indigo-500::before { border-color: #3f51b5; } .platform-ios input[type="radio"].indigo-600::before { border-color: #3949ab; } .platform-ios input[type="radio"].indigo-700::before { border-color: #303f9f; } .platform-ios input[type="radio"].indigo-800::before { border-color: #283593; } .platform-ios input[type="radio"].indigo-900::before { border-color: #1a237e; } .platform-ios input[type="radio"].blue::before { border-color: #2196F3; } .platform-ios input[type="radio"].blue-50::before { border-color: #e3f2fd; } .platform-ios input[type="radio"].blue-100::before { border-color: #bbdefb; } .platform-ios input[type="radio"].blue-200::before { border-color: #90caf9; } .platform-ios input[type="radio"].blue-300::before { border-color: #64b5f6; } .platform-ios input[type="radio"].blue-400::before { border-color: #42a5f5; } .platform-ios input[type="radio"].blue-500::before { border-color: #2196f3; } .platform-ios input[type="radio"].blue-600::before { border-color: #1e88e5; } .platform-ios input[type="radio"].blue-700::before { border-color: #1976d2; } .platform-ios input[type="radio"].blue-800::before { border-color: #1565c0; } .platform-ios input[type="radio"].blue-900::before { border-color: #0d47a1; } .platform-ios input[type="radio"].light-blue::before { border-color: #03a9f4; } .platform-ios input[type="radio"].light-blue-50::before { border-color: #e1f5fe; } .platform-ios input[type="radio"].light-blue-100::before { border-color: #b3e5fc; } .platform-ios input[type="radio"].light-blue-200::before { border-color: #81d4fa; } .platform-ios input[type="radio"].light-blue-300::before { border-color: #4fc3f7; } .platform-ios input[type="radio"].light-blue-400::before { border-color: #29b6f6; } .platform-ios input[type="radio"].light-blue-500::before { border-color: #03a9f4; } .platform-ios input[type="radio"].light-blue-600::before { border-color: #039be5; } .platform-ios input[type="radio"].light-blue-700::before { border-color: #0288d1; } .platform-ios input[type="radio"].light-blue-800::before { border-color: #0277bd; } .platform-ios input[type="radio"].light-blue-900::before { border-color: #01579b; } .platform-ios input[type="radio"].cyan::before { border-color: #00bcd4; } .platform-ios input[type="radio"].cyan-50::before { border-color: #e0f7fa; } .platform-ios input[type="radio"].cyan-100::before { border-color: #b2ebf2; } .platform-ios input[type="radio"].cyan-200::before { border-color: #80deea; } .platform-ios input[type="radio"].cyan-300::before { border-color: #4dd0e1; } .platform-ios input[type="radio"].cyan-400::before { border-color: #26c6da; } .platform-ios input[type="radio"].cyan-500::before { border-color: #00bcd4; } .platform-ios input[type="radio"].cyan-600::before { border-color: #00acc1; } .platform-ios input[type="radio"].cyan-700::before { border-color: #0097a7; } .platform-ios input[type="radio"].cyan-800::before { border-color: #00838f; } .platform-ios input[type="radio"].cyan-900::before { border-color: #006064; } .platform-ios input[type="radio"].teal::before { border-color: #009688; } .platform-ios input[type="radio"].teal-50::before { border-color: #e0f2f1; } .platform-ios input[type="radio"].teal-100::before { border-color: #b2dfdb; } .platform-ios input[type="radio"].teal-200::before { border-color: #80cbc4; } .platform-ios input[type="radio"].teal-300::before { border-color: #4db6ac; } .platform-ios input[type="radio"].teal-400::before { border-color: #26a69a; } .platform-ios input[type="radio"].teal-500::before { border-color: #009688; } .platform-ios input[type="radio"].teal-600::before { border-color: #00897b; } .platform-ios input[type="radio"].teal-700::before { border-color: #00796b; } .platform-ios input[type="radio"].teal-800::before { border-color: #00695c; } .platform-ios input[type="radio"].teal-900::before { border-color: #004d40; } .platform-ios input[type="radio"].green::before { border-color: #4caf50; } .platform-ios input[type="radio"].green-50::before { border-color: #e8f5e9; } .platform-ios input[type="radio"].green-100::before { border-color: #c8e6c9; } .platform-ios input[type="radio"].green-200::before { border-color: #a5d6a7; } .platform-ios input[type="radio"].green-300::before { border-color: #81c784; } .platform-ios input[type="radio"].green-400::before { border-color: #66bb6a; } .platform-ios input[type="radio"].green-500::before { border-color: #4caf50; } .platform-ios input[type="radio"].green-600::before { border-color: #43a047; } .platform-ios input[type="radio"].green-700::before { border-color: #388e3c; } .platform-ios input[type="radio"].green-800::before { border-color: #2e7d32; } .platform-ios input[type="radio"].green-900::before { border-color: #1b5e20; } .platform-ios input[type="radio"].light-green::before { border-color: #8bc34a; } .platform-ios input[type="radio"].light-green-50::before { border-color: #f1f8e9; } .platform-ios input[type="radio"].light-green-100::before { border-color: #dcedc8; } .platform-ios input[type="radio"].light-green-200::before { border-color: #c5e1a5; } .platform-ios input[type="radio"].light-green-300::before { border-color: #aed581; } .platform-ios input[type="radio"].light-green-400::before { border-color: #9ccc65; } .platform-ios input[type="radio"].light-green-500::before { border-color: #8bc34a; } .platform-ios input[type="radio"].light-green-600::before { border-color: #7cb342; } .platform-ios input[type="radio"].light-green-700::before { border-color: #689f38; } .platform-ios input[type="radio"].light-green-800::before { border-color: #558b2f; } .platform-ios input[type="radio"].light-green-900::before { border-color: #33691e; } .platform-ios input[type="radio"].lime::before { border-color: #cddc39; } .platform-ios input[type="radio"].lime-50::before { border-color: #f9fbe7; } .platform-ios input[type="radio"].lime-100::before { border-color: #f0f4c3; } .platform-ios input[type="radio"].lime-200::before { border-color: #e6ee9c; } .platform-ios input[type="radio"].lime-300::before { border-color: #dce775; } .platform-ios input[type="radio"].lime-400::before { border-color: #d4e157; } .platform-ios input[type="radio"].lime-500::before { border-color: #cddc39; } .platform-ios input[type="radio"].lime-600::before { border-color: #c0ca33; } .platform-ios input[type="radio"].lime-700::before { border-color: #afb42b; } .platform-ios input[type="radio"].lime-800::before { border-color: #9e9d24; } .platform-ios input[type="radio"].lime-900::before { border-color: #827717; } .platform-ios input[type="radio"].yellow::before { border-color: #ffeb3b; } .platform-ios input[type="radio"].yellow-50::before { border-color: #fffde7; } .platform-ios input[type="radio"].yellow-100::before { border-color: #fff9c4; } .platform-ios input[type="radio"].yellow-200::before { border-color: #fff59d; } .platform-ios input[type="radio"].yellow-300::before { border-color: #fff176; } .platform-ios input[type="radio"].yellow-500::before { border-color: #ffeb3b; } .platform-ios input[type="radio"].yellow-600::before { border-color: #fdd835; } .platform-ios input[type="radio"].yellow-700::before { border-color: #fbc02d; } .platform-ios input[type="radio"].yellow-800::before { border-color: #f9a825; } .platform-ios input[type="radio"].yellow-900::before { border-color: #f57f17; } .platform-ios input[type="radio"].amber-50::before { border-color: #fff8e1; } .platform-ios input[type="radio"].amber-100::before { border-color: #ffecb3; } .platform-ios input[type="radio"].amber-200::before { border-color: #ffe082; } .platform-ios input[type="radio"].amber-300::before { border-color: #ffd54f; } .platform-ios input[type="radio"].amber-500::before { border-color: #ffc107; } .platform-ios input[type="radio"].amber-600::before { border-color: #ffb300; } .platform-ios input[type="radio"].amber-700::before { border-color: #ffa000; } .platform-ios input[type="radio"].amber-800::before { border-color: #ff8f00; } .platform-ios input[type="radio"].amber-900::before { border-color: #ff6f00; } .platform-ios input[type="radio"].orange-50::before { border-color: #fff3e0; } .platform-ios input[type="radio"].orange-100::before { border-color: #ffe0b2; } .platform-ios input[type="radio"].orange-200::before { border-color: #ffcc80; } .platform-ios input[type="radio"].orange-300::before { border-color: #ffb74d; } .platform-ios input[type="radio"].orange-400::before { border-color: #ffa726; } .platform-ios input[type="radio"].orange-500::before { border-color: #ff9800; } .platform-ios input[type="radio"].orange-600::before { border-color: #fb8c00; } .platform-ios input[type="radio"].orange-700::before { border-color: #f57c00; } .platform-ios input[type="radio"].orange-800::before { border-color: #ef6c00; } .platform-ios input[type="radio"].orange-900::before { border-color: #e65100; } .platform-ios input[type="radio"].deep-orange::before { border-color: #ff5722; } .platform-ios input[type="radio"].deep-orange-50::before { border-color: #fbe9e7; } .platform-ios input[type="radio"].deep-orange-100::before { border-color: #ffccbc; } .platform-ios input[type="radio"].deep-orange-200::before { border-color: #ffab91; } .platform-ios input[type="radio"].deep-orange-300::before { border-color: #ff8a65; } .platform-ios input[type="radio"].deep-orange-400::before { border-color: #ff7043; } .platform-ios input[type="radio"].deep-orange-500::before { border-color: #ff5722; } .platform-ios input[type="radio"].deep-orange-600::before { border-color: #f4511e; } .platform-ios input[type="radio"].deep-orange-700::before { border-color: #e64a19; } .platform-ios input[type="radio"].deep-orange-800::before { border-color: #d84315; } .platform-ios input[type="radio"].deep-orange-900::before { border-color: #bf360c; } .platform-ios input[type="radio"].brown::before { border-color: #795548; } .platform-ios input[type="radio"].brown-50::before { border-color: #efebe9; } .platform-ios input[type="radio"].brown-100::before { border-color: #d7ccc8; } .platform-ios input[type="radio"].brown-200::before { border-color: #bcaaa4; } .platform-ios input[type="radio"].brown-300::before { border-color: #a1887f; } .platform-ios input[type="radio"].brown-400::before { border-color: #8d6e63; } .platform-ios input[type="radio"].brown-500::before { border-color: #795548; } .platform-ios input[type="radio"].brown-600::before { border-color: #6d4c41; } .platform-ios input[type="radio"].brown-700::before { border-color: #5d4037; } .platform-ios input[type="radio"].brown-800::before { border-color: #4e342e; } .platform-ios input[type="radio"].brown-900::before { border-color: #3e2723; } .platform-ios input[type="radio"].grey::before { border-color: #9e9e9e; } .platform-ios input[type="radio"].grey-50::before { border-color: #fafafa; } .platform-ios input[type="radio"].grey-100::before { border-color: #f5f5f5; } .platform-ios input[type="radio"].grey-200::before { border-color: #eee; } .platform-ios input[type="radio"].grey-300::before { border-color: #e0e0e0; } .platform-ios input[type="radio"].grey-400::before { border-color: #bdbdbd; } .platform-ios input[type="radio"].grey-500::before { border-color: #9e9e9e; } .platform-ios input[type="radio"].grey-600::before { border-color: #757575; } .platform-ios input[type="radio"].grey-700::before { border-color: #616161; } .platform-ios input[type="radio"].grey-800::before { border-color: #424242; } .platform-ios input[type="radio"].grey-900::before { border-color: #212121; } .platform-ios input[type="radio"].blue-grey::before { border-color: #607d8b; } .platform-ios input[type="radio"].blue-grey-50::before { border-color: #eceff1; } .platform-ios input[type="radio"].blue-grey-100::before { border-color: #cfd8dc; } .platform-ios input[type="radio"].blue-grey-200::before { border-color: #b0bec5; } .platform-ios input[type="radio"].blue-grey-300::before { border-color: #90a4ae; } .platform-ios input[type="radio"].blue-grey-400::before { border-color: #78909c; } .platform-ios input[type="radio"].blue-grey-500::before { border-color: #607d8b; } .platform-ios input[type="radio"].blue-grey-600::before { border-color: #546e7a; } .platform-ios input[type="radio"].blue-grey-700::before { border-color: #455a64; } .platform-ios input[type="radio"].blue-grey-800::before { border-color: #37474f; } .platform-ios input[type="radio"].blue-grey-900::before { border-color: #263238; } .platform-ios input[type="radio"].black::before { border-color: #000; } ================================================ FILE: jquery/component.json ================================================ { "name":"jquery", "author": "madrobby", "dependencies": [] } ================================================ FILE: jquery/index.html ================================================

jQuery

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.

To work on mobile devices requires a light and fast version of the frameworks for JavaScript, so MobileUI is equipped with Zepto.js.

Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.

To use this component you need install with the command:

mobileui install jquery

See the Zepto documentation and its resources at zeptojs.com.

================================================ FILE: jquery/script.js ================================================ /* Zepto v1.2.0 - zepto event ajax form ie - zeptojs.com/license */ (function(global, factory) { if (typeof define === 'function' && define.amd) define(function() { return factory(global) }) else factory(global) }(this, function(window) { var Zepto = (function() { var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice, document = window.document, elementDisplay = {}, classCache = {}, cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, fragmentRE = /^\s*<(\w+|!)[^>]*>/, singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rootNodeRE = /^(?:body|html)$/i, capitalRE = /([A-Z])/g, // special attributes that should be get/set via method calls methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], table = document.createElement('table'), tableRow = document.createElement('tr'), containers = { 'tr': document.createElement('tbody'), 'tbody': table, 'thead': table, 'tfoot': table, 'td': tableRow, 'th': tableRow, '*': document.createElement('div') }, readyRE = /complete|loaded|interactive/, simpleSelectorRE = /^[\w-]*$/, class2type = {}, toString = class2type.toString, zepto = {}, camelize, uniq, tempParent = document.createElement('div'), propMap = { 'tabindex': 'tabIndex', 'readonly': 'readOnly', 'for': 'htmlFor', 'class': 'className', 'maxlength': 'maxLength', 'cellspacing': 'cellSpacing', 'cellpadding': 'cellPadding', 'rowspan': 'rowSpan', 'colspan': 'colSpan', 'usemap': 'useMap', 'frameborder': 'frameBorder', 'contenteditable': 'contentEditable' }, isArray = Array.isArray || function(object){ return object instanceof Array } zepto.matches = function(element, selector) { if (!selector || !element || element.nodeType !== 1) return false var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector if (matchesSelector) return matchesSelector.call(element, selector) // fall back to performing a selector: var match, parent = element.parentNode, temp = !parent if (temp) (parent = tempParent).appendChild(element) match = ~zepto.qsa(parent, selector).indexOf(element) temp && tempParent.removeChild(element) return match } function type(obj) { return obj == null ? String(obj) : class2type[toString.call(obj)] || "object" } function isFunction(value) { return type(value) == "function" } function isWindow(obj) { return obj != null && obj == obj.window } function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } function isObject(obj) { return type(obj) == "object" } function isPlainObject(obj) { return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype } function likeArray(obj) { var length = !!obj && 'length' in obj && obj.length, type = $.type(obj) return 'function' != type && !isWindow(obj) && ( 'array' == type || length === 0 || (typeof length == 'number' && length > 0 && (length - 1) in obj) ) } function compact(array) { return filter.call(array, function(item){ return item != null }) } function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } function dasherize(str) { return str.replace(/::/g, '/') .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') .replace(/([a-z\d])([A-Z])/g, '$1_$2') .replace(/_/g, '-') .toLowerCase() } uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } function classRE(name) { return name in classCache ? classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) } function maybeAddPx(name, value) { return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value } function defaultDisplay(nodeName) { var element, display if (!elementDisplay[nodeName]) { element = document.createElement(nodeName) document.body.appendChild(element) display = getComputedStyle(element, '').getPropertyValue("display") element.parentNode.removeChild(element) display == "none" && (display = "block") elementDisplay[nodeName] = display } return elementDisplay[nodeName] } function children(element) { return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) } function Z(dom, selector) { var i, len = dom ? dom.length : 0 for (i = 0; i < len; i++) this[i] = dom[i] this.length = len this.selector = selector || '' } // `$.zepto.fragment` takes a html string and an optional tag name // to generate DOM nodes from the given html string. // The generated DOM nodes are returned as an array. // This function can be overridden in plugins for example to make // it compatible with browsers that don't support the DOM fully. zepto.fragment = function(html, name, properties) { var dom, nodes, container // A special case optimization for a single tag if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1)) if (!dom) { if (html.replace) html = html.replace(tagExpanderRE, "<$1>") if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 if (!(name in containers)) name = '*' container = containers[name] container.innerHTML = '' + html dom = $.each(slice.call(container.childNodes), function(){ container.removeChild(this) }) } if (isPlainObject(properties)) { nodes = $(dom) $.each(properties, function(key, value) { if (methodAttributes.indexOf(key) > -1) nodes[key](value) else nodes.attr(key, value) }) } return dom } // `$.zepto.Z` swaps out the prototype of the given `dom` array // of nodes with `$.fn` and thus supplying all the Zepto functions // to the array. This method can be overridden in plugins. zepto.Z = function(dom, selector) { return new Z(dom, selector) } // `$.zepto.isZ` should return `true` if the given object is a Zepto // collection. This method can be overridden in plugins. zepto.isZ = function(object) { return object instanceof zepto.Z } // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and // takes a CSS selector and an optional context (and handles various // special cases). // This method can be overridden in plugins. zepto.init = function(selector, context) { var dom // If nothing given, return an empty Zepto collection if (!selector) return zepto.Z() // Optimize for string selectors else if (typeof selector == 'string') { selector = selector.trim() // If it's a html fragment, create nodes from it // Note: In both Chrome 21 and Firefox 15, DOM error 12 // is thrown if the fragment doesn't begin with < if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // If it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // If a function is given, call it when the DOM is ready else if (isFunction(selector)) return $(document).ready(selector) // If a Zepto collection is given, just return it else if (zepto.isZ(selector)) return selector else { // normalize array if an array of nodes is given if (isArray(selector)) dom = compact(selector) // Wrap DOM nodes. else if (isObject(selector)) dom = [selector], selector = null // If it's a html fragment, create nodes from it else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // And last but no least, if it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // create a new Zepto collection from the nodes found return zepto.Z(dom, selector) } // `$` will be the base `Zepto` object. When calling this // function just call `$.zepto.init, which makes the implementation // details of selecting nodes and creating Zepto collections // patchable in plugins. $ = function(selector, context){ return zepto.init(selector, context) } function extend(target, source, deep) { for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {} if (isArray(source[key]) && !isArray(target[key])) target[key] = [] extend(target[key], source[key], deep) } else if (source[key] !== undefined) target[key] = source[key] } // Copy all but undefined properties from one or more // objects to the `target` object. $.extend = function(target){ var deep, args = slice.call(arguments, 1) if (typeof target == 'boolean') { deep = target target = args.shift() } args.forEach(function(arg){ extend(target, arg, deep) }) return target } // `$.zepto.qsa` is Zepto's CSS selector implementation which // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. // This method can be overridden in plugins. zepto.qsa = function(element, selector){ var found, maybeID = selector[0] == '#', maybeClass = !maybeID && selector[0] == '.', nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked isSimple = simpleSelectorRE.test(nameOnly) return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById ( (found = element.getElementById(nameOnly)) ? [found] : [] ) : (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] : slice.call( isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class element.getElementsByTagName(selector) : // Or a tag element.querySelectorAll(selector) // Or it's not simple, and we need to query all ) } function filtered(nodes, selector) { return selector == null ? $(nodes) : $(nodes).filter(selector) } $.contains = document.documentElement.contains ? function(parent, node) { return parent !== node && parent.contains(node) } : function(parent, node) { while (node && (node = node.parentNode)) if (node === parent) return true return false } function funcArg(context, arg, idx, payload) { return isFunction(arg) ? arg.call(context, idx, payload) : arg } function setAttribute(node, name, value) { value == null ? node.removeAttribute(name) : node.setAttribute(name, value) } // access className property while respecting SVGAnimatedString function className(node, value){ var klass = node.className || '', svg = klass && klass.baseVal !== undefined if (value === undefined) return svg ? klass.baseVal : klass svg ? (klass.baseVal = value) : (node.className = value) } // "true" => true // "false" => false // "null" => null // "42" => 42 // "42.5" => 42.5 // "08" => "08" // JSON => parse if valid // String => self function deserializeValue(value) { try { return value ? value == "true" || ( value == "false" ? false : value == "null" ? null : +value + "" == value ? +value : /^[\[\{]/.test(value) ? $.parseJSON(value) : value ) : value } catch(e) { return value } } $.type = type $.isFunction = isFunction $.isWindow = isWindow $.isArray = isArray $.isPlainObject = isPlainObject $.isEmptyObject = function(obj) { var name for (name in obj) return false return true } $.isNumeric = function(val) { var num = Number(val), type = typeof val return val != null && type != 'boolean' && (type != 'string' || val.length) && !isNaN(num) && isFinite(num) || false } $.inArray = function(elem, array, i){ return emptyArray.indexOf.call(array, elem, i) } $.camelCase = camelize $.trim = function(str) { return str == null ? "" : String.prototype.trim.call(str) } // plugin compatibility $.uuid = 0 $.support = { } $.expr = { } $.noop = function() {} $.map = function(elements, callback){ var value, values = [], i, key if (likeArray(elements)) for (i = 0; i < elements.length; i++) { value = callback(elements[i], i) if (value != null) values.push(value) } else for (key in elements) { value = callback(elements[key], key) if (value != null) values.push(value) } return flatten(values) } $.each = function(elements, callback){ var i, key if (likeArray(elements)) { for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements } else { for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements } return elements } $.grep = function(elements, callback){ return filter.call(elements, callback) } if (window.JSON) $.parseJSON = JSON.parse // Populate the class2type map $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase() }) // Define methods that will be available on all // Zepto collections $.fn = { constructor: zepto.Z, length: 0, // Because a collection acts like an array // copy over these useful array functions. forEach: emptyArray.forEach, reduce: emptyArray.reduce, push: emptyArray.push, sort: emptyArray.sort, splice: emptyArray.splice, indexOf: emptyArray.indexOf, concat: function(){ var i, value, args = [] for (i = 0; i < arguments.length; i++) { value = arguments[i] args[i] = zepto.isZ(value) ? value.toArray() : value } return concat.apply(zepto.isZ(this) ? this.toArray() : this, args) }, // `map` and `slice` in the jQuery API work differently // from their array counterparts map: function(fn){ return $($.map(this, function(el, i){ return fn.call(el, i, el) })) }, slice: function(){ return $(slice.apply(this, arguments)) }, ready: function(callback){ // need to check if document.body exists for IE as that browser reports // document ready when it hasn't yet created the body element if (readyRE.test(document.readyState) && document.body) callback($) else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) return this }, get: function(idx){ return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] }, toArray: function(){ return this.get() }, size: function(){ return this.length }, remove: function(){ return this.each(function(){ if (this.parentNode != null) this.parentNode.removeChild(this) }) }, each: function(callback){ emptyArray.every.call(this, function(el, idx){ return callback.call(el, idx, el) !== false }) return this }, filter: function(selector){ if (isFunction(selector)) return this.not(this.not(selector)) return $(filter.call(this, function(element){ return zepto.matches(element, selector) })) }, add: function(selector,context){ return $(uniq(this.concat($(selector,context)))) }, is: function(selector){ return this.length > 0 && zepto.matches(this[0], selector) }, not: function(selector){ var nodes=[] if (isFunction(selector) && selector.call !== undefined) this.each(function(idx){ if (!selector.call(this,idx)) nodes.push(this) }) else { var excludes = typeof selector == 'string' ? this.filter(selector) : (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) this.forEach(function(el){ if (excludes.indexOf(el) < 0) nodes.push(el) }) } return $(nodes) }, has: function(selector){ return this.filter(function(){ return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size() }) }, eq: function(idx){ return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) }, first: function(){ var el = this[0] return el && !isObject(el) ? el : $(el) }, last: function(){ var el = this[this.length - 1] return el && !isObject(el) ? el : $(el) }, find: function(selector){ var result, $this = this if (!selector) result = $() else if (typeof selector == 'object') result = $(selector).filter(function(){ var node = this return emptyArray.some.call($this, function(parent){ return $.contains(parent, node) }) }) else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) else result = this.map(function(){ return zepto.qsa(this, selector) }) return result }, closest: function(selector, context){ var nodes = [], collection = typeof selector == 'object' && $(selector) this.each(function(_, node){ while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode if (node && nodes.indexOf(node) < 0) nodes.push(node) }) return $(nodes) }, parents: function(selector){ var ancestors = [], nodes = this while (nodes.length > 0) nodes = $.map(nodes, function(node){ if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { ancestors.push(node) return node } }) return filtered(ancestors, selector) }, parent: function(selector){ return filtered(uniq(this.pluck('parentNode')), selector) }, children: function(selector){ return filtered(this.map(function(){ return children(this) }), selector) }, contents: function() { return this.map(function() { return this.contentDocument || slice.call(this.childNodes) }) }, siblings: function(selector){ return filtered(this.map(function(i, el){ return filter.call(children(el.parentNode), function(child){ return child!==el }) }), selector) }, empty: function(){ return this.each(function(){ this.innerHTML = '' }) }, // `pluck` is borrowed from Prototype.js pluck: function(property){ return $.map(this, function(el){ return el[property] }) }, show: function(){ return this.each(function(){ this.style.display == "none" && (this.style.display = '') if (getComputedStyle(this, '').getPropertyValue("display") == "none") this.style.display = defaultDisplay(this.nodeName) }) }, replaceWith: function(newContent){ return this.before(newContent).remove() }, wrap: function(structure){ var func = isFunction(structure) if (this[0] && !func) var dom = $(structure).get(0), clone = dom.parentNode || this.length > 1 return this.each(function(index){ $(this).wrapAll( func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom ) }) }, wrapAll: function(structure){ if (this[0]) { $(this[0]).before(structure = $(structure)) var children // drill down to the inmost element while ((children = structure.children()).length) structure = children.first() $(structure).append(this) } return this }, wrapInner: function(structure){ var func = isFunction(structure) return this.each(function(index){ var self = $(this), contents = self.contents(), dom = func ? structure.call(this, index) : structure contents.length ? contents.wrapAll(dom) : self.append(dom) }) }, unwrap: function(){ this.parent().each(function(){ $(this).replaceWith($(this).children()) }) return this }, clone: function(){ return this.map(function(){ return this.cloneNode(true) }) }, hide: function(){ return this.css("display", "none") }, toggle: function(setting){ return this.each(function(){ var el = $(this) ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() }) }, prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, html: function(html){ return 0 in arguments ? this.each(function(idx){ var originHtml = this.innerHTML $(this).empty().append( funcArg(this, html, idx, originHtml) ) }) : (0 in this ? this[0].innerHTML : null) }, text: function(text){ return 0 in arguments ? this.each(function(idx){ var newText = funcArg(this, text, idx, this.textContent) this.textContent = newText == null ? '' : ''+newText }) : (0 in this ? this.pluck('textContent').join("") : null) }, attr: function(name, value){ var result return (typeof name == 'string' && !(1 in arguments)) ? (0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined) : this.each(function(idx){ if (this.nodeType !== 1) return if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) }) }, removeAttr: function(name){ return this.each(function(){ this.nodeType === 1 && name.split(' ').forEach(function(attribute){ setAttribute(this, attribute) }, this)}) }, prop: function(name, value){ name = propMap[name] || name return (1 in arguments) ? this.each(function(idx){ this[name] = funcArg(this, value, idx, this[name]) }) : (this[0] && this[0][name]) }, removeProp: function(name){ name = propMap[name] || name return this.each(function(){ delete this[name] }) }, data: function(name, value){ var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase() var data = (1 in arguments) ? this.attr(attrName, value) : this.attr(attrName) return data !== null ? deserializeValue(data) : undefined }, val: function(value){ if (0 in arguments) { if (value == null) value = "" return this.each(function(idx){ this.value = funcArg(this, value, idx, this.value) }) } else { return this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') : this[0].value) } }, offset: function(coordinates){ if (coordinates) return this.each(function(index){ var $this = $(this), coords = funcArg(this, coordinates, index, $this.offset()), parentOffset = $this.offsetParent().offset(), props = { top: coords.top - parentOffset.top, left: coords.left - parentOffset.left } if ($this.css('position') == 'static') props['position'] = 'relative' $this.css(props) }) if (!this.length) return null if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0])) return {top: 0, left: 0} var obj = this[0].getBoundingClientRect() return { left: obj.left + window.pageXOffset, top: obj.top + window.pageYOffset, width: Math.round(obj.width), height: Math.round(obj.height) } }, css: function(property, value){ if (arguments.length < 2) { var element = this[0] if (typeof property == 'string') { if (!element) return return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property) } else if (isArray(property)) { if (!element) return var props = {} var computedStyle = getComputedStyle(element, '') $.each(property, function(_, prop){ props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop)) }) return props } } var css = '' if (type(property) == 'string') { if (!value && value !== 0) this.each(function(){ this.style.removeProperty(dasherize(property)) }) else css = dasherize(property) + ":" + maybeAddPx(property, value) } else { for (key in property) if (!property[key] && property[key] !== 0) this.each(function(){ this.style.removeProperty(dasherize(key)) }) else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' } return this.each(function(){ this.style.cssText += ';' + css }) }, index: function(element){ return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) }, hasClass: function(name){ if (!name) return false return emptyArray.some.call(this, function(el){ return this.test(className(el)) }, classRE(name)) }, addClass: function(name){ if (!name) return this return this.each(function(idx){ if (!('className' in this)) return classList = [] var cls = className(this), newName = funcArg(this, name, idx, cls) newName.split(/\s+/g).forEach(function(klass){ if (!$(this).hasClass(klass)) classList.push(klass) }, this) classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) }) }, removeClass: function(name){ return this.each(function(idx){ if (!('className' in this)) return if (name === undefined) return className(this, '') classList = className(this) funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ classList = classList.replace(classRE(klass), " ") }) className(this, classList.trim()) }) }, toggleClass: function(name, when){ if (!name) return this return this.each(function(idx){ var $this = $(this), names = funcArg(this, name, idx, className(this)) names.split(/\s+/g).forEach(function(klass){ (when === undefined ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass) }) }) }, scrollTop: function(value){ if (!this.length) return var hasScrollTop = 'scrollTop' in this[0] if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset return this.each(hasScrollTop ? function(){ this.scrollTop = value } : function(){ this.scrollTo(this.scrollX, value) }) }, scrollLeft: function(value){ if (!this.length) return var hasScrollLeft = 'scrollLeft' in this[0] if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset return this.each(hasScrollLeft ? function(){ this.scrollLeft = value } : function(){ this.scrollTo(value, this.scrollY) }) }, position: function() { if (!this.length) return var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 // Add offsetParent borders parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left } }, offsetParent: function() { return this.map(function(){ var parent = this.offsetParent || document.body while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") parent = parent.offsetParent return parent }) } } // for now $.fn.detach = $.fn.remove // Generate the `width` and `height` functions ;['width', 'height'].forEach(function(dimension){ var dimensionProperty = dimension.replace(/./, function(m){ return m[0].toUpperCase() }) $.fn[dimension] = function(value){ var offset, el = this[0] if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension] else return this.each(function(idx){ el = $(this) el.css(dimension, funcArg(this, value, idx, el[dimension]())) }) } }) function traverseNode(node, fun) { fun(node) for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun) } // Generate the `after`, `prepend`, `before`, `append`, // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. adjacencyOperators.forEach(function(operator, operatorIndex) { var inside = operatorIndex % 2 //=> prepend, append $.fn[operator] = function(){ // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings var argType, nodes = $.map(arguments, function(arg) { var arr = [] argType = type(arg) if (argType == "array") { arg.forEach(function(el) { if (el.nodeType !== undefined) return arr.push(el) else if ($.zepto.isZ(el)) return arr = arr.concat(el.get()) arr = arr.concat(zepto.fragment(el)) }) return arr } return argType == "object" || arg == null ? arg : zepto.fragment(arg) }), parent, copyByClone = this.length > 1 if (nodes.length < 1) return this return this.each(function(_, target){ parent = inside ? target : target.parentNode // convert all methods to a "before" operation target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null var parentInDocument = $.contains(document.documentElement, parent) nodes.forEach(function(node){ if (copyByClone) node = node.cloneNode(true) else if (!parent) return $(node).remove() parent.insertBefore(node, target) if (parentInDocument) traverseNode(node, function(el){ if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src){ var target = el.ownerDocument ? el.ownerDocument.defaultView : window target['eval'].call(target, el.innerHTML) } }) }) }) } // after => insertAfter // prepend => prependTo // before => insertBefore // append => appendTo $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ $(html)[operator](this) return this } }) zepto.Z.prototype = Z.prototype = $.fn // Export internal API functions in the `$.zepto` namespace zepto.uniq = uniq zepto.deserializeValue = deserializeValue $.zepto = zepto return $ })() window.Zepto = Zepto window.$ === undefined && (window.$ = Zepto) ;(function($){ var _zid = 1, undefined, slice = Array.prototype.slice, isFunction = $.isFunction, isString = function(obj){ return typeof obj == 'string' }, handlers = {}, specialEvents={}, focusinSupported = 'onfocusin' in window, focus = { focus: 'focusin', blur: 'focusout' }, hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' function zid(element) { return element._zid || (element._zid = _zid++) } function findHandlers(element, event, fn, selector) { event = parse(event) if (event.ns) var matcher = matcherFor(event.ns) return (handlers[zid(element)] || []).filter(function(handler) { return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector) }) } function parse(event) { var parts = ('' + event).split('.') return {e: parts[0], ns: parts.slice(1).sort().join(' ')} } function matcherFor(ns) { return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') } function eventCapture(handler, captureSetting) { return handler.del && (!focusinSupported && (handler.e in focus)) || !!captureSetting } function realEvent(type) { return hover[type] || (focusinSupported && focus[type]) || type } function add(element, events, fn, data, selector, delegator, capture){ var id = zid(element), set = (handlers[id] || (handlers[id] = [])) events.split(/\s/).forEach(function(event){ if (event == 'ready') return $(document).ready(fn) var handler = parse(event) handler.fn = fn handler.sel = selector // emulate mouseenter, mouseleave if (handler.e in hover) fn = function(e){ var related = e.relatedTarget if (!related || (related !== this && !$.contains(this, related))) return handler.fn.apply(this, arguments) } handler.del = delegator var callback = delegator || fn handler.proxy = function(e){ e = compatible(e) if (e.isImmediatePropagationStopped()) return e.data = data var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args)) if (result === false) e.preventDefault(), e.stopPropagation() return result } handler.i = set.length set.push(handler) if ('addEventListener' in element) element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) } function remove(element, events, fn, selector, capture){ var id = zid(element) ;(events || '').split(/\s/).forEach(function(event){ findHandlers(element, event, fn, selector).forEach(function(handler){ delete handlers[id][handler.i] if ('removeEventListener' in element) element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) }) } $.event = { add: add, remove: remove } $.proxy = function(fn, context) { var args = (2 in arguments) && slice.call(arguments, 2) if (isFunction(fn)) { var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) } proxyFn._zid = zid(fn) return proxyFn } else if (isString(context)) { if (args) { args.unshift(fn[context], fn) return $.proxy.apply(null, args) } else { return $.proxy(fn[context], fn) } } else { throw new TypeError("expected function") } } $.fn.bind = function(event, data, callback){ return this.on(event, data, callback) } $.fn.unbind = function(event, callback){ return this.off(event, callback) } $.fn.one = function(event, selector, data, callback){ return this.on(event, selector, data, callback, 1) } var returnTrue = function(){return true}, returnFalse = function(){return false}, ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/, eventMethods = { preventDefault: 'isDefaultPrevented', stopImmediatePropagation: 'isImmediatePropagationStopped', stopPropagation: 'isPropagationStopped' } function compatible(event, source) { if (source || !event.isDefaultPrevented) { source || (source = event) $.each(eventMethods, function(name, predicate) { var sourceMethod = source[name] event[name] = function(){ this[predicate] = returnTrue return sourceMethod && sourceMethod.apply(source, arguments) } event[predicate] = returnFalse }) event.timeStamp || (event.timeStamp = Date.now()) if (source.defaultPrevented !== undefined ? source.defaultPrevented : 'returnValue' in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) event.isDefaultPrevented = returnTrue } return event } function createProxy(event) { var key, proxy = { originalEvent: event } for (key in event) if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] return compatible(proxy, event) } $.fn.delegate = function(selector, event, callback){ return this.on(event, selector, callback) } $.fn.undelegate = function(selector, event, callback){ return this.off(event, selector, callback) } $.fn.live = function(event, callback){ $(document.body).delegate(this.selector, event, callback) return this } $.fn.die = function(event, callback){ $(document.body).undelegate(this.selector, event, callback) return this } $.fn.on = function(event, selector, data, callback, one){ var autoRemove, delegator, $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.on(type, selector, data, fn, one) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = data, data = selector, selector = undefined if (callback === undefined || data === false) callback = data, data = undefined if (callback === false) callback = returnFalse return $this.each(function(_, element){ if (one) autoRemove = function(e){ remove(element, e.type, callback) return callback.apply(this, arguments) } if (selector) delegator = function(e){ var evt, match = $(e.target).closest(selector, element).get(0) if (match && match !== element) { evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1))) } } add(element, event, callback, data, selector, delegator || autoRemove) }) } $.fn.off = function(event, selector, callback){ var $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.off(type, selector, fn) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = selector, selector = undefined if (callback === false) callback = returnFalse return $this.each(function(){ remove(this, event, callback, selector) }) } $.fn.trigger = function(event, args){ event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event) event._args = args return this.each(function(){ // handle focus(), blur() by calling them directly if (event.type in focus && typeof this[event.type] == "function") this[event.type]() // items in the collection might not be DOM elements else if ('dispatchEvent' in this) this.dispatchEvent(event) else $(this).triggerHandler(event, args) }) } // triggers event handlers on current element just as if an event occurred, // doesn't trigger an actual event, doesn't bubble $.fn.triggerHandler = function(event, args){ var e, result this.each(function(i, element){ e = createProxy(isString(event) ? $.Event(event) : event) e._args = args e.target = element $.each(findHandlers(element, event.type || event), function(i, handler){ result = handler.proxy(e) if (e.isImmediatePropagationStopped()) return false }) }) return result } // shortcut methods for `.bind(event, fn)` for each event type ;('focusin focusout focus blur load resize scroll unload click dblclick '+ 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ 'change select keydown keypress keyup error').split(' ').forEach(function(event) { $.fn[event] = function(callback) { return (0 in arguments) ? this.bind(event, callback) : this.trigger(event) } }) $.Event = function(type, props) { if (!isString(type)) props = type, type = props.type var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) event.initEvent(type, bubbles, true) return compatible(event) } })(Zepto) ;(function($){ var jsonpID = +new Date(), document = window.document, key, name, rscript = /)<[^<]*)*<\/script>/gi, scriptTypeRE = /^(?:text|application)\/javascript/i, xmlTypeRE = /^(?:text|application)\/xml/i, jsonType = 'application/json', htmlType = 'text/html', blankRE = /^\s*$/, originAnchor = document.createElement('a') originAnchor.href = window.location.href // trigger a custom event and return false if it was cancelled function triggerAndReturn(context, eventName, data) { var event = $.Event(eventName) $(context).trigger(event, data) return !event.isDefaultPrevented() } // trigger an Ajax "global" event function triggerGlobal(settings, context, eventName, data) { if (settings.global) return triggerAndReturn(context || document, eventName, data) } // Number of active Ajax requests $.active = 0 function ajaxStart(settings) { if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') } function ajaxStop(settings) { if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') } // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable function ajaxBeforeSend(xhr, settings) { var context = settings.context if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) return false triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) } function ajaxSuccess(data, xhr, settings, deferred) { var context = settings.context, status = 'success' settings.success.call(context, data, status, xhr) if (deferred) deferred.resolveWith(context, [data, status, xhr]) triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) ajaxComplete(status, xhr, settings) } // type: "timeout", "error", "abort", "parsererror" function ajaxError(error, type, xhr, settings, deferred) { var context = settings.context settings.error.call(context, xhr, type, error) if (deferred) deferred.rejectWith(context, [xhr, type, error]) triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]) ajaxComplete(type, xhr, settings) } // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" function ajaxComplete(status, xhr, settings) { var context = settings.context settings.complete.call(context, xhr, status) triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) ajaxStop(settings) } function ajaxDataFilter(data, type, settings) { if (settings.dataFilter == empty) return data var context = settings.context return settings.dataFilter.call(context, data, type) } // Empty function, used as default callback function empty() {} $.ajaxJSONP = function(options, deferred){ if (!('type' in options)) return $.ajax(options) var _callbackName = options.jsonpCallback, callbackName = ($.isFunction(_callbackName) ? _callbackName() : _callbackName) || ('Zepto' + (jsonpID++)), script = document.createElement('script'), originalCallback = window[callbackName], responseData, abort = function(errorType) { $(script).triggerHandler('error', errorType || 'abort') }, xhr = { abort: abort }, abortTimeout if (deferred) deferred.promise(xhr) $(script).on('load error', function(e, errorType){ clearTimeout(abortTimeout) $(script).off().remove() if (e.type == 'error' || !responseData) { ajaxError(null, errorType || 'error', xhr, options, deferred) } else { ajaxSuccess(responseData[0], xhr, options, deferred) } window[callbackName] = originalCallback if (responseData && $.isFunction(originalCallback)) originalCallback(responseData[0]) originalCallback = responseData = undefined }) if (ajaxBeforeSend(xhr, options) === false) { abort('abort') return xhr } window[callbackName] = function(){ responseData = arguments } script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName) document.head.appendChild(script) if (options.timeout > 0) abortTimeout = setTimeout(function(){ abort('timeout') }, options.timeout) return xhr } $.ajaxSettings = { // Default type of request type: 'GET', // Callback that is executed before request beforeSend: empty, // Callback that is executed if the request succeeds success: empty, // Callback that is executed the the server drops error error: empty, // Callback that is executed on request complete (both: error and success) complete: empty, // The context for the callbacks context: null, // Whether to trigger "global" Ajax events global: true, // Transport xhr: function () { return new window.XMLHttpRequest() }, // MIME types mapping // IIS returns Javascript as "application/x-javascript" accepts: { script: 'text/javascript, application/javascript, application/x-javascript', json: jsonType, xml: 'application/xml, text/xml', html: htmlType, text: 'text/plain' }, // Whether the request is to another domain crossDomain: false, // Default timeout timeout: 0, // Whether data should be serialized to string processData: true, // Whether the browser should be allowed to cache GET responses cache: true, //Used to handle the raw response data of XMLHttpRequest. //This is a pre-filtering function to sanitize the response. //The sanitized response should be returned dataFilter: empty } function mimeToDataType(mime) { if (mime) mime = mime.split(';', 2)[0] return mime && ( mime == htmlType ? 'html' : mime == jsonType ? 'json' : scriptTypeRE.test(mime) ? 'script' : xmlTypeRE.test(mime) && 'xml' ) || 'text' } function appendQuery(url, query) { if (query == '') return url return (url + '&' + query).replace(/[&?]{1,2}/, '?') } // serialize payload and append it to the URL for GET requests function serializeData(options) { if (options.processData && options.data && $.type(options.data) != "string") options.data = $.param(options.data, options.traditional) if (options.data && (!options.type || options.type.toUpperCase() == 'GET' || 'jsonp' == options.dataType)) options.url = appendQuery(options.url, options.data), options.data = undefined } $.ajax = function(options){ var settings = $.extend({}, options || {}), deferred = $.Deferred && $.Deferred(), urlAnchor, hashIndex for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] ajaxStart(settings) if (!settings.crossDomain) { urlAnchor = document.createElement('a') urlAnchor.href = settings.url // cleans up URL for .href (IE only), see https://github.com/madrobby/zepto/pull/1049 urlAnchor.href = urlAnchor.href settings.crossDomain = (originAnchor.protocol + '//' + originAnchor.host) !== (urlAnchor.protocol + '//' + urlAnchor.host) } if (!settings.url) settings.url = window.location.toString() if ((hashIndex = settings.url.indexOf('#')) > -1) settings.url = settings.url.slice(0, hashIndex) serializeData(settings) var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url) if (hasPlaceholder) dataType = 'jsonp' if (settings.cache === false || ( (!options || options.cache !== true) && ('script' == dataType || 'jsonp' == dataType) )) settings.url = appendQuery(settings.url, '_=' + Date.now()) if ('jsonp' == dataType) { if (!hasPlaceholder) settings.url = appendQuery(settings.url, settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?') return $.ajaxJSONP(settings, deferred) } var mime = settings.accepts[dataType], headers = { }, setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] }, protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, xhr = settings.xhr(), nativeSetHeader = xhr.setRequestHeader, abortTimeout if (deferred) deferred.promise(xhr) if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest') setHeader('Accept', mime || '*/*') if (mime = settings.mimeType || mime) { if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] xhr.overrideMimeType && xhr.overrideMimeType(mime) } if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded') if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]) xhr.setRequestHeader = setHeader xhr.onreadystatechange = function(){ if (xhr.readyState == 4) { xhr.onreadystatechange = empty clearTimeout(abortTimeout) var result, error = false if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type')) if (xhr.responseType == 'arraybuffer' || xhr.responseType == 'blob') result = xhr.response else { result = xhr.responseText try { // http://perfectionkills.com/global-eval-what-are-the-options/ // sanitize response accordingly if data filter callback provided result = ajaxDataFilter(result, dataType, settings) if (dataType == 'script') (1,eval)(result) else if (dataType == 'xml') result = xhr.responseXML else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) } catch (e) { error = e } if (error) return ajaxError(error, 'parsererror', xhr, settings, deferred) } ajaxSuccess(result, xhr, settings, deferred) } else { ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred) } } } if (ajaxBeforeSend(xhr, settings) === false) { xhr.abort() ajaxError(null, 'abort', xhr, settings, deferred) return xhr } var async = 'async' in settings ? settings.async : true xhr.open(settings.type, settings.url, async, settings.username, settings.password) if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name] for (name in headers) nativeSetHeader.apply(xhr, headers[name]) if (settings.timeout > 0) abortTimeout = setTimeout(function(){ xhr.onreadystatechange = empty xhr.abort() ajaxError(null, 'timeout', xhr, settings, deferred) }, settings.timeout) // avoid sending empty string (#319) xhr.send(settings.data ? settings.data : null) return xhr } // handle optional data/success arguments function parseArguments(url, data, success, dataType) { if ($.isFunction(data)) dataType = success, success = data, data = undefined if (!$.isFunction(success)) dataType = success, success = undefined return { url: url , data: data , success: success , dataType: dataType } } $.get = function(/* url, data, success, dataType */){ return $.ajax(parseArguments.apply(null, arguments)) } $.post = function(/* url, data, success, dataType */){ var options = parseArguments.apply(null, arguments) options.type = 'POST' return $.ajax(options) } $.getJSON = function(/* url, data, success */){ var options = parseArguments.apply(null, arguments) options.dataType = 'json' return $.ajax(options) } $.fn.load = function(url, data, success){ if (!this.length) return this var self = this, parts = url.split(/\s/), selector, options = parseArguments(url, data, success), callback = options.success if (parts.length > 1) options.url = parts[0], selector = parts[1] options.success = function(response){ self.html(selector ? $('
').html(response.replace(rscript, "")).find(selector) : response) callback && callback.apply(self, arguments) } $.ajax(options) return this } var escape = encodeURIComponent function serialize(params, obj, traditional, scope){ var type, array = $.isArray(obj), hash = $.isPlainObject(obj) $.each(obj, function(key, value) { type = $.type(value) if (scope) key = traditional ? scope : scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']' // handle data in serializeArray() format if (!scope && array) params.add(value.name, value.value) // recurse into nested objects else if (type == "array" || (!traditional && type == "object")) serialize(params, value, traditional, key) else params.add(key, value) }) } $.param = function(obj, traditional){ var params = [] params.add = function(key, value) { if ($.isFunction(value)) value = value() if (value == null) value = "" this.push(escape(key) + '=' + escape(value)) } serialize(params, obj, traditional) return params.join('&').replace(/%20/g, '+') } })(Zepto) ;(function($){ $.fn.serializeArray = function() { var name, type, result = [], add = function(value) { if (value.forEach) return value.forEach(add) result.push({ name: name, value: value }) } if (this[0]) $.each(this[0].elements, function(_, field){ type = field.type, name = field.name if (name && field.nodeName.toLowerCase() != 'fieldset' && !field.disabled && type != 'submit' && type != 'reset' && type != 'button' && type != 'file' && ((type != 'radio' && type != 'checkbox') || field.checked)) add($(field).val()) }) return result } $.fn.serialize = function(){ var result = [] this.serializeArray().forEach(function(elm){ result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value)) }) return result.join('&') } $.fn.submit = function(callback) { if (0 in arguments) this.bind('submit', callback) else if (this.length) { var event = $.Event('submit') this.eq(0).trigger(event) if (!event.isDefaultPrevented()) this.get(0).submit() } return this } })(Zepto) ;(function(){ // getComputedStyle shouldn't freak out when called // without a valid element as argument try { getComputedStyle(undefined) } catch(e) { var nativeGetComputedStyle = getComputedStyle window.getComputedStyle = function(element, pseudoElement){ try { return nativeGetComputedStyle(element, pseudoElement) } catch(e) { return null } } } })() return Zepto })) ================================================ FILE: list/component.json ================================================ { "name":"list", "author": "fabiorogeriosj", "dependencies": [ "base" ] } ================================================ FILE: list/index.html ================================================

List

To use this component you need install with the command:

Dependency: base. The dependencies will be installed together with this module
mobileui install list

You can use all features the base MobileUI in this component.

You can put images and icons in list.

You can combinate with others components and class.

Another example of a combination of components header, button and cover.

You can add class mark for change color border.

================================================ FILE: list/style.css ================================================ /*Define an element as list. This feature depends on the item to function properly.*/ .list { width: 100%; position: relative; border: 1px solid #ddd; } /*Define an element as item. This feature depends on the list to function properly.*/ .list .item { padding: 15px; display: inline-block; border-bottom: 1px solid #ddd; width: 100%; position: relative; font-size: 18px; } .list .item.hidden { display: none; } .list ol, .list ul { list-style: none; } /*Define a small space between the top and bottom elements.*/ .list .item.space-small { padding-top: 5px; padding-bottom: 5px; } .list .item.mark { border-right: 0; border-top: 0; } /*Block line space with left avatar.*/ .item .block { display: -webkit-box; display: flex; } .list .item.mark.margin-button { border-bottom: 0; margin-bottom: 10px; } /*Remove space in top item.*/ .list .item.no-space-top { padding-top: 0 !important; } /*Remove space in bottom item.*/ .list .item.no-space-bottom { padding-bottom: 0 !important; } .list .item.row { display: -moz-flex; display: -ms-flexbox; display: flex; } /*Define that a list or an item has no borders.*/ .list.no-border { border: 0; } /*Define that a list or an item has a bottom border.*/ .list.no-border .item.border-bottom, .list .item.no-border.border-bottom { border-bottom-width: 1px; border-bottom-style: solid; } .list.no-border .item, .list .item.no-border { border: none; } .list .item.cover { padding: 0; margin-left: 20px; height:200px; width: -webkit-calc(100% - 40px); width: -moz-calc(100% - 40px); width: calc(100% - 40px); } /*Define an item without internal spaces.*/ .list .item.full { padding: 0; display: flex; } .list .item h1, .list .item h2 { font-size: 16px; margin:0; padding: 0; } .list .item h1 { margin-top: 7px; } .list .item p { font-size: 14px; margin:0; padding: 0; line-height: 20px; } .list .item:last-child { border-bottom:0; } .list .left { margin-right: 10px; min-width: 25px; } .list .right { margin-right: 20px; position: absolute; top: 0; right: 0; height: 100%; display: -ms-flexbox; display: -webkit-flex; display: flex; -ms-flex-align: center; -webkit-align-items: center; -webkit-box-align: center; align-items: center; } .list .right i { margin-left: 5px; } .list .align-top { -ms-flex-align: center; -webkit-align-items: center; align-items: baseline; margin-top: 10px; } /*Set a fixed size for an image.*/ .list .avatar { height: 50px; } /*Set a floating badge above the image.*/ .avatar-badge { position: absolute; margin-left: -4px; margin-top: -3px; border-radius: 8px; } .list .item small, .list .item small .icon { font-size: 14px; } .list .item .icon { font-size: 18px; } .list .item .icon.text-huge { font-size: 32px; } .list .left .icon, .list .right .icon { vertical-align: -webkit-baseline-middle; } /*Add big border in item or element.*/ .list .border-big { border-width: 3px; border-style: solid; } .list .item[onclick]:active, .list a.item:active { background-color: rgba(0, 0, 0, 0.1); cursor: pointer; } .list .item .right .icon, .list .item .right.icon { font-size: 24px; padding: 0; margin: 0; } ================================================ FILE: loading/component.json ================================================ { "name":"loading", "author": "fabiorogeriosj", "dependencies": [ "alert" ] } ================================================ FILE: loading/index.html ================================================

Loading

The Loading component is an overlay that prevents user interaction while indicating activity. By default, it shows a spinner based on the mode. Dynamic content can be passed and displayed with the spinner. The spinner can be hidden or customized to use several predefined options. The loading indicator is presented on top of other content even during navigation.

Dependency: alert. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install loading

For use you need call the function loading('MESSAGE TO LOADING') or loading() for just spinner show, and when you can close the loading component you call closeLoading() function.

You can show loading in button element, just call loadingElement('ID_YOUR_ELEMENT') and close call closeLoading('ID_YOUR_ELEMENT'). It is posible add another params: loadingElement('ID_ELEMENT','MESSAGE (optional)', 'LEFT/RIGHT','COLOR')

See this small example:

================================================ FILE: loading/script.js ================================================ window.loading = function(message){ var configLoading = {}; if(typeof message === "object"){ configLoading = message; } else { configLoading.message = message; } if(!configLoading.id){ configLoading.id = 'LOADING'+new Date().getTime(); } var body = document.getElementsByTagName('body')[0]; if(event && event.target && event.target.parentNode && event.target.parentNode.className.indexOf('body') >= 0) { body = event.target.parentNode; } var e = document.createElement('div'); e.className = 'backdrop show backdrop-alert'; e.id = configLoading.id + '_BACKDROP'; body.appendChild(e); var alertMobileUI = document.createElement('div'); alertMobileUI.className = 'alert-mobileui alert-loading'; alertMobileUI.id = configLoading.id; e.parentNode.appendChild(alertMobileUI); var alertContent = document.createElement('div'); configLoading.class = 'white'; alertContent.className = 'alert ' + configLoading.class; if(!window.SO || SO.code !== 2){ alertContent.innerHTML = ''; } else { alertContent.innerHTML = '
'; } if(configLoading.message) { alertContent.innerHTML += '

'+configLoading.message+'

'; } alertMobileUI.appendChild(alertContent); } window.loadingElement = function(e, message, position, color){ if(typeof(e) != "object"){ e = document.getElementById(e); } var withMessage = message ? 'with-message' : ''; if(!color){ color = 'white-loading'; } if(!position) { position = ''; } var divLoading = document.createElement('div'); var spinner = ''; if(!window.SO || SO.code !== 2){ spinner = ''; } else { spinner = ''; } e.oldValue = e.innerHTML; e.innerHTML = spinner; e.disabled=true; if(message){ e.innerHTML += message; } } window.closeLoading = function(e){ if(e){ if(typeof(e) != "object"){ e = document.getElementById(e); } e.innerHTML = e.oldValue; e.disabled=false; } else { var alert = document.getElementsByClassName('alert-mobileui')[0]; var alertId = alert.id; var alert = document.getElementById(alertId); alert.parentNode.removeChild(alert); var backdrop = document.getElementById(alertId+'_BACKDROP'); backdrop.parentNode.removeChild(backdrop); } } ================================================ FILE: loading/style.css ================================================ .alert-loading .alert { padding: 24px; text-align: center; } .loading-circle { fill: transparent; stroke: #009688; stroke-width: 5; -webkit-animation: dash 2s ease infinite,rotate 2s linear infinite; -moz-animation: dash 2s ease infinite,rotate 2s linear infinite; -o-animation: dash 2s ease infinite,rotate 2s linear infinite; animation: dash 2s ease infinite,rotate 2s linear infinite; margin:auto; } .loading-circle.loading-element { zoom:0.55; margin-top: -20px; margin-left: -20px; position: absolute; } button .loading-circle.loading-element { left: 50%; margin-left: -20px; top: 50%; margin-top: -20px; } .loading-circle.with-message.loading-element { margin-left: -50px; margin-top: 17px; top: auto; left: auto; } .loading-circle.loading-element.left { float: left; position: inherit; margin-left:0; } .loading-circle.loading-element.right { float: right; position: inherit; margin-left:0; } .loading-circle.white-loading{ stroke: rgba(255,255,255,0.8); } .loading-circle.with-message { margin-right: 10px; } .platform-ios .loading-circle { fill: #868686; -webkit-animation: none; -moz-animation: none; -o-animation: none; animation: none; stroke:none; stroke-width:0; } .platform-ios .loading-circle.loading-element.white-loading { fill: rgba(255,255,255,0.8); } .platform-ios .loading-circle path:nth-of-type(1) { -webkit-animation: pulse 1s infinite linear; -moz-animation: pulse 1s infinite linear; -o-animation: pulse 1s infinite linear; animation: pulse 1s infinite linear; } .platform-ios .loading-circle path:nth-of-type(2) { -webkit-animation: pulse 1s -.083s infinite linear; -moz-animation: pulse 1s -.083s infinite linear; -o-animation: pulse 1s -.083s infinite linear; animation: pulse 1s -.083s infinite linear; } .platform-ios .loading-circle path:nth-of-type(3) { -webkit-animation: pulse 1s -.166s infinite linear; -moz-animation: pulse 1s -.166s infinite linear; -o-animation: pulse 1s -.166s infinite linear; animation: pulse 1s -.166s infinite linear; } .platform-ios .loading-circle path:nth-of-type(4) { -webkit-animation: pulse 1s -.249s infinite linear; -moz-animation: pulse 1s -.249s infinite linear; -o-animation: pulse 1s -.249s infinite linear; animation: pulse 1s -.249s infinite linear; } .platform-ios .loading-circle path:nth-of-type(5) { -webkit-animation: pulse 1s -.332s infinite linear; -moz-animation: pulse 1s -.332s infinite linear; -o-animation: pulse 1s -.332s infinite linear; animation: pulse 1s -.332s infinite linear; } .platform-ios .loading-circle path:nth-of-type(6) { -webkit-animation: pulse 1s -.415s infinite linear; -moz-animation: pulse 1s -.415s infinite linear; -o-animation: pulse 1s -.415s infinite linear; animation: pulse 1s -.415s infinite linear; } .platform-ios .loading-circle path:nth-of-type(7) { -webkit-animation: pulse 1s -.498s infinite linear; -moz-animation: pulse 1s -.498s infinite linear; -o-animation: pulse 1s -.498s infinite linear; animation: pulse 1s -.498s infinite linear; } .platform-ios .loading-circle path:nth-of-type(8) { -webkit-animation: pulse 1s -.581s infinite linear; -moz-animation: pulse 1s -.581s infinite linear; -o-animation: pulse 1s -.581s infinite linear; animation: pulse 1s -.581s infinite linear; } .platform-ios .loading-circle path:nth-of-type(9) { -webkit-animation: pulse 1s -.664s infinite linear; -moz-animation: pulse 1s -.664s infinite linear; -o-animation: pulse 1s -.664s infinite linear; animation: pulse 1s -.664s infinite linear; } .platform-ios .loading-circle path:nth-of-type(10) { -webkit-animation: pulse 1s -.747s infinite linear; -moz-animation: pulse 1s -.747s infinite linear; -o-animation: pulse 1s -.747s infinite linear; animation: pulse 1s -.747s infinite linear; } .platform-ios .alert-loading .loading-circle path:nth-of-type(11) { -webkit-animation: pulse 1s -.83s infinite linear; -moz-animation: pulse 1s -.83s infinite linear; -o-animation: pulse 1s -.83s infinite linear; animation: pulse 1s -.83s infinite linear; } .platform-ios .alert-loading .loading-circle path:nth-of-type(12) { -webkit-animation: pulse 1s -.913s infinite linear; -moz-animation: pulse 1s -.913s infinite linear; -o-animation: pulse 1s -.913s infinite linear; animation: pulse 1s -.913s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(1) { -webkit-animation: pulse-white 1s infinite linear; -moz-animation: pulse-white 1s infinite linear; -o-animation: pulse-white 1s infinite linear; animation: pulse-white 1s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(2) { -webkit-animation: pulse-white 1s -.083s infinite linear; -moz-animation: pulse-white 1s -.083s infinite linear; -o-animation: pulse-white 1s -.083s infinite linear; animation: pulse-white 1s -.083s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(3) { -webkit-animation: pulse-white 1s -.166s infinite linear; -moz-animation: pulse-white 1s -.166s infinite linear; -o-animation: pulse-white 1s -.166s infinite linear; animation: pulse-white 1s -.166s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(4) { -webkit-animation: pulse-white 1s -.249s infinite linear; -moz-animation: pulse-white 1s -.249s infinite linear; -o-animation: pulse-white 1s -.249s infinite linear; animation: pulse-white 1s -.249s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(5) { -webkit-animation: pulse-white 1s -.332s infinite linear; -moz-animation: pulse-white 1s -.332s infinite linear; -o-animation: pulse-white 1s -.332s infinite linear; animation: pulse-white 1s -.332s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(6) { -webkit-animation: pulse-white 1s -.415s infinite linear; -moz-animation: pulse-white 1s -.415s infinite linear; -o-animation: pulse-white 1s -.415s infinite linear; animation: pulse-white 1s -.415s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(7) { -webkit-animation: pulse-white 1s -.498s infinite linear; -moz-animation: pulse-white 1s -.498s infinite linear; -o-animation: pulse-white 1s -.498s infinite linear; animation: pulse-white 1s -.498s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(8) { -webkit-animation: pulse-white 1s -.581s infinite linear; -moz-animation: pulse-white 1s -.581s infinite linear; -o-animation: pulse-white 1s -.581s infinite linear; animation: pulse-white 1s -.581s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(9) { -webkit-animation: pulse-white 1s -.664s infinite linear; -moz-animation: pulse-white 1s -.664s infinite linear; -o-animation: pulse-white 1s -.664s infinite linear; animation: pulse-white 1s -.664s infinite linear; } .platform-ios .loading-circle.white-loading path:nth-of-type(10) { -webkit-animation: pulse-white 1s -.747s infinite linear; -moz-animation: pulse-white 1s -.747s infinite linear; -o-animation: pulse-white 1s -.747s infinite linear; animation: pulse-white 1s -.747s infinite linear; } .platform-ios .alert-loading.white-loading .loading-circle path:nth-of-type(11) { -webkit-animation: pulse-white 1s -.83s infinite linear; -moz-animation: pulse-white 1s -.83s infinite linear; -o-animation: pulse-white 1s -.83s infinite linear; animation: pulse-white 1s -.83s infinite linear; } .platform-ios .alert-loading.white-loading .loading-circle path:nth-of-type(12) { -webkit-animation: pulse-white 1s -.913s infinite linear; -moz-animation: pulse-white 1s -.913s infinite linear; -o-animation: pulse-white 1s -.913s infinite linear; animation: pulse-white 1s -.913s infinite linear; } @-webkit-keyframes pulse { 50% { fill: #868686; } to { fill: rgba(134,134,134,.4); } } @-moz-keyframes pulse { 50% { fill: #868686; } to { fill: rgba(134,134,134,.4); } } @-o-keyframes pulse { 50% { fill: #868686; } to { fill: rgba(134,134,134,.4); } } @keyframes pulse { 50% { fill: #868686; } to { fill: rgba(134,134,134,.4); } } @-webkit-keyframes pulse-white { 50% { fill: rgba(255,255,255,0.8); } to { fill: rgba(255,255,255,0.2); } } @-moz-keyframes pulse-white { 50% { fill: rgba(255,255,255,0.8); } to { fill: rgba(255,255,255,0.2); } } @-o-keyframes pulse-white { 50% { fill: rgba(255,255,255,0.8); } to { fill: rgba(255,255,255,0.2); } } @keyframes pulse-white { 50% { fill: rgba(255,255,255,0.8); } to { fill: rgba(255,255,255,0.2); } } @-webkit-keyframes iosIntro { from { -webkit-transform: scale(0); opacity: 0; } to { -webkit-transform: scale(1); opacity: 1; } } @-moz-keyframes iosIntro { from { -moz-transform: scale(0); opacity: 0; } to { -moz-transform: scale(1); opacity: 1; } } @-o-keyframes iosIntro { from { -o-transform: scale(0); opacity: 0; } to { -o-transform: scale(1); opacity: 1; } } @keyframes iosIntro { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } } .alert-mobileui.alert-loading .alert p { margin: 0; margin-top: 15px !important; text-align: center; } @-webkit-keyframes dash { 0% { stroke-dasharray: 1,95; stroke-dashoffset: 0; } 50% { stroke-dasharray: 85,95; stroke-dashoffset: -25; } 100% { stroke-dasharray: 85,95; stroke-dashoffset: -93; } } @-moz-keyframes dash { 0% { stroke-dasharray: 1,95; stroke-dashoffset: 0; } 50% { stroke-dasharray: 85,95; stroke-dashoffset: -25; } 100% { stroke-dasharray: 85,95; stroke-dashoffset: -93; } } @-o-keyframes dash { 0% { stroke-dasharray: 1,95; stroke-dashoffset: 0; } 50% { stroke-dasharray: 85,95; stroke-dashoffset: -25; } 100% { stroke-dasharray: 85,95; stroke-dashoffset: -93; } } @keyframes dash { 0% { stroke-dasharray: 1,95; stroke-dashoffset: 0; } 50% { stroke-dasharray: 85,95; stroke-dashoffset: -25; } 100% { stroke-dasharray: 85,95; stroke-dashoffset: -93; } } @-webkit-keyframes rotate { 0% {-webkit-transform: rotate(0deg); } 100% {-webkit-transform: rotate(360deg); } } @-moz-keyframes rotate { 0% {-moz-transform: rotate(0deg); } 100% {-moz-transform: rotate(360deg); } } @-o-keyframes rotate { 0% {-o-transform: rotate(0deg); } 100% {-o-transform: rotate(360deg); } } @keyframes rotate { 0% {transform: rotate(0deg); } 100% {transform: rotate(360deg); } } ================================================ FILE: menu/component.json ================================================ { "name":"menu", "author": "fabiorogeriosj", "dependencies": [ "base", "list" ] } ================================================ FILE: menu/index.html ================================================

Menu

Menu is a side-menu navigation that can be dragged out or toggled to show. The content of a menu will be hidden when the menu is closed. Menu adapts to the appropriate style based on the platform.

To use this component you need install with the command:

Dependency: base and list. The dependencies will be installed together with this module
mobileui install menu

Your menu need have id and for you open menu, just call function openMenu('ID_YOUR_MENU'), for close menu just call function closeMenu('ID_YOU_MENU'). By default the menu is created in the left, but you can add class menu-right for create menu in right position.

See example:

You can use all features of colors theme, icons and list in menu.

You can combinate cover, badge, card, header and button for create a good apps.

For advanced mode you can listen to the event openMenu and closeMenu.

Your can enable the Swiper event (open or close the menu when clicking and dragging horizontally):

================================================ FILE: menu/script.js ================================================ window.menu = {} window.openMenu = function (m) { var name = m var m = document.getElementById(m) if (m.className.indexOf('menu') >= 0 && m.className.indexOf('open') < 0) { var e = document.createElement('div') e.className = 'backdrop backdrop-menu' m.parentNode.appendChild(e) setTimeout(function () { e.className += ' show' }) e.addEventListener('click', function (evt) { window.closeMenu(name) }, false) if (SO.code === 2) { m.style.height = window.innerHeight + 'px' var classSideMenu = ' side-menu' window.menu.position = 'left' if (m.className.indexOf('menu-right') >= 0) { classSideMenu = ' side-menu-right' window.menu.position = 'right' var headers = document.getElementsByClassName('header') if (headers.length) { for (i in headers) { if (headers[i].className && headers[i].className.indexOf('side-menu-right') < 0) { headers[i].className += ' side-menu-right' } } } } if (m.parentNode.className.indexOf('body') >= 0) { m.parentNode.className += classSideMenu } else { document.getElementsByTagName('body')[0].className += classSideMenu } } m.className += ' open' var customEvent = new CustomEvent('openMenu', { 'detail': {menu: name}}) document.dispatchEvent(customEvent) window.menu.openFired = true document.addEventListener('firedCloseMenu', function (e) { window.closeMenu(name) }, false) } } window.closeMenu = function (m) { var name = m m = document.getElementById(m) if (m.className.indexOf('open') < 0) { return false } var customEvent = new CustomEvent('closeMenu', { 'detail': {menu: name}}) document.dispatchEvent(customEvent) window.menu.openFired = false m.className = m.className.replace('open', '') var headers = document.getElementsByClassName('header') if (headers.length) { for (i in headers) { if (headers[i].className && headers[i].className.indexOf('side-menu-right') >= 0) { headers[i].className = headers[i].className.replace(' side-menu-right', '') } } } var e = m.parentNode.getElementsByClassName('backdrop-menu') if (e && e.length) { e = e[0] e.className = e.className.replace('show', '') setTimeout(function () { if (e && e.parentNode) { e.parentNode.removeChild(e) } }, 500) } if (SO.code !== 1) { if (m.parentNode.className.indexOf('body') >= 0) { m.parentNode.className = m.parentNode.className.replace('side-menu', '') } else { document.getElementsByTagName('body')[0].className = document.getElementsByTagName('body')[0].className.replace('side-menu', '') } } } document.querySelector('body').addEventListener('touchstart', function (evt) { window.menu.xDown = evt.touches[0].clientX window.menu.yDown = evt.touches[0].clientY }, false) window.menu.handleTouchMove = function (evt, name) { if (!window.menu.xDown || !window.menu.yDown) { return } var xUp = evt.touches[0].clientX var yUp = evt.touches[0].clientY window.menu.xDiff = window.menu.xDown - xUp window.menu.yDiff = window.menu.yDown - yUp if (Math.abs(window.menu.xDiff) > Math.abs(window.menu.yDiff)) { // Most significant. var menuRight = document.getElementById(name).classList.value.indexOf('menu-right') !== -1 if (window.menu.xDiff > 0) { if (menuRight && !window.menu.openFired) { window.openMenu(name) } else if (!menuRight && window.menu.openFired) { window.closeMenu(name) } } else { if (!menuRight && !window.menu.openFired) { window.openMenu(name) } else if (menuRight && window.menu.openFired) { window.closeMenu(name) } } } // Reset values. window.menu.xDown = null window.menu.yDown = null } window.menu.enableSwiper = function (name) { document.querySelector('body').addEventListener('touchmove', function (evt) { window.menu.handleTouchMove(evt, name) }, false) } ================================================ FILE: menu/style.css ================================================ /*Define an element being a menu, being able to disconnect over the page or to push the page, depending on the operating system.*/ .menu { position: fixed; top: 0; left: 0; width: 300px; height: 100%; z-index: 99999; transform: translateX(-312px); -webkit-transform: translateX(-312px); -moz-transform: translateX(-312px); -o-transform: translateX(-312px); transition-duration: 280ms; -webkit-transition-duration: 280ms; -moz-transition-duration: 280ms; -o-transition-duration: 280ms; box-shadow: 0 0 10px rgba(0, 0, 0, 0.25); overflow: auto; } .menu.cover { width: 300px; } /*Set a menu on the right side.*/ .menu.menu-right { right: 0; left: auto; transform: translateX(105%); -webkit-transform: translateX(105%); -moz-transform: translateX(105%); -o-transform: translateX(105%); } /*Set a menu is open.*/ .menu.open { transform: translateX(0px); -webkit-transform: translateX(0px); -moz-transform: translateX(0px); -o-transform: translateX(0px); } .menu.menu-right.open { margin-left: -312px; } .platform-ios .backdrop-menu { opacity: 0.01; } .platform-ios .menu { width: 264px; box-shadow:none; transition-duration: 0ms; -webkit-transition-duration: 0ms; -moz-transition-duration: 0ms; -o-transition-duration: 0ms; transform: translateX(-264px); -webkit-transform: translateX(-264px); -moz-transform: translateX(-264px); -o-transform: translateX(-264px); box-shadow: none; } .platform-ios .menu.cover { width: 264px; } .platform-ios .menu.menu-right { transform: translateX(105%); -webkit-transform: translateX(105%); -moz-transform: translateX(105%); -o-transform: translateX(105%); transition-duration: 0ms; -webkit-transition-duration: 0ms; -moz-transition-duration: 0ms; -o-transition-duration: 0ms; } .platform-ios .menu.open { transform: translateX(-264px); -webkit-transform: translateX(-264px); -moz-transform: translateX(-264px); -o-transform: translateX(-264px); margin-left: -1px; } .platform-ios .menu.menu-right.open { margin-left: -263px; transform:none; -webkit-transform: none; -moz-transform: none; -o-transform: none; box-shadow: 0 0 10px rgba(0, 0, 0, 0.25); } .platform-ios .body, .platform-ios body { transition-duration: 0ms; -webkit-transition-duration: 0ms; -moz-transition-duration: 0ms; -o-transition-duration: 0ms; } .platform-ios .body.side-menu, .platform-ios.side-menu { transform: translateX(264px); -webkit-transform: translateX(264px); -moz-transform: translateX(264px); -o-transform: translateX(264px); border-left: 1px solid rgba(0, 0, 0, 0.15); overflow: hidden; } .platform-ios .body.side-menu-right, .platform-ios.side-menu-right, .platform-ios .header.side-menu-right { margin-left: -264px; } ================================================ FILE: mobileui-colors/component.json ================================================ { "name":"mobileui-colors", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: mobileui-colors/script.js ================================================ (function(){ window.colorsMobileUI = []; window.colorsMobileUI["red"] = "rgb(244, 67, 54)"; window.colorsMobileUI["red-50"] = "rgb(255, 235, 238)"; window.colorsMobileUI["red-100"] = "rgb(255, 205, 210)"; window.colorsMobileUI["red-200"] = "rgb(239, 154, 154)"; window.colorsMobileUI["red-300"] = "rgb(229, 115, 115)"; window.colorsMobileUI["red-400"] = "rgb(239, 83, 80)"; window.colorsMobileUI["red-500"] = "rgb(244, 67, 54)"; window.colorsMobileUI["red-600"] = "rgb(229, 57, 53)"; window.colorsMobileUI["red-700"] = "rgb(211, 47, 47)"; window.colorsMobileUI["red-800"] = "rgb(198, 40, 40)"; window.colorsMobileUI["red-900"] = "rgb(183, 28, 28)"; window.colorsMobileUI["pink"] = "rgb(233, 30, 99)"; window.colorsMobileUI["pink-50"] = "rgb(252, 228, 236)"; window.colorsMobileUI["pink-100"] = "rgb(248, 187, 208)"; window.colorsMobileUI["pink-200"] = "rgb(244, 143, 177)"; window.colorsMobileUI["Pink-300"] = "rgb(240, 98, 146)"; window.colorsMobileUI["pink-400"] = "rgb(236, 64, 122)"; window.colorsMobileUI["pink-500"] = "rgb(233, 30, 99)"; window.colorsMobileUI["pink-600"] = "rgb(216, 27, 96)"; window.colorsMobileUI["pink-700"] = "rgb(194, 24, 91)"; window.colorsMobileUI["pink-800"] = "rgb(173, 20, 87)"; window.colorsMobileUI["pink-900"] = "rgb(136, 14, 79)"; window.colorsMobileUI["purple"] = "rgb(156, 39, 176)"; window.colorsMobileUI["purple-50"] = "rgb(243, 229, 245)"; window.colorsMobileUI["purple-100"] = "rgb(225, 190, 231)"; window.colorsMobileUI["purple-200"] = "rgb(206, 147, 216)"; window.colorsMobileUI["Purple-300"] = "rgb(186, 104, 200)"; window.colorsMobileUI["Purple-400"] = "rgb(171, 71, 188)"; window.colorsMobileUI["purple-500"] = "rgb(156, 39, 176)"; window.colorsMobileUI["purple-600"] = "rgb(142, 36, 170)"; window.colorsMobileUI["purple-700"] = "rgb(123, 31, 162)"; window.colorsMobileUI["purple-800"] = "rgb(106, 27, 154)"; window.colorsMobileUI["purple-900"] = "rgb(74, 20, 140)"; window.colorsMobileUI["deep-purple"] = "rgb(103, 58, 183)"; window.colorsMobileUI["deep-purple-50"] = "rgb(237, 231, 246)"; window.colorsMobileUI["deep-purple-100"] = "rgb(209, 196, 233)"; window.colorsMobileUI["deep-purple-200"] = "rgb(179, 157, 219)"; window.colorsMobileUI["deep-purple-300"] = "rgb(149, 117, 205)"; window.colorsMobileUI["deep-purple-400"] = "rgb(126, 87, 194)"; window.colorsMobileUI["deep-purple-500"] = "rgb(103, 58, 183)"; window.colorsMobileUI["deep-purple-600"] = "rgb(94, 53, 177)"; window.colorsMobileUI["deep-purple-700"] = "rgb(81, 45, 168)"; window.colorsMobileUI["deep-purple-800"] = "rgb(69, 39, 160)"; window.colorsMobileUI["deep-purple-900"] = "rgb(49, 27, 146)"; window.colorsMobileUI["indigo"] = "rgb(63, 81, 181)"; window.colorsMobileUI["indigo-50"] = "rgb(232, 234, 246)"; window.colorsMobileUI["indigo-100"] = "rgb(197, 202, 233)"; window.colorsMobileUI["indigo-200"] = "rgb(159, 168, 218)"; window.colorsMobileUI["indigo-300"] = "rgb(121, 134, 203)"; window.colorsMobileUI["indigo-400"] = "rgb(92, 107, 192)"; window.colorsMobileUI["indigo-500"] = "rgb(63, 81, 181)"; window.colorsMobileUI["indigo-600"] = "rgb(57, 73, 171)"; window.colorsMobileUI["indigo-700"] = "rgb(48, 63, 159)"; window.colorsMobileUI["indigo-800"] = "rgb(40, 53, 147)"; window.colorsMobileUI["indigo-900"] = "rgb(26, 35, 126)"; window.colorsMobileUI["blue"] = "rgb(33, 150, 243)"; window.colorsMobileUI["blue-50"] = "rgb(227, 242, 253)"; window.colorsMobileUI["blue-100"] = "rgb(187, 222, 251)"; window.colorsMobileUI["blue-200"] = "rgb(144, 202, 249)"; window.colorsMobileUI["blue-300"] = "rgb(100, 181, 246)"; window.colorsMobileUI["blue-400"] = "rgb(66, 165, 245)"; window.colorsMobileUI["blue-500"] = "rgb(33, 150, 243)"; window.colorsMobileUI["blue-600"] = "rgb(30, 136, 229)"; window.colorsMobileUI["blue-700"] = "rgb(25, 118, 210)"; window.colorsMobileUI["blue-800"] = "rgb(21, 101, 192)"; window.colorsMobileUI["blue-900"] = "rgb(13, 71, 161)"; window.colorsMobileUI["light-blue"] = "rgb(3, 169, 244)"; window.colorsMobileUI["light-blue-50"] = "rgb(225, 245, 254)"; window.colorsMobileUI["light-blue-100"] = "rgb(179, 229, 252)"; window.colorsMobileUI["light-blue-200"] = "rgb(129, 212, 250)"; window.colorsMobileUI["light-blue-300"] = "rgb(79, 195, 247)"; window.colorsMobileUI["light-blue-400"] = "rgb(41, 182, 246)"; window.colorsMobileUI["light-blue-500"] = "rgb(3, 169, 244)"; window.colorsMobileUI["light-blue-600"] = "rgb(3, 155, 229)"; window.colorsMobileUI["light-blue-700"] = "rgb(2, 136, 209)"; window.colorsMobileUI["light-blue-800"] = "rgb(2, 119, 189)"; window.colorsMobileUI["light-blue-900"] = "rgb(1, 87, 155)"; window.colorsMobileUI["cyan"] = "rgb(0, 188, 212)"; window.colorsMobileUI["cyan-50"] = "rgb(224, 247, 250)"; window.colorsMobileUI["cyan-100"] = "rgb(178, 235, 242)"; window.colorsMobileUI["cyan-200"] = "rgb(128, 222, 234)"; window.colorsMobileUI["cyan-300"] = "rgb(77, 208, 225)"; window.colorsMobileUI["cyan-400"] = "rgb(38, 198, 218)"; window.colorsMobileUI["cyan-500"] = "rgb(0, 188, 212)"; window.colorsMobileUI["cyan-600"] = "rgb(0, 172, 193)"; window.colorsMobileUI["cyan-700"] = "rgb(0, 151, 167)"; window.colorsMobileUI["cyan-800"] = "rgb(0, 131, 143)"; window.colorsMobileUI["cyan-900"] = "rgb(0, 96, 100)"; window.colorsMobileUI["teal"] = "rgb(0, 150, 136)"; window.colorsMobileUI["teal-50"] = "rgb(224, 242, 241)"; window.colorsMobileUI["teal-100"] = "rgb(178, 223, 219)"; window.colorsMobileUI["teal-200"] = "rgb(128, 203, 196)"; window.colorsMobileUI["teal-300"] = "rgb(77, 182, 172)"; window.colorsMobileUI["teal-400"] = "rgb(38, 166, 154)"; window.colorsMobileUI["teal-500"] = "rgb(0, 150, 136)"; window.colorsMobileUI["teal-600"] = "rgb(0, 137, 123)"; window.colorsMobileUI["teal-700"] = "rgb(0, 121, 107)"; window.colorsMobileUI["teal-800"] = "rgb(0, 105, 92)"; window.colorsMobileUI["teal-900"] = "rgb(0, 77, 64)"; window.colorsMobileUI["green"] = "rgb(76, 175, 80)"; window.colorsMobileUI["green-50"] = "rgb(232, 245, 233)"; window.colorsMobileUI["green-100"] = "rgb(200, 230, 201)"; window.colorsMobileUI["green-200"] = "rgb(165, 214, 167)"; window.colorsMobileUI["green-300"] = "rgb(129, 199, 132)"; window.colorsMobileUI["green-400"] = "rgb(102, 187, 106)"; window.colorsMobileUI["green-500"] = "rgb(76, 175, 80)"; window.colorsMobileUI["green-600"] = "rgb(67, 160, 71)"; window.colorsMobileUI["green-700"] = "rgb(56, 142, 60)"; window.colorsMobileUI["green-800"] = "rgb(46, 125, 50)"; window.colorsMobileUI["green-900"] = "rgb(27, 94, 32)"; window.colorsMobileUI["light-green"] = "rgb(139, 195, 74)"; window.colorsMobileUI["light-green-50"] = "rgb(241, 248, 233)"; window.colorsMobileUI["light-green-100"] = "rgb(220, 237, 200)"; window.colorsMobileUI["light-green-200"] = "rgb(197, 225, 165)"; window.colorsMobileUI["light-green-300"] = "rgb(174, 213, 129)"; window.colorsMobileUI["light-green-400"] = "rgb(156, 204, 101)"; window.colorsMobileUI["light-green-500"] = "rgb(139, 195, 74)"; window.colorsMobileUI["light-green-600"] = "rgb(124, 179, 66)"; window.colorsMobileUI["light-green-700"] = "rgb(104, 159, 56)"; window.colorsMobileUI["light-green-800"] = "rgb(85, 139, 47)"; window.colorsMobileUI["light-green-900"] = "rgb(51, 105, 30)"; window.colorsMobileUI["lime"] = "rgb(205, 220, 57)"; window.colorsMobileUI["lime-50"] = "rgb(249, 251, 231)"; window.colorsMobileUI["lime-100"] = "rgb(240, 244, 195)"; window.colorsMobileUI["lime-200"] = "rgb(230, 238, 156)"; window.colorsMobileUI["lime-300"] = "rgb(220, 231, 117)"; window.colorsMobileUI["lime-400"] = "rgb(212, 225, 87)"; window.colorsMobileUI["lime-500"] = "rgb(205, 220, 57)"; window.colorsMobileUI["lime-600"] = "rgb(192, 202, 51)"; window.colorsMobileUI["lime-700"] = "rgb(175, 180, 43)"; window.colorsMobileUI["lime-800"] = "rgb(158, 157, 36)"; window.colorsMobileUI["lime-900"] = "rgb(130, 119, 23)"; window.colorsMobileUI["yellow"] = "rgb(255, 235, 59)"; window.colorsMobileUI["yellow-50"] = "rgb(255, 253, 231)"; window.colorsMobileUI["yellow-100"] = "rgb(255, 249, 196)"; window.colorsMobileUI["yellow-200"] = "rgb(255, 245, 157)"; window.colorsMobileUI["yellow-300"] = "rgb(255, 241, 118)"; window.colorsMobileUI["yellow-400"] = "rgb(255, 238, 88)"; window.colorsMobileUI["yellow-500"] = "rgb(255, 235, 59)"; window.colorsMobileUI["yellow-600"] = "rgb(253, 216, 53)"; window.colorsMobileUI["yellow-700"] = "rgb(251, 192, 45)"; window.colorsMobileUI["yellow-800"] = "rgb(249, 168, 37)"; window.colorsMobileUI["yellow-900"] = "rgb(245, 127, 23)"; window.colorsMobileUI["amber"] = "rgb(255, 193, 7)"; window.colorsMobileUI["amber-50"] = "rgb(255, 248, 225)"; window.colorsMobileUI["amber-100"] = "rgb(255, 236, 179)"; window.colorsMobileUI["amber-200"] = "rgb(255, 224, 130)"; window.colorsMobileUI["amber-300"] = "rgb(255, 213, 79)"; window.colorsMobileUI["amber-400"] = "rgb(255, 202, 40)"; window.colorsMobileUI["amber-500"] = "rgb(255, 193, 7)"; window.colorsMobileUI["amber-600"] = "rgb(255, 179, 0)"; window.colorsMobileUI["amber-700"] = "rgb(255, 160, 0)"; window.colorsMobileUI["amber-800"] = "rgb(255, 143, 0)"; window.colorsMobileUI["amber-900"] = "rgb(255, 111, 0)"; window.colorsMobileUI["orange"] = "rgb(255, 152, 0)"; window.colorsMobileUI["orange-50"] = "rgb(255, 243, 224)"; window.colorsMobileUI["orange-100"] = "rgb(255, 224, 178)"; window.colorsMobileUI["orange-200"] = "rgb(255, 204, 128)"; window.colorsMobileUI["orange-300"] = "rgb(255, 183, 77)"; window.colorsMobileUI["orange-400"] = "rgb(255, 167, 38)"; window.colorsMobileUI["orange-500"] = "rgb(255, 152, 0)"; window.colorsMobileUI["orange-600"] = "rgb(251, 140, 0)"; window.colorsMobileUI["orange-700"] = "rgb(245, 124, 0)"; window.colorsMobileUI["orange-800"] = "rgb(239, 108, 0)"; window.colorsMobileUI["orange-900"] = "rgb(230, 81, 0)"; window.colorsMobileUI["deep-orange"] = "rgb(255, 87, 34)"; window.colorsMobileUI["deep-orange-50"] = "rgb(251, 233, 231)"; window.colorsMobileUI["deep-orange-100"] = "rgb(255, 204, 188)"; window.colorsMobileUI["deep-orange-200"] = "rgb(255, 171, 145)"; window.colorsMobileUI["deep-orange-300"] = "rgb(255, 138, 101)"; window.colorsMobileUI["deep-orange-400"] = "rgb(255, 112, 67)"; window.colorsMobileUI["deep-orange-500"] = "rgb(255, 87, 34)"; window.colorsMobileUI["deep-orange-600"] = "rgb(244, 81, 30)"; window.colorsMobileUI["deep-orange-700"] = "rgb(230, 74, 25)"; window.colorsMobileUI["deep-orange-800"] = "rgb(216, 67, 21)"; window.colorsMobileUI["deep-orange-900"] = "rgb(191, 54, 12)"; window.colorsMobileUI["brown"] = "rgb(121, 85, 72)"; window.colorsMobileUI["brown-50"] = "rgb(239, 235, 233)"; window.colorsMobileUI["brown-100"] = "rgb(215, 204, 200)"; window.colorsMobileUI["brown-200"] = "rgb(188, 170, 164)"; window.colorsMobileUI["brown-300"] = "rgb(161, 136, 127)"; window.colorsMobileUI["brown-400"] = "rgb(141, 110, 99)"; window.colorsMobileUI["brown-500"] = "rgb(121, 85, 72)"; window.colorsMobileUI["brown-600"] = "rgb(109, 76, 65)"; window.colorsMobileUI["brown-700"] = "rgb(93, 64, 55)"; window.colorsMobileUI["brown-800"] = "rgb(78, 52, 46)"; window.colorsMobileUI["brown-900"] = "rgb(62, 39, 35)"; window.colorsMobileUI["grey"] = "rgb(158, 158, 158)"; window.colorsMobileUI["grey-50"] = "rgb(250, 250, 250)"; window.colorsMobileUI["grey-100"] = "rgb(245, 245, 245)"; window.colorsMobileUI["grey-200"] = "rgb(238, 238, 238)"; window.colorsMobileUI["grey-300"] = "rgb(224, 224, 224)"; window.colorsMobileUI["grey-400"] = "rgb(189, 189, 189)"; window.colorsMobileUI["grey-500"] = "rgb(158, 158, 158)"; window.colorsMobileUI["grey-600"] = "rgb(117, 117, 117)"; window.colorsMobileUI["grey-700"] = "rgb(97, 97, 97)"; window.colorsMobileUI["grey-800"] = "rgb(66, 66, 66)"; window.colorsMobileUI["grey-900"] = "rgb(33, 33, 33)"; window.colorsMobileUI["blue-grey"] = "rgb(96, 125, 139)"; window.colorsMobileUI["blue-grey-50"] = "rgb(236, 239, 241)"; window.colorsMobileUI["blue-grey-100"] = "rgb(207, 216, 220)"; window.colorsMobileUI["blue-grey-200"] = "rgb(176, 190, 197)"; window.colorsMobileUI["blue-grey-300"] = "rgb(144, 164, 174)"; window.colorsMobileUI["blue-grey-400"] = "rgb(120, 144, 156)"; window.colorsMobileUI["blue-grey-500"] = "rgb(96, 125, 139)"; window.colorsMobileUI["blue-grey-600"] = "rgb(84, 110, 122)"; window.colorsMobileUI["blue-grey-700"] = "rgb(69, 90, 100)"; window.colorsMobileUI["blue-grey-800"] = "rgb(55, 71, 79)"; window.colorsMobileUI["blue-grey-900"] = "rgb(38, 50, 56)"; window.colorsMobileUI["black"] = "rgb(0, 0, 0)"; window.colorsMobileUI["white"] = "rgb(255, 255, 255)"; window.colorsMobileUI["black-opacity-90"] = "rgba(0, 0, 0, 0.9)"; window.colorsMobileUI["white-opacity-90"] = "rgba(255, 255, 255, 0.9)"; window.colorsMobileUI["black-opacity-70"] = "rgba(0, 0, 0, 0.8)"; window.colorsMobileUI["white-opacity-70"] = "rgba(255, 255, 255, 0.7)"; window.colorsMobileUI["black-opacity-50"] = "rgba(0, 0, 0, 0.7)"; window.colorsMobileUI["white-opacity-50"] = "rgba(255, 255, 255, 0.5)"; window.colorsMobileUI["black-opacity-30"] = "rgba(0, 0, 0, 0.6)"; window.colorsMobileUI["white-opacity-30"] = "rgba(255, 255, 255, 0.3)"; window.colorsMobileUI["black-opacity-10"] = "rgba(0, 0, 0, 0.5)"; window.colorsMobileUI["white-opacity-10"] = "rgba(255, 255, 255, 0.1)"; })(); ================================================ FILE: mobileui-colors/style.css ================================================ ================================================ FILE: mobileuijs/component.json ================================================ { "name":"mobileuijs", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: mobileuijs/index.html ================================================

MobileUI.JS

This component is a simple library for manipulating data, states of elements and Ajax request in JavaScript.

To use this component you need install with the command:

mobileui install mobileuijs

The most important functionality is the observation in objects and arrays. For use you need add attribute data in your HTML element with the name of a object or array. This causes an element to be changed if the object or array is modified and you can display using a escape expression ${}

MobileUI.js embed the lib SuperAgent for call ajax request, because it is light-weight progressive ajax API crafted for flexibility, readability, and a low learning curve.

In this example a have a object with attributes of user:

And in my HTML I have an element that uses this created object as data:

In this example a have a array with objects of user:

And in my HTML I have an element that uses this created array as data:

If you add another object in array, the HTML elements will update. Check this feature in action:

The features of this component are:

Function Description
MobileUI.objectByForm('idElement') Returns an object with the values of the inputs found within the given element.
MobileUI.formByObject('idElement', object) Set the input values from an informed object.
MobileUI.clearForm('idElement') Clear and reset inputs within the entered element.
MobileUI.ajax Ajax request flexibility, readability, and a low learning curve using SuperAgent.
MobileUI.show('idElement') Display an element that is hidden.
MobileUI.hide('idElement') Hidden an element.
MobileUI.showHide('idElement') Display an element that is hidden or hides an element if it is visible.
MobileUI.focus('idElement') Focus on an element, if input to keyboard is displayed.
MobileUI.disable('idElement') Disable an element and your children's.
MobileUI.enable('idElement') Enable an element and your children's.
document.addEventListener('dataUpdated') Fire event when data is updated, you can check whats is data in the event.detail, ex:
document.addEventListener('dataUpdated', function(event){ //event.detail.dataKey //event.detail.dataValue })
MobileUI.formatMoney(number) Returns a string formatted in money, you can pass the number of decimal places, the decimal separator, and the thousands separator.
Example:

MobileUI.formatMoney(256)
MobileUI.formatMoney(1256, 2, ',','.')
MobileUI.myFunction = function(params){} You can create a custom function for use in data list HTML validation, example $$$myFunction{par1}

See this example using ajax request.

================================================ FILE: mobileuijs/script.js ================================================ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.superagent=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=200&&a.status<300)},e.prototype.get=function(a){return this._header[a.toLowerCase()]},e.prototype.getHeader=e.prototype.get,e.prototype.set=function(a,b){if(d(a)){for(var c in a)this.set(c,a[c]);return this}return this._header[a.toLowerCase()]=b,this.header[a]=b,this},e.prototype.unset=function(a){return delete this._header[a.toLowerCase()],delete this.header[a],this},e.prototype.field=function(a,b){if(null===a||void 0===a)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),d(a)){for(var c in a)this.field(c,a[c]);return this}if(Array.isArray(b)){for(var e in b)this.field(a,b[e]);return this}if(null===b||void 0===b)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof b&&(b=""+b),this._getFormData().append(a,b),this},e.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},e.prototype.withCredentials=function(a){return void 0==a&&(a=!0),this._withCredentials=a,this},e.prototype.redirects=function(a){return this._maxRedirects=a,this},e.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},e.prototype.send=function(a){var b=d(a),c=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),b&&!this._data)Array.isArray(a)?this._data=[]:this._isHost(a)||(this._data={});else if(a&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(b&&d(this._data))for(var e in a)this._data[e]=a[e];else"string"==typeof a?(c||this.type("form"),c=this._header["content-type"],this._data="application/x-www-form-urlencoded"==c?this._data?this._data+"&"+a:a:(this._data||"")+a):this._data=a;return!b||this._isHost(a)?this:(c||this.type("json"),this)},e.prototype.sortQuery=function(a){return this._sort=void 0===a||a,this},e.prototype._timeoutError=function(a,b,c){if(!this._aborted){var d=new Error(a+b+"ms exceeded");d.timeout=b,d.code="ECONNABORTED",d.errno=c,this.timedout=!0,this.abort(),this.callback(d)}},e.prototype._setTimeouts=function(){var a=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){a._timeoutError("Timeout of ",a._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){a._timeoutError("Response timeout of ",a._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":2}],4:[function(a,b,c){function e(a){if(a)return f(a)}function f(a){for(var b in e.prototype)a[b]=e.prototype[b];return a}var d=a("./utils");b.exports=e,e.prototype.get=function(a){return this.header[a.toLowerCase()]},e.prototype._setHeaderProperties=function(a){var b=a["content-type"]||"";this.type=d.type(b);var c=d.params(b);for(var e in c)this[e]=c[e];this.links={};try{a.link&&(this.links=d.parseLinks(a.link))}catch(a){}},e.prototype._setStatusProperties=function(a){var b=a/100|0;this.status=this.statusCode=a,this.statusType=b,this.info=1==b,this.ok=2==b,this.redirect=3==b,this.clientError=4==b,this.serverError=5==b,this.error=(4==b||5==b)&&this.toError(),this.accepted=202==a,this.noContent=204==a,this.badRequest=400==a,this.unauthorized=401==a,this.notAcceptable=406==a,this.forbidden=403==a,this.notFound=404==a}},{"./utils":6}],5:[function(a,b,c){var d=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];b.exports=function(b,c){return!!(b&&b.code&&~d.indexOf(b.code))||(!!(c&&c.status&&c.status>=500)||(!!(b&&"timeout"in b&&"ECONNABORTED"==b.code)||!!(b&&"crossDomain"in b)))}},{}],6:[function(a,b,c){c.type=function(a){return a.split(/ *; */).shift()},c.params=function(a){return a.split(/ *; */).reduce(function(a,b){var c=b.split(/ *= */),d=c.shift(),e=c.shift();return d&&e&&(a[d]=e),a},{})},c.parseLinks=function(a){return a.split(/ *, */).reduce(function(a,b){var c=b.split(/ *; */),d=c[0].slice(1,-1);return a[c[1].split(/ *= */)[1].slice(1,-1)]=d,a},{})},c.cleanHeader=function(a,b){return delete a["content-type"],delete a["content-length"],delete a["transfer-encoding"],delete a.host,b&&delete a.cookie,a}},{}],7:[function(a,b,c){function d(a){if(a)return e(a)}function e(a){for(var b in d.prototype)a[b]=d.prototype[b];return a}void 0!==b&&(b.exports=d),d.prototype.on=d.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(b),this},d.prototype.once=function(a,b){function c(){this.off(a,c),b.apply(this,arguments)}return c.fn=b,this.on(a,c),this},d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=d.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks["$"+a];if(!c)return this;if(1==arguments.length)return delete this._callbacks["$"+a],this;for(var d,e=0;e=0?"&":"?")+a),this._sort){var b=this.url.indexOf("?");if(b>=0){var c=this.url.substring(b+1).split("&");h(this._sort)?c.sort(this._sort):c.sort(),this.url=this.url.substring(0,b)+"?"+c.join("&")}}},t.prototype._isHost=function(b){return b&&"object"==typeof b&&!Array.isArray(b)&&"[object Object]"!==Object.prototype.toString.call(b)},t.prototype.end=function(a){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=a||k,this._appendQueryString(),this._end()},t.prototype._end=function(){var a=this,b=this.xhr=l.getXHR(),c=this._formData||this._data;this._setTimeouts(),b.onreadystatechange=function(){var c=b.readyState;if(c>=2&&a._responseTimeoutTimer&&clearTimeout(a._responseTimeoutTimer),4==c){var d;try{d=b.status}catch(a){d=0}if(!d){if(a.timedout||a._aborted)return;return a.crossDomainError()}a.emit("end")}};var d=function(b,c){c.total>0&&(c.percent=c.loaded/c.total*100),c.direction=b,a.emit("progress",c)};if(this.hasListeners("progress"))try{b.onprogress=d.bind(null,"download"),b.upload&&(b.upload.onprogress=d.bind(null,"upload"))}catch(a){}try{this.username&&this.password?b.open(this.method,this.url,!0,this.username,this.password):b.open(this.method,this.url,!0)}catch(a){return this.callback(a)}if(this._withCredentials&&(b.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof c&&!this._isHost(c)){var e=this._header["content-type"],f=this._serializer||l.serialize[e?e.split(";")[0]:""];!f&&r(e)&&(f=l.serialize["application/json"]),f&&(c=f(c))}for(var g in this.header)null!=this.header[g]&&this.header.hasOwnProperty(g)&&b.setRequestHeader(g,this.header[g]);return this._responseType&&(b.responseType=this._responseType),this.emit("request",this),b.send(void 0!==c?c:null),this},l.get=function(a,b,c){var d=l("GET",a);return"function"==typeof b&&(c=b,b=null),b&&d.query(b),c&&d.end(c),d},l.head=function(a,b,c){var d=l("HEAD",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},l.options=function(a,b,c){var d=l("OPTIONS",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},l.del=u,l.delete=u,l.patch=function(a,b,c){var d=l("PATCH",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},l.post=function(a,b,c){var d=l("POST",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d},l.put=function(a,b,c){var d=l("PUT",a);return"function"==typeof b&&(c=b,b=null),b&&d.send(b),c&&d.end(c),d}},{"./is-function":1,"./is-object":2,"./request-base":3,"./response-base":4,"./should-retry":5,"component-emitter":7}]},{},[8])(8)}); (function() { var observerWatchers = []; var tokenObserver = 0; var dataBind = function(){ var elms = document.querySelectorAll('[data]'); for (var i = 0; i < elms.length; i++) { if(elms[i].getAttribute('data') && !elms[i].getAttribute('data-binded')){ var data = elms[i].getAttribute('data'); data = fetchFromObject(window, data); if(data){ writeElement(elms[i], data); elms[i].setAttribute('data-binded','mobileui'); dataObserver(elms[i].getAttribute('data'), tokenObserver++); } else { } } } eventLoopBind(); } eventLoopBind = function(){ setTimeout(function(){ dataBind(); },100); } reDataBind = function(observerWatcher){ //TODO: Improve logic for performance var data = fetchFromObject(window, observerWatcher.dataKey); var elms = document.querySelectorAll('[data-binded]'); for (var i = 0; i < elms.length; i++) { if(elms[i].getAttribute('data-binded') === observerWatcher.dataKey){ elms[i].parentNode.removeChild(elms[i]) } } elms = document.querySelectorAll('[data][data-binded]'); for (var i = 0; i < elms.length; i++) { if(elms[i].getAttribute('data') === observerWatcher.dataKey){ writeElement(elms[i], data); } } observerWatcher.dataValue = copyObj(data); } writeElement = function(elm, data){ var bindWriteElement = function(dataObj, index){ var html = elm.outerHTML; var exp = /\${/g; while (match = exp.exec(html)) { var prop = html.slice(match.index+2, html.length).split('}')[0]; var value = fetchFromObject(dataObj,prop); html = html.replace('${'+prop+'}', value); } if(index) { html = html.replace(new RegExp('\\$\\$index', 'g'), index); } //valid funcionBind //TODO: Improve performance and logic var functionBind = html.split('$$'); for (var i = 1; i < functionBind.length; i++) { var prop = functionBind[i].split('{')[1].split(',')[0].split('}')[0]; var value = fetchFromObject(dataObj,prop); var functionName = functionBind[i].split('{')[0]; var functionReplace = functionBind[i].split('}')[0] + '}'; var functionInvoke = 'window.MobileUI.' + functionBind[i].split('}')[0].replace(prop, "'"+value+"'").replace('{','(') + ')'; var valueBind = eval(functionInvoke); html = html.replace(new RegExp('\\$\\$'+functionReplace, 'g'), valueBind); } var divBind = document.createElement('div'); elm.parentNode.insertBefore(divBind, elm); html = html.replace('data=','data-binded='); divBind.outerHTML = html; } if(data.constructor === Array){ for(var id in data){ bindWriteElement(data[id], id); } } else { bindWriteElement(data); } } fetchFromObject = function(obj, prop) { if(typeof obj === 'undefined') { console.error('Object for property ',prop,' is undefined!'); return ''; } var _index = prop.indexOf('.') if(_index > -1) { return fetchFromObject(obj[prop.substring(0, _index)], prop.substr(_index + 1)); } if(obj.constructor === String || obj.constructor === Number || obj.constructor === Boolean || obj.constructor === Date){ return !obj ? '' : obj; } return !obj[prop] ? '' : obj[prop]; } dispatchEventObserver = function(watcher){ var customEvent = new CustomEvent("dataUpdated",{ "detail": {dataKey:watcher.dataKey, dataValue: watcher.dataValue}}); document.dispatchEvent(customEvent); } dataObserver = function(data,token){ if(!observerWatchers[token]) { observerWatchers[token] = { dataKey: data, dataValue: copyObj(fetchFromObject(window, data)) }; } var observer = fetchFromObject(window, observerWatchers[token].dataKey); if(observerWatchers[token].dataValue.constructor === Array && observerWatchers[token].dataValue.length !== observer.length){ //TODO: Improve logic for performance reDataBind(observerWatchers[token]); dispatchEventObserver(observerWatchers[token]); } else if(observerWatchers[token].dataValue.constructor === Array && observerWatchers[token].dataValue.toString() !== observer.toString()){ //TODO: Improve logic for performance reDataBind(observerWatchers[token]); dispatchEventObserver(observerWatchers[token]); } else if(JSON.stringify(observerWatchers[token].dataValue) !== JSON.stringify(observer)){ //TODO: Improve logic for performance reDataBind(observerWatchers[token]); dispatchEventObserver(observerWatchers[token]); } setTimeout(function(){ dataObserver(data, token) }, 100); } copyObj = function(obj){ return JSON.parse(JSON.stringify(obj)); } dataBind(); //Functions Help window.MobileUI = { bind: function(){ dataBind(); }, objectByForm: function(id){ var form = document.getElementById(id); var obj = {}; var elms = form.querySelectorAll('input,textarea,select'); for (var i = 0; i < elms.length; i++) { if(elms[i].id && elms[i].type === 'checkbox'){ obj[elms[i].id] = elms[i].checked; } else if(elms[i].name && elms[i].type === 'radio'){ var valueRaio = form.querySelector('input[name="'+elms[i].name+'"]:checked').value; if(valueRaio){ obj[elms[i].name] = valueRaio; } } else if(elms[i].id) { obj[elms[i].id] = elms[i].value; } } return obj; }, disable: function(id){ var form = document.getElementById(id); var elms = form.querySelectorAll('input,textarea,select,button,a'); for (var i = 0; i < elms.length; i++) { elms[i].setAttribute('disabled','disabled'); } }, enable: function(id){ var form = document.getElementById(id); var elms = form.querySelectorAll('input,textarea,select,button,a'); for (var i = 0; i < elms.length; i++) { elms[i].removeAttribute('disabled'); } }, formByObject: function(id, data){ var form = document.getElementById(id); var elms = form.querySelectorAll('input,textarea,select'); for (var i = 0; i < elms.length; i++) { if(elms[i].id && elms[i].type === 'checkbox'){ elms[i].checked = data[elms[i].id]; } else if(elms[i].name && elms[i].type === 'radio'){ var inputRadio = form.querySelector('input[name="'+elms[i].name+'"][value="'+data[elms[i].name]+'"]'); if(inputRadio){ inputRadio.checked=true; } } else if(elms[i].id && data[elms[i].id]) { elms[i].value = data[elms[i].id]; } } }, clearForm: function(id){ var form = document.getElementById(id); var elms = form.querySelectorAll('input,textarea,select'); for (var i = 0; i < elms.length; i++) { if(elms[i].id && elms[i].type.indexOf('select') >= 0) { var options = elms[i].options; for (var iO = 0; iO < options.length; iO++) { if(options[iO].defaultSelected){ elms[i].selectedIndex = iO; elms[i].found=true; } } if(!elms[i].found){ elms[i].selectedIndex = 0; } } else if(elms[i].id && elms[i].type === 'checkbox') { elms[i].checked = elms[i].getAttribute('checked')!==null ? true : false; } else if(elms[i].name && elms[i].type === 'radio') { form.querySelector('input[name="'+elms[i].name+'"][checked]').checked=true; } else if(elms[i].id){ elms[i].value = ''; } } }, show: function(id){ document.getElementById(id).style.display='block'; }, hide: function(id){ document.getElementById(id).style.display='none'; }, showHide: function(id){ if(document.getElementById(id).offsetParent === null){ this.show(id); } else { this.hide(id); } }, focus: function(id){ document.getElementById(id).focus(); }, formatMoney: function(n, c, d, t){ var c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "." : d, t = t == undefined ? "," : t, s = n < 0 ? "-" : "", i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))), j = (j = i.length) > 3 ? j % 3 : 0; return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); }, ajax: superagent } })(); ================================================ FILE: mobileuijs/style.css ================================================ *[data] { display: none !important; } ================================================ FILE: momentjs/component.json ================================================ { "name":"momentjs", "author": "timrwood", "dependencies": [] } ================================================ FILE: momentjs/index.html ================================================

Moment.js

Moment.js is a lightweight JavaScript date library for parsing, manipulating, and formatting dates. It is design to work in both the browser and in NodeJS. Moment supports dates in all standard formats, locales, relative time, and time zones.

To use this component you need install with the command:

mobileui install momentjs

See the Moment.js documentation and its resources at momentjs.com/docs.

================================================ FILE: momentjs/script.js ================================================ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function e(){return Yt.apply(null,arguments)}function t(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function i(e){return void 0===e}function r(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function o(e,t){var n,s=[];for(n=0;n0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}function C(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(Vt[e]=i),t&&(Vt[t[0]]=function(){return R(i.apply(this,arguments),t[1],t[2])}),n&&(Vt[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function F(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,n,s=e.match(Ht);for(t=0,n=s.length;t=0&&Lt.test(e);)e=e.replace(Lt,function(e){return t.longDateFormat(e)||e}),Lt.lastIndex=0,n-=1;return e}function L(e,t,n){rn[e]=D(t)?t:function(e,s){return e&&n?n:t}}function G(e,t){return u(rn,e)?rn[e](t._strict,t._locale):new RegExp(V(e))}function V(e){return j(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i}))}function j(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function I(e,t){var n,s=t;for("string"==typeof e&&(e=[e]),r(t)&&(s=function(e,n){n[t]=w(e)}),n=0;n=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}function se(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ie(e,t,n){var s=7+t-n;return-((7+se(e,0,s).getUTCDay()-t)%7)+s-1}function re(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+ie(e,s,i);return o<=0?a=z(r=e-1)+o:o>z(e)?(r=e+1,a=o-z(e)):(r=e,a=o),{year:r,dayOfYear:a}}function ae(e,t,n){var s,i,r=ie(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+oe(i=e.year()-1,t,n):a>oe(e.year(),t,n)?(s=a-oe(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function oe(e,t,n){var s=ie(e,t,n),i=ie(e+1,t,n);return(z(e)-s+i)/7}function ue(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function le(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function de(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=d([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=yn.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=yn.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=yn.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=yn.call(this._weekdaysParse,a))?i:-1!==(i=yn.call(this._shortWeekdaysParse,a))?i:-1!==(i=yn.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=yn.call(this._shortWeekdaysParse,a))?i:-1!==(i=yn.call(this._weekdaysParse,a))?i:-1!==(i=yn.call(this._minWeekdaysParse,a))?i:null:-1!==(i=yn.call(this._minWeekdaysParse,a))?i:-1!==(i=yn.call(this._weekdaysParse,a))?i:-1!==(i=yn.call(this._shortWeekdaysParse,a))?i:null}function he(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=j(o[t]),u[t]=j(u[t]),l[t]=j(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function ce(){return this.hours()%12||12}function fe(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function me(e,t){return t._meridiemParse}function _e(e){return e?e.toLowerCase().replace("_","-"):e}function ye(e){for(var t,n,s,i,r=0;r0;){if(s=ge(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&v(i,n,!0)>=t-1)break;t--}r++}return null}function ge(e){var t=null;if(!Fn[e]&&"undefined"!=typeof module&&module&&module.exports){t=Pn._abbr;try{require("moment/locale/"+e)}catch(t){try{require("./locale/"+e)}catch(e){}}pe(t)}return Fn[e]}function pe(e,t){var n;return e&&(n=i(t)?ve(e):we(e,t))&&(Pn=n),Pn._abbr}function we(e,t){if(null!==t){var n=Cn;if(t.abbr=e,null!=Fn[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Fn[e]._config;else if(null!=t.parentLocale){if(null==Fn[t.parentLocale])return Un[t.parentLocale]||(Un[t.parentLocale]=[]),Un[t.parentLocale].push({name:e,config:t}),null;n=Fn[t.parentLocale]._config}return Fn[e]=new O(Y(n,t)),Un[e]&&Un[e].forEach(function(e){we(e.name,e.config)}),pe(e),Fn[e]}return delete Fn[e],null}function ve(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pn;if(!t(e)){if(n=ge(e))return n;e=[e]}return ye(e)}function Me(e){var t,n=e._a;return n&&-2===c(e).overflow&&(t=n[un]<0||n[un]>11?un:n[ln]<1||n[ln]>Q(n[on],n[un])?ln:n[dn]<0||n[dn]>24||24===n[dn]&&(0!==n[hn]||0!==n[cn]||0!==n[fn])?dn:n[hn]<0||n[hn]>59?hn:n[cn]<0||n[cn]>59?cn:n[fn]<0||n[fn]>999?fn:-1,c(e)._overflowDayOfYear&&(tln)&&(t=ln),c(e)._overflowWeeks&&-1===t&&(t=mn),c(e)._overflowWeekday&&-1===t&&(t=_n),c(e).overflow=t),e}function ke(e,t,n){return null!=e?e:null!=t?t:n}function Se(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function De(e){var t,n,s,i,r=[];if(!e._d){for(s=Se(e),e._w&&null==e._a[ln]&&null==e._a[un]&&Ye(e),null!=e._dayOfYear&&(i=ke(e._a[on],s[on]),(e._dayOfYear>z(i)||0===e._dayOfYear)&&(c(e)._overflowDayOfYear=!0),n=se(i,0,e._dayOfYear),e._a[un]=n.getUTCMonth(),e._a[ln]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[dn]&&0===e._a[hn]&&0===e._a[cn]&&0===e._a[fn]&&(e._nextDay=!0,e._a[dn]=0),e._d=(e._useUTC?se:ne).apply(null,r),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[dn]=24),e._w&&void 0!==e._w.d&&e._w.d!==e._d.getDay()&&(c(e).weekdayMismatch=!0)}}function Ye(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ke(t.GG,e._a[on],ae(Ie(),1,4).year),s=ke(t.W,1),((i=ke(t.E,1))<1||i>7)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=ae(Ie(),r,a);n=ke(t.gg,e._a[on],l.year),s=ke(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r}s<1||s>oe(n,r,a)?c(e)._overflowWeeks=!0:null!=u?c(e)._overflowWeekday=!0:(o=re(n,s,i,r,a),e._a[on]=o.year,e._dayOfYear=o.dayOfYear)}function Oe(e){var t,n,s,i,r,a,o=e._i,u=Nn.exec(o)||Hn.exec(o);if(u){for(c(e).iso=!0,t=0,n=Gn.length;t0&&c(t).unusedInput.push(a),o=o.slice(o.indexOf(s)+s.length),l+=s.length),Vt[r]?(s?c(t).empty=!1:c(t).unusedTokens.push(r),A(r,s,t)):t._strict&&!s&&c(t).unusedTokens.push(r);c(t).charsLeftOver=u-l,o.length>0&&c(t).unusedInput.push(o),t._a[dn]<=12&&!0===c(t).bigHour&&t._a[dn]>0&&(c(t).bigHour=void 0),c(t).parsedDateParts=t._a.slice(0),c(t).meridiem=t._meridiem,t._a[dn]=Ue(t._locale,t._a[dn],t._meridiem),De(t),Me(t)}else Re(t);else Oe(t)}function Ue(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function Ne(e){var t,n,s,i,r;if(0===e._f.length)return c(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ir&&(t=r),dt.call(this,e,t,n,s,i))}function dt(e,t,n,s,i){var r=re(e,t,n,s,i),a=se(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function ht(e){return e}function ct(e,t,n,s){var i=ve(),r=d().set(s,t);return i[n](r,e)}function ft(e,t,n){if(r(e)&&(t=e,e=void 0),e=e||"",null!=t)return ct(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=ct(e,s,n,"month");return i}function mt(e,t,n,s){"boolean"==typeof e?(r(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,r(t)&&(n=t,t=void 0),t=t||"");var i=ve(),a=e?i._week.dow:0;if(null!=n)return ct(t,(n+a)%7,s,"day");var o,u=[];for(o=0;o<7;o++)u[o]=ct(t,(o+a)%7,s,"day");return u}function _t(e,t,n,s){var i=Ke(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function yt(e){return e<0?Math.floor(e):Math.ceil(e)}function gt(e){return 4800*e/146097}function pt(e){return 146097*e/4800}function wt(e){return function(){return this.as(e)}}function vt(e){return function(){return this.isValid()?this._data[e]:NaN}}function Mt(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}function kt(e,t,n){var s=Ke(e).abs(),i=ks(s.as("s")),r=ks(s.as("m")),a=ks(s.as("h")),o=ks(s.as("d")),u=ks(s.as("M")),l=ks(s.as("y")),d=i<=Ss.ss&&["s",i]||i0,d[4]=n,Mt.apply(null,d)}function St(e){return(e>0)-(e<0)||+e}function Dt(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s=Ds(this._milliseconds)/1e3,i=Ds(this._days),r=Ds(this._months);t=p((e=p(s/60))/60),s%=60,e%=60;var a=n=p(r/12),o=r%=12,u=i,l=t,d=e,h=s?s.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var f=c<0?"-":"",m=St(this._months)!==St(c)?"-":"",_=St(this._days)!==St(c)?"-":"",y=St(this._milliseconds)!==St(c)?"-":"";return f+"P"+(a?m+a+"Y":"")+(o?m+o+"M":"")+(u?_+u+"D":"")+(l||d||h?"T":"")+(l?y+l+"H":"")+(d?y+d+"M":"")+(h?y+h+"S":"")}var Yt,Ot;Ot=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s68?1900:2e3)};var yn,gn=$("FullYear",!0);yn=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:m()}),Zn=["year","quarter","month","week","day","hour","minute","second","millisecond"];qe("Z",":"),qe("ZZ",""),L("Z",tn),L("ZZ",tn),I(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Je(tn,e)});var $n=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var qn=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Jn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Ke.fn=ze.prototype,Ke.invalid=function(){return Ke(NaN)};var Bn=st(1,"add"),Qn=st(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xn=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ut("gggg","weekYear"),ut("ggggg","weekYear"),ut("GGGG","isoWeekYear"),ut("GGGGG","isoWeekYear"),x("weekYear","gg"),x("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),L("G",Kt),L("g",Kt),L("GG",Zt,It),L("gg",Zt,It),L("GGGG",Bt,At),L("gggg",Bt,At),L("GGGGG",Qt,zt),L("ggggg",Qt,zt),E(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=w(e)}),E(["gg","GG"],function(t,n,s,i){n[i]=e.parseTwoDigitYear(t)}),C("Q",0,"Qo","quarter"),x("quarter","Q"),P("quarter",7),L("Q",jt),I("Q",function(e,t){t[un]=3*(w(e)-1)}),C("D",["DD",2],"Do","date"),x("date","D"),P("date",9),L("D",Zt),L("DD",Zt,It),L("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),I(["D","DD"],ln),I("Do",function(e,t){t[ln]=w(e.match(Zt)[0],10)});var Kn=$("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),x("dayOfYear","DDD"),P("dayOfYear",4),L("DDD",Jt),L("DDDD",Et),I(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),C("m",["mm",2],0,"minute"),x("minute","m"),P("minute",14),L("m",Zt),L("mm",Zt,It),I(["m","mm"],hn);var es=$("Minutes",!1);C("s",["ss",2],0,"second"),x("second","s"),P("second",15),L("s",Zt),L("ss",Zt,It),I(["s","ss"],cn);var ts=$("Seconds",!1);C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),x("millisecond","ms"),P("millisecond",16),L("S",Jt,jt),L("SS",Jt,It),L("SSS",Jt,Et);var ns;for(ns="SSSS";ns.length<=9;ns+="S")L(ns,Xt);for(ns="S";ns.length<=9;ns+="S")I(ns,function(e,t){t[fn]=w(1e3*("0."+e))});var ss=$("Milliseconds",!1);C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var is=y.prototype;is.add=Bn,is.calendar=function(t,n){var s=t||Ie(),i=Be(s,this).startOf("day"),r=e.calendarFormat(this,i)||"sameElse",a=n&&(D(n[r])?n[r].call(this,s):n[r]);return this.format(a||this.localeData().calendar(r,this,Ie(s)))},is.clone=function(){return new y(this)},is.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Be(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=T(t)){case"year":r=rt(this,s)/12;break;case"month":r=rt(this,s);break;case"quarter":r=rt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:p(r)},is.endOf=function(e){return void 0===(e=T(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},is.format=function(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=N(this,t);return this.localeData().postformat(n)},is.from=function(e,t){return this.isValid()&&(g(e)&&e.isValid()||Ie(e).isValid())?Ke({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},is.fromNow=function(e){return this.from(Ie(),e)},is.to=function(e,t){return this.isValid()&&(g(e)&&e.isValid()||Ie(e).isValid())?Ke({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},is.toNow=function(e){return this.to(Ie(),e)},is.get=function(e){return e=T(e),D(this[e])?this[e]():this},is.invalidAt=function(){return c(this).overflow},is.isAfter=function(e,t){var n=g(e)?e:Ie(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=T(i(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?N(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):D(Date.prototype.toISOString)?this.toDate().toISOString():N(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},is.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},is.toJSON=function(){return this.isValid()?this.toISOString():null},is.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},is.unix=function(){return Math.floor(this.valueOf()/1e3)},is.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},is.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},is.year=gn,is.isLeapYear=function(){return Z(this.year())},is.weekYear=function(e){return lt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},is.isoWeekYear=function(e){return lt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},is.quarter=is.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},is.month=ee,is.daysInMonth=function(){return Q(this.year(),this.month())},is.week=is.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},is.isoWeek=is.isoWeeks=function(e){var t=ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},is.weeksInYear=function(){var e=this.localeData()._week;return oe(this.year(),e.dow,e.doy)},is.isoWeeksInYear=function(){return oe(this.year(),1,4)},is.date=Kn,is.day=is.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=ue(e,this.localeData()),this.add(e-t,"d")):t},is.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},is.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=le(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},is.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},is.hour=is.hours=Rn,is.minute=is.minutes=es,is.second=is.seconds=ts,is.millisecond=is.milliseconds=ss,is.utcOffset=function(t,n,s){var i,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Je(tn,t)))return this}else Math.abs(t)<16&&!s&&(t*=60);return!this._isUTC&&n&&(i=Qe(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==t&&(!n||this._changeInProgress?it(this,Ke(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Qe(this)},is.utc=function(e){return this.utcOffset(0,e)},is.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Qe(this),"m")),this},is.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Je(en,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},is.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ie(e).utcOffset():0,(this.utcOffset()-e)%60==0)},is.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},is.isLocal=function(){return!!this.isValid()&&!this._isUTC},is.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},is.isUtc=Xe,is.isUTC=Xe,is.zoneAbbr=function(){return this._isUTC?"UTC":""},is.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},is.dates=k("dates accessor is deprecated. Use date instead.",Kn),is.months=k("months accessor is deprecated. Use month instead",ee),is.years=k("years accessor is deprecated. Use year instead",gn),is.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),is.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!i(this._isDSTShifted))return this._isDSTShifted;var e={};if(_(e,this),(e=Ge(e))._a){var t=e._isUTC?d(e._a):Ie(e._a);this._isDSTShifted=this.isValid()&&v(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var rs=O.prototype;rs.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return D(s)?s.call(t,n):s},rs.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},rs.invalidDate=function(){return this._invalidDate},rs.ordinal=function(e){return this._ordinal.replace("%d",e)},rs.preparse=ht,rs.postformat=ht,rs.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return D(i)?i(e,t,n,s):i.replace(/%d/i,e)},rs.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},rs.set=function(e){var t,n;for(n in e)D(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},rs.months=function(e,n){return e?t(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||pn).test(n)?"format":"standalone"][e.month()]:t(this._months)?this._months:this._months.standalone},rs.monthsShort=function(e,n){return e?t(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[pn.test(n)?"format":"standalone"][e.month()]:t(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},rs.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return X.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=d([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},rs.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||te.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=kn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},rs.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||te.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=Mn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},rs.week=function(e){return ae(e,this._week.dow,this._week.doy).week},rs.firstDayOfYear=function(){return this._week.doy},rs.firstDayOfWeek=function(){return this._week.dow},rs.weekdays=function(e,n){return e?t(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(n)?"format":"standalone"][e.day()]:t(this._weekdays)?this._weekdays:this._weekdays.standalone},rs.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},rs.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},rs.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return de.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=d([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},rs.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=xn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},rs.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Tn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},rs.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||he.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=bn),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},rs.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},rs.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",pe),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ve);var as=Math.abs,os=wt("ms"),us=wt("s"),ls=wt("m"),ds=wt("h"),hs=wt("d"),cs=wt("w"),fs=wt("M"),ms=wt("y"),_s=vt("milliseconds"),ys=vt("seconds"),gs=vt("minutes"),ps=vt("hours"),ws=vt("days"),vs=vt("months"),Ms=vt("years"),ks=Math.round,Ss={ss:44,s:45,m:45,h:22,d:26,M:11},Ds=Math.abs,Ys=ze.prototype;return Ys.isValid=function(){return this._isValid},Ys.abs=function(){var e=this._data;return this._milliseconds=as(this._milliseconds),this._days=as(this._days),this._months=as(this._months),e.milliseconds=as(e.milliseconds),e.seconds=as(e.seconds),e.minutes=as(e.minutes),e.hours=as(e.hours),e.months=as(e.months),e.years=as(e.years),this},Ys.add=function(e,t){return _t(this,e,t,1)},Ys.subtract=function(e,t){return _t(this,e,t,-1)},Ys.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=T(e))||"year"===e)return t=this._days+s/864e5,n=this._months+gt(t),"month"===e?n:n/12;switch(t=this._days+Math.round(pt(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},Ys.asMilliseconds=os,Ys.asSeconds=us,Ys.asMinutes=ls,Ys.asHours=ds,Ys.asDays=hs,Ys.asWeeks=cs,Ys.asMonths=fs,Ys.asYears=ms,Ys.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Ys._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*yt(pt(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=p(r/1e3),u.seconds=e%60,t=p(e/60),u.minutes=t%60,n=p(t/60),u.hours=n%24,a+=p(n/24),i=p(gt(a)),o+=i,a-=yt(pt(i)),s=p(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},Ys.clone=function(){return Ke(this)},Ys.get=function(e){return e=T(e),this.isValid()?this[e+"s"]():NaN},Ys.milliseconds=_s,Ys.seconds=ys,Ys.minutes=gs,Ys.hours=ps,Ys.days=ws,Ys.weeks=function(){return p(this.days()/7)},Ys.months=vs,Ys.years=Ms,Ys.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=kt(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Ys.toISOString=Dt,Ys.toString=Dt,Ys.toJSON=Dt,Ys.locale=at,Ys.localeData=ot,Ys.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Dt),Ys.lang=Xn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),L("x",Kt),L("X",nn),I("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),I("x",function(e,t,n){n._d=new Date(w(e))}),e.version="2.19.0",function(e){Yt=e}(Ie),e.fn=is,e.min=function(){return Ee("isBefore",[].slice.call(arguments,0))},e.max=function(){return Ee("isAfter",[].slice.call(arguments,0))},e.now=function(){return Date.now?Date.now():+new Date},e.utc=d,e.unix=function(e){return Ie(1e3*e)},e.months=function(e,t){return ft(e,t,"months")},e.isDate=a,e.locale=pe,e.invalid=m,e.duration=Ke,e.isMoment=g,e.weekdays=function(e,t,n){return mt(e,t,n,"weekdays")},e.parseZone=function(){return Ie.apply(null,arguments).parseZone()},e.localeData=ve,e.isDuration=Ze,e.monthsShort=function(e,t){return ft(e,t,"monthsShort")},e.weekdaysMin=function(e,t,n){return mt(e,t,n,"weekdaysMin")},e.defineLocale=we,e.updateLocale=function(e,t){if(null!=t){var n,s=Cn;null!=Fn[e]&&(s=Fn[e]._config),(n=new O(t=Y(s,t))).parentLocale=Fn[e],Fn[e]=n,pe(e)}else null!=Fn[e]&&(null!=Fn[e].parentLocale?Fn[e]=Fn[e].parentLocale:null!=Fn[e]&&delete Fn[e]);return Fn[e]},e.locales=function(){return Pt(Fn)},e.weekdaysShort=function(e,t,n){return mt(e,t,n,"weekdaysShort")},e.normalizeUnits=T,e.relativeTimeRounding=function(e){return void 0===e?ks:"function"==typeof e&&(ks=e,!0)},e.relativeTimeThreshold=function(e,t){return void 0!==Ss[e]&&(void 0===t?Ss[e]:(Ss[e]=t,"s"===e&&(Ss.ss=t-1),!0))},e.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},e.prototype=is,e}); ================================================ FILE: package.json ================================================ { "name": "components", "version": "1.0.0", "description": "Components", "main": "generate_doc.js", "dependencies": { "node-minify": "^2.0.4", "wrench": "^1.5.9" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/MobileUI/components.git" }, "author": "", "license": "ISC", "bugs": { "url": "https://github.com/MobileUI/components/issues" }, "homepage": "https://github.com/MobileUI/components#readme" } ================================================ FILE: page/component.json ================================================ { "name":"page", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: page/contact.html ================================================

Contact

================================================ FILE: page/contact.js ================================================ function functionOpenContact(params){ document.getElementById('name').value = params.name; } ================================================ FILE: page/contacts.html ================================================

Contacts

Jeanette Fletcher

jeanette.fletcher15@example.com

Jack Oliver

jack.oliver@example.com

Carter hudson

carter.hudson17@example.com

================================================ FILE: page/index.html ================================================

Page

Navigation is how users move between different pages in your app. MobileUI’s navigation follows standard native navigation concepts, like those in iOS.

For use this component you need install with command:

mobileui install page

The operation of this component is very simple, to open a new page just call the function openPage('NAME_FILE_HTML') and to go back just call the function backPage().

If you need disabled BackButton in your device, just define window.disabledBackButton=true.

If you need disabled effect when the page is openning in your device, just define window.disabledOpenPageEffect=true.

For the example above we have the contacts page:

When you click on an item in the list the contact page appears:

And when opening the contact page the function functionOpenContact will be executed:

For advanced mode you can listener the event openPage and closePage.

================================================ FILE: page/script.js ================================================ window.PAGE={handePage:100}; document.addEventListener("deviceready", function(){ document.addEventListener("backbutton", function(e){ if(window.disabledBackButton) { return e.preventDefault(); } var pages = document.getElementsByClassName('box-block'); if(pages.length){ e.preventDefault(); window.backPage(pages[pages.length-1].id); } else { navigator.app.exitApp(); } }, false); }, false); window.dispatch = function(fn, args) { fn = (typeof fn == "function") ? fn : window[fn]; return fn.apply(this, args || []); } window.openPage = function(p, params, callback){ var showPageEffect = function(){ window.PAGE.handePage++ var firstStyle = 'z-index:'+window.PAGE.handePage var secondStyle = ';transform: translateY(0px);will-change: transform, -webkit-transform, opacity;transition-duration: 280ms;transition-timing-function: cubic-bezier(0.36,0.66,0.04,1);' if(SO.code === 2){ secondStyle = ';transform: translateX(0px);transition-duration: 280ms;' } if(window.disabledOpenPageEffect) { secondStyle = ';opacity: 1;top: 0;' } var newStyle = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('style') if(newStyle) { newStyle += ' '+firstStyle + secondStyle } else { newStyle = firstStyle + secondStyle } document.getElementById(p).getElementsByClassName('page')[0].setAttribute("style", newStyle); if(callback) { window.dispatch(callback, [params]); } var newClass = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('class') newClass += ' show' var validOpenPage = function(){ setTimeout(function(){ if(document.getElementById(p) && document.getElementById(p).querySelectorAll('.page').length){ showPageBind(); } else { validOpenPage(); } },10); } validOpenPage(); var customEvent = new CustomEvent("openPage",{ "detail": {page:p}}); document.dispatchEvent(customEvent); var showPageBind = function(){ setTimeout(function(){ document.getElementById(p).getElementsByClassName('page')[0].setAttribute('class',newClass) setTimeout(function(){ var style = document.getElementById(p).getElementsByClassName('page')[0].getAttribute('style') style = style.replace(secondStyle,'') document.getElementById(p).getElementsByClassName('page')[0].setAttribute('style',style) },280) }, 100); }; } if(arguments.length===2) { callback = params } if(p.indexOf('.html') < 0){ p =p+'.html'; } //check if page is openned. if(document.getElementById(p)){ var pages = document.getElementsByClassName('box-block'); if(pages[pages.length-1].id === document.getElementById(p).id){ return false; } document.getElementById(p).parentNode.removeChild(document.getElementById(p)); } var xhttp = new XMLHttpRequest(); xhttp.onload = function() { if (this.readyState == 4) { var page = this.responseText; page = page.replace('backPage()','backPage(\''+p+'\')'); var body = document.getElementsByTagName('body')[0] if(document.getElementsByClassName('body').length){ body = document.getElementsByClassName('body')[0] } var div = document.createElement('div') div.setAttribute('class','box-block') div.setAttribute('id',p) div.innerHTML = page body.appendChild(div); showPageEffect(); } }; xhttp.open("GET", p + '?cache='+new Date().getTime(), true); document.dispatchEvent(new Event('firedCloseMenu')); xhttp.send(); } window.backPage = function(p){ var page = "" if(!p) { var pages = document.querySelectorAll('.page.show') var elementFind = { zIndex:-1 } for (var i = 0; i < pages.length; i++) { var zIndexNow = Number(pages[i].style['zIndex']) if(elementFind.zIndex

Popover

The Popover is a view that floats above an app’s content. Popovers provide an easy way to present or gather information from the user and are commonly used in the following situations: Show more info about the current view ,select a commonly used tool or configuration and present a list of actions to perform inside one of your views.

Dependency: base and list. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install popover

Your popover need have id and for you open popover, just call function openPopover('ID_YOUR_POPOVER').

See example:

If you need make bind some event after popover open just listener event:

================================================ FILE: popover/script.js ================================================ window.openPopover = function (p) { var button = event.target var rect = button.getBoundingClientRect() var name = p var p = document.getElementById(p) var e = document.createElement('div') e.className = 'backdrop backdrop-popover' p.parentNode.appendChild(e) e.addEventListener('click', function (evt) { window.closePopover(name) }) p.addEventListener('click', function (evt) { window.closePopover(name) }) var marginRight = document.body.offsetWidth - rect.left var diff = document.body.offsetWidth - marginRight marginRight = marginRight - rect.width if (diff > 250) { p.style += ';top: 110%;right: ' + marginRight + 'px;transform-origin: right top 0px;transform: scale(1);' } else { p.style += ';top: 110%;left: ' + diff + 'px;transform-origin: right top 0px;transform: scale(1);' } p.classList.add('show') if (SO.code === 2) { p.style.top = (rect.top + rect.height) + 'px' var divArrow = document.createElement('div') divArrow.classList.add('popover-arrow') p.parentNode.appendChild(divArrow) divArrow.setAttribute('style', 'top:' + (rect.top + rect.height - 5) + 'px;left:' + (rect.left + (rect.width / 2) - 7) + 'px') } else { var pHeight = p.clientHeight var pWidth = p.clientWidth p.style.height = 0 p.style.width = 0 p.style.top = rect.top + 'px' setTimeout(function () { var style = p.getAttribute('style') style += ' ;-webkit-transition: all 200ms ease;transition: all 200ms ease;' p.setAttribute('style', style) p.style.height = pHeight + 'px' p.style.width = pWidth + 'px' }) } var customEvent = new CustomEvent('popoverOpened') document.dispatchEvent(customEvent) } window.closePopover = function (p) { var p = document.getElementById(p) var timeEffect = 0 if (SO.code !== 2) { p.style.opacity = 0 timeEffect = 200 } setTimeout(function () { var arrow = document.getElementsByClassName('popover-arrow') if (arrow.length) { arrow[0].parentNode.removeChild(arrow[0]) } p.classList.remove('show') var e = p.parentNode.getElementsByClassName('backdrop-popover') if (e && e.length) { e = e[0] if (e && e.parentNode) { e.parentNode.removeChild(e) } } var customEvent = new CustomEvent('popoverClosed') document.dispatchEvent(customEvent) }, timeEffect) } ================================================ FILE: popover/style.css ================================================ /*Define a new popover.*/ .popover { position: absolute; z-index: 10001; border-radius: 3px; box-shadow: 0 3px 12px 2px rgba(0,0,0,.3); overflow: hidden; display: none; background-color: #fff; } .platform-ios .popover { border-radius: 10px; box-shadow: none; } .popover-arrow { z-index: 10000; position: absolute; width: 14px; height: 14px; border-radius: 3px; background-color: #fff; -webkit-transform: rotate(45deg); transform: rotate(45deg); } .popover.show { display: block; } .popover .list, .popover .item { border-width: 0; } .popover .list .item h1 { margin: 0; } .popover .item { display: table !important; overflow: hidden; white-space: nowrap; padding: 10px; } .platform-ios .popover .item { border-width: 1px; } .popover .item:first-child { padding-top: 15px; } .popover .item:last-child { padding-bottom: 15px; } .backdrop-popover { opacity: 0.01; } .platform-ios .backdrop-popover { opacity: 0.08; } .popover .item[data] { display: none!important; } ================================================ FILE: progress-circle/component.json ================================================ { "name":"progress-circle", "author": "fabiorogeriosj", "dependencies": [ "mobileui-colors", "progressbarjs" ] } ================================================ FILE: progress-circle/index.html ================================================

Progress Circle

Progress circle is a simple component widely used to inform metrics about a given. You can create it either by the HTML element or programmed via javascript.

Dependency: progressbarjs. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install progress-circle
Atribute/property Description
value Initial value for component
title Title for component
subTitle Subtitle for component
text Info of the value, example: 65%, the simbol (%) is the text
color Color of external line
textColor Color of text. Use name theme colors
textWeight Weight of text (bold, 300, normal, 800, etc)
titleWeight Weight of title (bold, 300, normal, 800, etc)
subTitleWeight Weight of subtitle (bold, 300, normal, 800, etc)
titleColor Color of title. Use name theme colors
subTitleColor Color of subtitle. Use name theme colors
width Size canvas size area
height Size canvas size area
trailColor Color of trail line. Use name theme colors
strokeWidth Size stroke line.
trailWidth Size stroke line.
textSize Size font text. Example textSize="25px"
titleSize Size font text. Example textSize="25px"
subTitleSize Size font text. Example textSize="25px"
fill ...
padding ...
durationAnimate ...

You can create a progress circle by JavaScript:

================================================ FILE: progress-circle/script.js ================================================ window.ProgressCircle = { rebind : function(){ var self = this; var progress = document.querySelectorAll('.progress-circle'); for (var i = 0; i < progress.length; i++) { progress[i].classList.remove("binded"); progress[i].innerHTML = ""; } self.bind(); }, bind : function(){ var progress = document.querySelectorAll('.progress-circle:not(.binded)'); var self = this; for (var i = 0; i < progress.length; i++) { var config = {}; config.value = Number(progress[i].getAttribute('value')); config.maxValue = Number(progress[i].getAttribute('maxValue')) || 100; config.showValue = progress[i].getAttribute('showValue')==='1' || progress[i].getAttribute('showValue')==='true' || false; config.title = progress[i].getAttribute('title') || ''; config.subTitle = progress[i].getAttribute('subTitle') || ''; config.text = progress[i].getAttribute('text') || ''; config.color = progress[i].getAttribute('color') || 'blue'; config.textColor = progress[i].getAttribute('textColor') || 'grey-800'; config.textWeight = progress[i].getAttribute('textWeight') || 'normal'; config.titleWeight = progress[i].getAttribute('titleWeight') || 'normal'; config.subTitleWeight = progress[i].getAttribute('subTitleWeight') || 'normal'; config.titleColor = progress[i].getAttribute('titleColor') || 'grey-500'; config.subTitleColor = progress[i].getAttribute('subTitleColor') || 'grey-300'; config.width = progress[i].getAttribute('width') || '100%'; config.height = progress[i].getAttribute('height') || '300px'; config.trailColor = progress[i].getAttribute('trailColor') || 'grey'; config.strokeWidth = progress[i].getAttribute('strokeWidth') || '1'; config.trailWidth = progress[i].getAttribute('trailWidth') || '1'; config.textSize = progress[i].getAttribute('textSize') || '16px'; config.titleSize = progress[i].getAttribute('titleSize') || '14px'; config.subTitleSize = progress[i].getAttribute('subTitleSize') || '12px'; config.fill = progress[i].getAttribute('fill') || ''; config.padding = progress[i].getAttribute('padding') || '0'; config.durationAnimate = Number(progress[i].getAttribute('duration') || '800'); self.create(progress[i], config); } }, create: function(elm, config){ if(!elm.classList.contains('binded')){ elm.classList.add('binded'); if(!elm.classList.contains('progress-circle')){ elm.classList.add('progress-circle-js') } config.value = config.value || 0; config.maxValue = config.maxValue || 100; config.showValue = config.showValue || false; config.title = config.title || ''; config.subTitle = config.subTitle || ''; config.text = config.text || ''; config.color = config.color || 'blue'; config.textColor = config.textColor || 'grey-800'; config.textWeight = config.textWeight || 'normal'; config.titleWeight = config.titleWeight || 'normal'; config.subTitleWeight = config.subTitleWeight || 'normal'; config.titleColor = config.titleColor || 'grey-500'; config.subTitleColor = config.subTitleColor || 'grey-300'; config.width = config.width || '100%'; config.height = config.height || '300px'; config.trailColor = config.trailColor || 'grey'; config.strokeWidth = config.strokeWidth || '1'; config.trailWidth = config.trailWidth || '1'; config.textSize = config.textSize || '16px'; config.titleSize = config.titleSize || '14px'; config.subTitleSize = config.subTitleSize || '12px'; config.fill = config.fill || ''; config.padding = config.padding || '0'; config.durationAnimate = config.durationAnimate || '800'; elm.style.width=config.width; elm.style.height=config.height; elm.progressCircle = {}; elm.progressCircle.bar = new ProgressBar.Circle(elm, { color: colorsMobileUI[config.color], trailColor: colorsMobileUI[config.trailColor], strokeWidth: config.strokeWidth, trailWidth: config.trailWidth, easing: 'easeInOut', duration: config.durationAnimate, fill: config.fill, text: { autoStyleContainer: true, style: { color: colorsMobileUI[config.textColor], position: 'absolute', fontSize: config.textSize, fontWeight: config.textWeight, left: '50%', top: '50%', padding: 0, margin: 0, transform: { prefix: true, value: 'translate(-50%, -50%)' } } }, svgStyle: { display: 'block', width: config.width, height: config.height, padding: config.padding }, from: { color: colorsMobileUI[config.color], width: config.strokeWidth }, to: { color: colorsMobileUI[config.color], width: config.strokeWidth }, // Set default step function for all animate calls step: function(state, circle) { circle.path.setAttribute('stroke', state.color); circle.path.setAttribute('stroke-width', state.width); var valueInner = Math.round(circle.value() * config.maxValue); if(config.showValue){ valueInner = config.value } var valueText = ''; if(config.title){ var style = 'style="'; if(config.titleSize) style += ';font-size:'+config.titleSize; if(config.titleWeight) style += ';font-weight:'+config.titleWeight; if(config.titleColor) style += ';color:'+colorsMobileUI[config.titleColor]; style += '"'; valueText += '
'+config.title+'
' } valueText += valueInner + config.text; if(config.subTitle){ var style = 'style="'; if(config.subTitleSize) style += ';font-size:'+config.subTitleSize; if(config.subTitleWeight) style += ';font-weight:'+config.subTitleWeight; if(config.subTitleColor) style += ';color:'+colorsMobileUI[config.subTitleColor]; style += '"'; valueText += '
'+config.subTitle+'
' } circle.setText(valueText); } }); elm.progressCircle.update = function(v){ var valueBar = 0; if(v <= config.maxValue && v >= 0) { valueBar = v/config.maxValue; } else if(v < 0) { console.warn("Value for progress circle is too small. (Requested value is "+v+")"); } else { console.warn("Value for progress circle is too high. Maximum is "+config.maxValue+" and requested value is "+v+". (Value set to maximum for now.)") valueBar=1; } this.bar.animate(valueBar); } elm.progressCircle.update(config.value); } } } ================================================ FILE: progress-circle/style.css ================================================ .progress-circle, .progress-circle-js { margin: auto; } .progress-circle-title { opacity: 0.8; } .progress-circle-subtitle { opacity: 0.6; } ================================================ FILE: progress-semicircle/component.json ================================================ { "name":"progress-semicircle", "author": "fabiorogeriosj", "dependencies": [ "mobileui-colors", "progressbarjs" ] } ================================================ FILE: progress-semicircle/index.html ================================================

Progress Semicircle

Progress semi circle is a simple component widely used to inform metrics about a given. You can create it either by the HTML element or programmed via javascript.

Dependency: progressbarjs. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install progress-semicircle
Atribute/property Description
value Initial value for component
title Title for component
subTitle Subtitle for component
text Info of the value, example: 65%, the simbol (%) is the text
color Color of external line
textColor Color of text. Use name theme colors
textWeight Weight of text (bold, 300, normal, 800, etc)
titleWeight Weight of title (bold, 300, normal, 800, etc)
subTitleWeight Weight of subtitle (bold, 300, normal, 800, etc)
titleColor Color of title. Use name theme colors
subTitleColor Color of subtitle. Use name theme colors
width Size canvas size area
height Size canvas size area
trailColor Color of trail line. Use name theme colors
strokeWidth Size stroke line.
trailWidth Size stroke line.
textSize Size font text. Example textSize="25px"
textMargin Size margin text. Example textMargin="100px"
titleSize Size font text. Example textSize="25px"
subTitleSize Size font text. Example textSize="25px"
fill ...
padding ...
durationAnimate ...
================================================ FILE: progress-semicircle/script.js ================================================ window.ProgressSemicircle = { rebind : function(){ var self = this; var progress = document.querySelectorAll('.progress-semicircle'); for (var i = 0; i < progress.length; i++) { progress[i].classList.remove("binded"); progress[i].innerHTML = ""; } self.bind(); }, bind : function(){ var progress = document.querySelectorAll('.progress-semicircle:not(.binded)'); var self = this; for (var i = 0; i < progress.length; i++) { var config = {}; config.value = Number(progress[i].getAttribute('value')); config.maxValue = Number(progress[i].getAttribute('maxValue')) || 100; config.title = progress[i].getAttribute('title') || ''; config.subTitle = progress[i].getAttribute('subTitle') || ''; config.text = progress[i].getAttribute('text') || ''; config.color = progress[i].getAttribute('color') || 'blue'; config.textColor = progress[i].getAttribute('textColor') || 'grey-800'; config.textWeight = progress[i].getAttribute('textWeight') || 'normal'; config.titleWeight = progress[i].getAttribute('titleWeight') || 'normal'; config.titleLineHeight = progress[i].getAttribute('titleLineHeight') || 'normal'; config.subTitleWeight = progress[i].getAttribute('subTitleWeight') || 'normal'; config.titleColor = progress[i].getAttribute('titleColor') || 'grey-500'; config.subTitleColor = progress[i].getAttribute('subTitleColor') || 'grey-300'; config.width = progress[i].getAttribute('width') || '100%'; config.height = progress[i].getAttribute('height') || '300px'; config.trailColor = progress[i].getAttribute('trailColor') || 'grey'; config.strokeWidth = progress[i].getAttribute('strokeWidth') || '1'; config.trailWidth = progress[i].getAttribute('trailWidth') || '1'; config.textSize = progress[i].getAttribute('textSize') || '16px'; config.titleSize = progress[i].getAttribute('titleSize') || '14px'; config.subTitleSize = progress[i].getAttribute('subTitleSize') || '12px'; config.fill = progress[i].getAttribute('fill') || ''; config.padding = progress[i].getAttribute('padding') || '0'; config.textMargin = progress[i].getAttribute('textMargin') || '100px 0'; config.durationAnimate = Number(progress[i].getAttribute('duration') || '800'); self.create(progress[i], config); } }, create: function(elm, config){ if(!elm.classList.contains('binded')){ elm.classList.add('binded'); if(!elm.classList.contains('progress-semicircle')){ elm.classList.add('progress-semicircle-js') } config.value = config.value || 0; config.maxValue = config.maxValue || 100; config.title = config.title || ''; config.subTitle = config.subTitle || ''; config.text = config.text || ''; config.color = config.color || 'blue'; config.textColor = config.textColor || 'grey-800'; config.textWeight = config.textWeight || 'normal'; config.titleWeight = config.titleWeight || 'normal'; config.subTitleWeight = config.subTitleWeight || 'normal'; config.titleColor = config.titleColor || 'grey-500'; config.subTitleColor = config.subTitleColor || 'grey-300'; config.width = config.width || '100%'; config.height = config.height || '300px'; config.trailColor = config.trailColor || 'grey'; config.strokeWidth = config.strokeWidth || '1'; config.trailWidth = config.trailWidth || '1'; config.textSize = config.textSize || '16px'; config.titleSize = config.titleSize || '14px'; config.subTitleSize = config.subTitleSize || '12px'; config.fill = config.fill || ''; config.padding = config.padding || '0'; config.durationAnimate = config.durationAnimate || '800'; config.textMargin = config.textMargin || '100px 0'; elm.style.width=config.width; elm.style.height=config.height; elm.progressSemicircle = {}; elm.progressSemicircle.bar = new ProgressBar.SemiCircle(elm, { color: colorsMobileUI[config.color], trailColor: colorsMobileUI[config.trailColor], strokeWidth: config.strokeWidth, trailWidth: config.trailWidth, easing: 'easeInOut', duration: config.durationAnimate, fill: config.fill, text: { alignToBottom: false, style: { color: colorsMobileUI[config.textColor], position: 'absolute', fontSize: config.textSize, fontWeight: config.textWeight, left: '50%', padding: 0, margin: config.textMargin, } }, svgStyle: { display: 'block', width: config.width, height: config.height, padding: config.padding }, from: { color: colorsMobileUI[config.color], width: config.strokeWidth }, to: { color: colorsMobileUI[config.color], width: config.strokeWidth }, // Set default step function for all animate calls step: function(state, circle) { circle.path.setAttribute('stroke', state.color); circle.path.setAttribute('stroke-width', state.width); var valueInner = Math.round(circle.value() * config.maxValue); var valueText = ''; if(config.title){ var style = 'style="'; if(config.titleSize) style += ';font-size:'+config.titleSize; if(config.titleWeight) style += ';font-weight:'+config.titleWeight; if(config.titleLineHeight) style += ';line-height:'+config.titleLineHeight; if(config.titleColor) style += ';color:'+colorsMobileUI[config.titleColor]; style += '"'; valueText += '
'+config.title+'
' } valueText += valueInner + config.text; if(config.subTitle){ var style = 'style="'; if(config.subTitleSize) style += ';font-size:'+config.subTitleSize; if(config.subTitleWeight) style += ';font-weight:'+config.subTitleWeight; if(config.subTitleColor) style += ';color:'+colorsMobileUI[config.subTitleColor]; style += '"'; valueText += '
'+config.subTitle+'
' } circle.setText(valueText); } }); elm.progressSemicircle.update = function(v){ var valueBar = 0; if(v <= config.maxValue && v >= 0) { valueBar = v/config.maxValue; } else if(v < 0) { console.warn("Value for progress semicircle is too small. (Requested value is "+v+")"); } else { console.warn("Value for progress semicircle is too high. Maximum is "+config.maxValue+" and requested value is "+v+". (Value set to maximum for now.)") valueBar=1; } this.bar.animate(valueBar); } elm.progressSemicircle.update(config.value); } } } ================================================ FILE: progress-semicircle/style.css ================================================ .progress-semicircle, .progress-semicircle-js { margin: auto; } .progress-semicircle-title { opacity: 0.8; } .progress-semicircle-subtitle { opacity: 0.6; } ================================================ FILE: progressbarjs/component.json ================================================ { "name":"progressbarjs", "author": "kimmobrunfeldt", "dependencies": [] } ================================================ FILE: progressbarjs/index.html ================================================

ProgressBar.js

With ProgressBar.js, it's easy to create responsive and stylish progress bars for the web. Animations perform well even on mobile devices. It provides a few built‑in shapes like Line, Circle and SemiCircle but you can also create custom shaped progress bars with any vector graphic editor.

To use this component you need install with the command:

mobileui install progressbarjs

MobileUI use this lib for create another components!

================================================ FILE: progressbarjs/script.js ================================================ // ProgressBar.js 1.0.1 // https://kimmobrunfeldt.github.io/progressbar.js // License: MIT !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ga?0:(a-f)/e;for(h in b)b.hasOwnProperty(h)&&(i=g[h],k="function"==typeof i?i:o[i],b[h]=j(c[h],d[h],k,l));return b}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){var c=n.prototype.filter,d=a._filterArgs;f(c,function(e){"undefined"!=typeof c[e][b]&&c[e][b].apply(a,d)})}function l(a,b,c,d,e,f,g,h,j,l,m){v=b+c+d,w=Math.min(m||u(),v),x=w>=v,y=d-(v-w),a.isPlaying()&&(x?(j(g,a._attachment,y),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,s),k(a,"beforeTween"),b+c>w?i(1,e,f,g,1,1,h):i(w,e,f,g,d,b+c,h),k(a,"afterTween"),j(e,a._attachment,y)))}function m(a,b){var c={},d=typeof b;return"string"===d||"function"===d?f(a,function(a){c[a]=b}):f(a,function(a){c[a]||(c[a]=b[a]||q)}),c}function n(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=p,"undefined"!=typeof b&&this.setConfig(b)}var o,p,q="linear",r=500,s=1e3/60,t=Date.now?Date.now:function(){return+new Date},u="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t;p="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var v,w,x,y;return n.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=u(),this._start(this.get(),this._attachment),this.resume())},n.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||e,this._step=a.step||e,this._finish=a.finish||e,this._duration=a.duration||r,this._currentState=g({},a.from)||this.get(),this._originalState=this.get(),this._targetState=g({},a.to)||this.get();var b=this;this._timeoutHandler=function(){l(b,b._timestamp,b._delay,b._duration,b._currentState,b._originalState,b._targetState,b._easing,b._step,b._scheduleFunction)};var c=this._currentState,d=this._targetState;return h(d,c),this._easing=m(c,a.easing||q),this._filterArgs=[c,this._originalState,d,this._easing],k(this,"tweenCreated"),this},n.prototype.get=function(){return g({},this._currentState)},n.prototype.set=function(a){this._currentState=a},n.prototype.pause=function(){return this._pausedAtTime=u(),this._isPaused=!0,this},n.prototype.resume=function(){return this._isPaused&&(this._timestamp+=u()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},n.prototype.seek=function(a){a=Math.max(a,0);var b=u();return this._timestamp+a===0?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,l(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},n.prototype.stop=function(a){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=e,(b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.oCancelAnimationFrame||b.msCancelAnimationFrame||b.mozCancelRequestAnimationFrame||b.clearTimeout)(this._scheduleId),a&&(k(this,"beforeTween"),i(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),k(this,"afterTween"),k(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},n.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},n.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},n.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},n.prototype.filter={},n.prototype.formula={linear:function(a){return a}},o=n.prototype.formula,g(n,{now:u,each:f,tweenProps:i,tweenProp:j,applyFilter:k,shallowCopy:g,defaults:h,composeEasingObject:m}),"function"==typeof SHIFTY_DEBUG_NOW&&(b.timeoutHandler=l),"object"==typeof d?c.exports=n:"function"==typeof a&&a.amd?a(function(){return n}):"undefined"==typeof b.Tweenable&&(b.Tweenable=n),n}();!function(){e.shallowCopy(e.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return(a/=.5)<1?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return(a/=.5)<1?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return(a/=.5)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin((6*a-1)*(2*Math.PI)/2)+1},swingFromTo:function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?2-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return(a/=.5)<1?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function a(a,b,c,d,e,f){function g(a){return((n*a+o)*a+p)*a}function h(a){return((q*a+r)*a+s)*a}function i(a){return(3*n*a+2*o)*a+p}function j(a){return 1/(200*a)}function k(a,b){return h(m(a,b))}function l(a){return a>=0?a:0-a}function m(a,b){var c,d,e,f,h,j;for(e=a,j=0;8>j;j++){if(f=g(e)-a,l(f)e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),l(f-a)f?c=e:d=e,e=.5*(d-c)+c}return e}var n=0,o=0,p=0,q=0,r=0,s=0;return p=3*b,o=3*(d-b)-p,n=1-p-o,s=3*c,r=3*(e-c)-s,q=1-s-r,k(a,j(f))}function b(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}e.setBezierFunction=function(a,c,d,f,g){var h=b(c,d,f,g);return h.displayName=a,h.x1=c,h.y1=d,h.x2=f,h.y2=g,e.prototype.formula[a]=h},e.unsetBezierFunction=function(a){delete e.prototype.formula[a]}}(),function(){function a(a,b,c,d,f,g){return e.tweenProps(d,b,a,c,1,g,f)}var b=new e;b._filterArgs=[],e.interpolate=function(c,d,f,g,h){var i=e.shallowCopy({},c),j=h||0,k=e.composeEasingObject(c,g||"linear");b.set({});var l=b._filterArgs;l.length=0,l[0]=i,l[1]=c,l[2]=d,l[3]=k,e.applyFilter(b,"tweenCreated"),e.applyFilter(b,"beforeTween");var m=a(c,i,d,f,k,j);return e.applyFilter(b,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;e>c;c++)d.push("_"+b+"_"+c);return d}function c(a){var b=a.match(v);return b?(1===b.length||a[0].match(u))&&b.unshift(""):b=["",""],b.join(A)}function d(b){a.each(b,function(a){var c=b[a];"string"==typeof c&&c.match(z)&&(b[a]=e(c))})}function e(a){return i(z,a,f)}function f(a){var b=g(a);return"rgb("+b[0]+","+b[1]+","+b[2]+")"}function g(a){return a=a.replace(/#/,""),3===a.length&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),B[0]=h(a.substr(0,2)),B[1]=h(a.substr(2,2)),B[2]=h(a.substr(4,2)),B}function h(a){return parseInt(a,16)}function i(a,b,c){var d=b.match(a),e=b.replace(a,A);if(d)for(var f,g=d.length,h=0;g>h;h++)f=d.shift(),e=e.replace(A,c(f));return e}function j(a){return i(x,a,k)}function k(a){for(var b=a.match(w),c=b.length,d=a.match(y)[0],e=0;c>e;e++)d+=parseInt(b[e],10)+",";return d=d.slice(0,-1)+")"}function l(d){var e={};return a.each(d,function(a){var f=d[a];if("string"==typeof f){var g=r(f);e[a]={formatString:c(f),chunkNames:b(g,a)}}}),e}function m(b,c){a.each(c,function(a){for(var d=b[a],e=r(d),f=e.length,g=0;f>g;g++)b[c[a].chunkNames[g]]=+e[g];delete b[a]})}function n(b,c){a.each(c,function(a){var d=b[a],e=o(b,c[a].chunkNames),f=p(e,c[a].chunkNames);d=q(c[a].formatString,f),b[a]=j(d)})}function o(a,b){for(var c,d={},e=b.length,f=0;e>f;f++)c=b[f],d[c]=a[c],delete a[c];return d}function p(a,b){C.length=0;for(var c=b.length,d=0;c>d;d++)C.push(a[b[d]]);return C}function q(a,b){for(var c=a,d=b.length,e=0;d>e;e++)c=c.replace(A,+b[e].toFixed(4));return c}function r(a){return a.match(w)}function s(b,c){a.each(c,function(a){var d,e=c[a],f=e.chunkNames,g=f.length,h=b[a];if("string"==typeof h){var i=h.split(" "),j=i[i.length-1];for(d=0;g>d;d++)b[f[d]]=i[d]||j}else for(d=0;g>d;d++)b[f[d]]=h;delete b[a]})}function t(b,c){a.each(c,function(a){var d=c[a],e=d.chunkNames,f=e.length,g=b[e[0]],h=typeof g;if("string"===h){for(var i="",j=0;f>j;j++)i+=" "+b[e[j]],delete b[e[j]];b[a]=i.substr(1)}else b[a]=g})}var u=/(\d|\-|\.)/,v=/([^\-0-9\.]+)/g,w=/[0-9.\-]+/g,x=new RegExp("rgb\\("+w.source+/,\s*/.source+w.source+/,\s*/.source+w.source+"\\)","g"),y=/^.*\(/,z=/#([0-9]|[a-f]){3,6}/gi,A="VAL",B=[],C=[];a.prototype.filter.token={tweenCreated:function(a,b,c,e){d(a),d(b),d(c),this._tokenData=l(a)},beforeTween:function(a,b,c,d){s(d,this._tokenData),m(a,this._tokenData),m(b,this._tokenData),m(c,this._tokenData)},afterTween:function(a,b,c,d){n(a,this._tokenData),n(b,this._tokenData),n(c,this._tokenData),t(d,this._tokenData)}}}(e)}).call(null)},{}],2:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=a.strokeWidth;a.trailWidth&&a.trailWidth>a.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],3:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate="M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 "+b.strokeWidth),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":7,"./utils":8}],4:[function(a,b,c){b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./utils":8}],5:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},g=function h(a,b){if(!(this instanceof h))throw new Error("Constructor was called without new keyword");b=e.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},b);var c;c=e.isString(a)?document.querySelector(a):a,this.path=c,this._opts=b,this._tweenable=null;var d=this.path.getTotalLength();this.path.style.strokeDasharray=d+" "+d,this.set(0)};g.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},g.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing),d=this._calculateTo(a,c),f=this._opts.shape||this;b(d,f,this._opts.attachment)}},g.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},g.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var f=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,f);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new d,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)},finish:function(a){e.isFunction(c)&&c()}})},g.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},g.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},g.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},g.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},g.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},g.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},g.prototype._easing=function(a){return f.hasOwnProperty(a)?f[a]:a},b.exports=g},{"./utils":8,shifty:1}],6:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":2,"./shape":7,"./utils":8}],7:[function(a,b,c){var d=a("./path"),e=a("./utils"),f="Object is destroyed",g=function h(a,b){if(!(this instanceof h))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},b,!0),e.isObject(b)&&void 0!==b.svgStyle&&(this._opts.svgStyle=b.svgStyle),e.isObject(b)&&e.isObject(b.text)&&void 0!==b.text.style&&(this._opts.text.style=b.text.style);var c,f=this._createSvgView(this._opts);if(c=e.isString(a)?document.querySelector(a):a,!c)throw new Error("Container does not exist: "+a);this._container=c,this._container.appendChild(f.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(f.svg,this._opts.svgStyle),this.svg=f.svg,this.path=f.path,this.trail=f.trail,this.text=null;var g=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(f.path,g),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};g.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error(f);this._progressPath.animate(a,b,c)},g.prototype.stop=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath.stop()},g.prototype.destroy=function(){if(null===this._progressPath)throw new Error(f);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},g.prototype.set=function(a){if(null===this._progressPath)throw new Error(f);this._progressPath.set(a)},g.prototype.value=function(){if(null===this._progressPath)throw new Error(f);return void 0===this._progressPath?0:this._progressPath.value()},g.prototype.setText=function(a){if(null===this._progressPath)throw new Error(f);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},g.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},g.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},g.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},g.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},g.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},g.prototype._initializeTextContainer=function(a,b,c){},g.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=g},{"./path":5,"./utils":8}],8:[function(a,b,c){function d(a,b,c){a=a||{},b=b||{},c=c||!1;for(var e in b)if(b.hasOwnProperty(e)){var f=a[e],g=b[e];c&&l(f)&&l(g)?a[e]=d(f,g,c):a[e]=g}return a}function e(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function f(a,b,c){for(var d=a.style,e=0;e

PullToRefresh

PullToRefresh A small, but powerful Javascript library crafted to power your webapp's pull to refresh feature. No markup needed, highly customizable and dependency-free!

To use this component you need install with the command:

mobileui install pulltorefresh

See the PullToRefresh documentation and its resources at github.com/BoxFactura/pulltorefresh.js.

See this example:

================================================ FILE: pulltorefresh/script.js ================================================ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.PullToRefresh = factory()) }(this, function () { function _ptrMarkup () { return '\n
\n
\n
\n
\n
\n
' } function _ptrStyles () { return '.__PREFIX__ptr {\n box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.12);\n pointer-events: none;\n font-size: 0.85em;\n font-weight: bold;\n top: 0;\n height: 0;\n transition: height 0.3s, min-height 0.3s;\n text-align: center;\n width: 100%;\n overflow: hidden;\n display: flex;\n align-items: flex-end;\n align-content: stretch;\n}\n.__PREFIX__box {\n padding: 10px;\n flex-basis: 100%;\n}\n.__PREFIX__pull {\n transition: none;\n}\n.__PREFIX__text {\n margin-top: .33em;\n color: rgba(0, 0, 0, 0.3);\n}\n.__PREFIX__icon {\n color: rgba(0, 0, 0, 0.3);\n transition: transform .3s;\n}\n.__PREFIX__top {\n touch-action: pan-x pan-down pinch-zoom;\n}\n.__PREFIX__release .__PREFIX__icon {\n transform: rotate(180deg);\n}\n' } var _defaults = { distThreshold: 60, distMax: 80, distReload: 50, bodyOffset: 20, mainElement: 'body', triggerElement: 'body', ptrElement: '.ptr', classPrefix: 'ptr--', cssProp: 'min-height', iconArrow: '⇣', iconRefreshing: '…', instructionsPullToRefresh: 'Pull down to refresh', instructionsReleaseToRefresh: 'Release to refresh', instructionsRefreshing: 'Refreshing', refreshTimeout: 500, getMarkup: _ptrMarkup, getStyles: _ptrStyles, onInit: function () {}, onRefresh: function () { return location.reload() }, resistanceFunction: function (t) { return Math.min(1, t / 2.5) }, shouldPullToRefresh: function () { return !window.scrollY } } var _methods = ['mainElement', 'ptrElement', 'triggerElement'] var _shared = { pullStartY: null, pullMoveY: null, handlers: [], styleEl: null, events: null, dist: 0, state: 'pending', timeout: null, distResisted: 0, supportsPassive: false } try { window.addEventListener('test', null, { get passive () { // eslint-disable-line getter-return _shared.supportsPassive = true } }) } catch (e) { // do nothing } var _ptr = { setupDOM: function setupDOM (handler) { if (!handler.ptrElement) { var ptr = document.createElement('div') if (handler.mainElement !== document.body) { handler.mainElement.parentNode.insertBefore(ptr, handler.mainElement) } else { document.body.insertBefore(ptr, document.body.firstChild) } ptr.classList.add(((handler.classPrefix) + 'ptr')) ptr.innerHTML = handler.getMarkup() .replace(/__PREFIX__/g, handler.classPrefix) handler.ptrElement = ptr if (typeof handler.onInit === 'function') { handler.onInit(handler) } // Add the css styles to the style node, and then // insert it into the dom if (!_shared.styleEl) { _shared.styleEl = document.createElement('style') _shared.styleEl.setAttribute('id', 'pull-to-refresh-js-style') document.head.appendChild(_shared.styleEl) } _shared.styleEl.textContent = handler.getStyles() .replace(/__PREFIX__/g, handler.classPrefix) .replace(/\s+/g, ' ') } return handler }, onReset: function onReset (handler) { handler.ptrElement.classList.remove(((handler.classPrefix) + 'refresh')) handler.ptrElement.style[handler.cssProp] = '0px' setTimeout(function () { // remove previous ptr-element from DOM if (handler.ptrElement && handler.ptrElement.parentNode) { handler.ptrElement.parentNode.removeChild(handler.ptrElement) handler.ptrElement = null } // reset state _shared.state = 'pending' }, handler.refreshTimeout) }, update: function update (handler) { var iconEl = handler.ptrElement.querySelector(('.' + (handler.classPrefix) + 'icon')) var textEl = handler.ptrElement.querySelector(('.' + (handler.classPrefix) + 'text')) if (iconEl) { if (_shared.state === 'refreshing') { iconEl.innerHTML = handler.iconRefreshing } else { iconEl.innerHTML = handler.iconArrow } } if (textEl) { if (_shared.state === 'releasing') { textEl.innerHTML = handler.instructionsReleaseToRefresh } if (_shared.state === 'pulling' || _shared.state === 'pending') { textEl.innerHTML = handler.instructionsPullToRefresh } if (_shared.state === 'refreshing') { textEl.innerHTML = handler.instructionsRefreshing } } } } function _setupEvents () { var _el function _onTouchStart (e) { // here, we must pick a handler first, and then append their html/css on the DOM var target = _shared.handlers.filter(function (h) { return h.contains(e.target) })[0] _shared.enable = !!target if (target && _shared.state === 'pending') { _el = _ptr.setupDOM(target) if (target.shouldPullToRefresh()) { _shared.pullStartY = e.touches[0].screenY } clearTimeout(_shared.timeout) _ptr.update(target) } } function _onTouchMove (e) { if (!(_el && _el.ptrElement && _shared.enable)) { return } if (!_shared.pullStartY) { if (_el.shouldPullToRefresh()) { _shared.pullStartY = e.touches[0].screenY } } else { _shared.pullMoveY = e.touches[0].screenY } if (_shared.state === 'refreshing') { if (_el.shouldPullToRefresh() && _shared.pullStartY < _shared.pullMoveY) { e.preventDefault() } return } if (_shared.state === 'pending') { _el.ptrElement.classList.add(((_el.classPrefix) + 'pull')) _shared.state = 'pulling' _ptr.update(_el) } if (_shared.pullStartY && _shared.pullMoveY) { _shared.dist = _shared.pullMoveY - _shared.pullStartY } if (_shared.dist > 0) { e.preventDefault() _el.ptrElement.style[_el.cssProp] = (_shared.distResisted) + 'px' _shared.distResisted = _el.resistanceFunction(_shared.dist / _el.distThreshold) * Math.min(_el.distMax, _shared.dist) if (_shared.state === 'pulling' && _shared.distResisted > _el.distThreshold) { _el.ptrElement.classList.add(((_el.classPrefix) + 'release')) _shared.state = 'releasing' _ptr.update(_el) } if (_shared.state === 'releasing' && _shared.distResisted < _el.distThreshold) { _el.ptrElement.classList.remove(((_el.classPrefix) + 'release')) _shared.state = 'pulling' _ptr.update(_el) } } } function _onTouchEnd () { if (!(_el && _el.ptrElement && _shared.enable)) { return } if (_shared.state === 'releasing' && _shared.distResisted > _el.distThreshold) { _shared.state = 'refreshing' _el.ptrElement.style[_el.cssProp] = (_el.distReload) + 'px' _el.ptrElement.classList.add(((_el.classPrefix) + 'refresh')) _shared.timeout = setTimeout(function () { var retval = _el.onRefresh(function () { return _ptr.onReset(_el) }) if (retval && typeof retval.then === 'function') { retval.then(function () { return _ptr.onReset(_el) }) } if (!retval && !_el.onRefresh.length) { _ptr.onReset(_el) } }, _el.refreshTimeout) } else { if (_shared.state === 'refreshing') { return } _el.ptrElement.style[_el.cssProp] = '0px' _shared.state = 'pending' } _ptr.update(_el) _el.ptrElement.classList.remove(((_el.classPrefix) + 'release')) _el.ptrElement.classList.remove(((_el.classPrefix) + 'pull')) _shared.pullStartY = _shared.pullMoveY = null _shared.dist = _shared.distResisted = 0 } function _onScroll () { if (_el) { _el.mainElement.classList.toggle(((_el.classPrefix) + 'top'), _el.shouldPullToRefresh()) } } var _passiveSettings = _shared.supportsPassive ? { passive: _shared.passive || false } : undefined window.addEventListener('touchend', _onTouchEnd) window.addEventListener('touchstart', _onTouchStart) window.addEventListener('touchmove', _onTouchMove, _passiveSettings) window.addEventListener('scroll', _onScroll) return { onTouchEnd: _onTouchEnd, onTouchStart: _onTouchStart, onTouchMove: _onTouchMove, onScroll: _onScroll, destroy: function destroy () { // Teardown event listeners window.removeEventListener('touchstart', _onTouchStart) window.removeEventListener('touchend', _onTouchEnd) window.removeEventListener('touchmove', _onTouchMove, _passiveSettings) window.removeEventListener('scroll', _onScroll) } } } function _setupHandler (options) { var _handler = {} // merge options with defaults Object.keys(_defaults).forEach(function (key) { _handler[key] = options[key] || _defaults[key] }) // normalize timeout value, even if it is zero _handler.refreshTimeout = typeof options.refreshTimeout === 'number' ? options.refreshTimeout : _defaults.refreshTimeout // normalize elements _methods.forEach(function (method) { if (typeof _handler[method] === 'string') { _handler[method] = document.querySelector(_handler[method]) } }) // attach events lazily if (!_shared.events) { _shared.events = _setupEvents() } _handler.contains = function (target) { return _handler.triggerElement.contains(target) } _handler.destroy = function () { // stop pending any pending callbacks clearTimeout(_shared.timeout) // remove handler from shared state _shared.handlers.splice(_handler.offset, 1) } return _handler } // public API var index = { setPassiveMode: function setPassiveMode (isPassive) { _shared.passive = isPassive }, destroyAll: function destroyAll () { if (_shared.events) { _shared.events.destroy() _shared.events = null } _shared.handlers.forEach(function (h) { h.destroy() }) }, init: function init (options) { if (options === void 0) options = {} var handler = _setupHandler(options) // store offset for later unsubscription handler.offset = _shared.handlers.push(handler) - 1 return handler }, // export utils for testing _: { setupHandler: _setupHandler, setupEvents: _setupEvents, setupDOM: _ptr.setupDOM, onReset: _ptr.onReset, update: _ptr.update } } return index })) ================================================ FILE: swiper/component.json ================================================ { "name":"swiper", "author": "fabiorogeriosj", "dependencies": [] } ================================================ FILE: swiper/index.html ================================================

Swiper

The Swiper component is a powerful multi-page container where each page can be swiped or dragged between of slides. This component is based on the Swiper widget from idangerous.

The lib Swiper is the free and most modern mobile touch slider with hardware accelerated transitions and amazing native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps. Designed mostly for iOS, but also works great on latest Android, Windows Phone 8 and modern Desktop browsers

There is a lot of combination and configuration for use with great elements in your sliders, for this see the documentation and examples to use Swiper.

To use this component you need install with the command:

mobileui install swiper

For use you need invoke a Swiper lib for create a slide, see a simple example below:

See another example using a Cover component.

================================================ FILE: swiper/script.js ================================================ /** * Swiper 3.4.2 * Most modern mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/swiper/ * * Copyright 2017, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under MIT * * Released on: March 10, 2017 */ (function () { 'use strict'; var $; /*=========================== Swiper ===========================*/ var Swiper = function (container, params) { if (!(this instanceof Swiper)) return new Swiper(container, params); var defaults = { direction: 'horizontal', touchEventsTarget: 'container', initialSlide: 0, speed: 300, // autoplay autoplay: false, autoplayDisableOnInteraction: true, autoplayStopOnLast: false, // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). iOSEdgeSwipeDetection: false, iOSEdgeSwipeThreshold: 20, // Free mode freeMode: false, freeModeMomentum: true, freeModeMomentumRatio: 1, freeModeMomentumBounce: true, freeModeMomentumBounceRatio: 1, freeModeMomentumVelocityRatio: 1, freeModeSticky: false, freeModeMinimumVelocity: 0.02, // Autoheight autoHeight: false, // Set wrapper width setWrapperSize: false, // Virtual Translate virtualTranslate: false, // Effects effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' coverflow: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows : true }, flip: { slideShadows : true, limitRotation: true }, cube: { slideShadows: true, shadow: true, shadowOffset: 20, shadowScale: 0.94 }, fade: { crossFade: false }, // Parallax parallax: false, // Zoom zoom: false, zoomMax: 3, zoomMin: 1, zoomToggle: true, // Scrollbar scrollbar: null, scrollbarHide: true, scrollbarDraggable: false, scrollbarSnapOnRelease: false, // Keyboard Mousewheel keyboardControl: false, mousewheelControl: false, mousewheelReleaseOnEdges: false, mousewheelInvert: false, mousewheelForceToAxis: false, mousewheelSensitivity: 1, mousewheelEventsTarged: 'container', // Hash Navigation hashnav: false, hashnavWatchState: false, // History history: false, // Commong Nav State replaceState: false, // Breakpoints breakpoints: undefined, // Slides grid spaceBetween: 0, slidesPerView: 1, slidesPerColumn: 1, slidesPerColumnFill: 'column', slidesPerGroup: 1, centeredSlides: false, slidesOffsetBefore: 0, // in px slidesOffsetAfter: 0, // in px // Round length roundLengths: false, // Touches touchRatio: 1, touchAngle: 45, simulateTouch: true, shortSwipes: true, longSwipes: true, longSwipesRatio: 0.5, longSwipesMs: 300, followFinger: true, onlyExternal: false, threshold: 0, touchMoveStopPropagation: true, touchReleaseOnEdges: false, // Unique Navigation Elements uniqueNavElements: true, // Pagination pagination: null, paginationElement: 'span', paginationClickable: false, paginationHide: false, paginationBulletRender: null, paginationProgressRender: null, paginationFractionRender: null, paginationCustomRender: null, paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom' // Resistance resistance: true, resistanceRatio: 0.85, // Next/prev buttons nextButton: null, prevButton: null, // Progress watchSlidesProgress: false, watchSlidesVisibility: false, // Cursor grabCursor: false, // Clicks preventClicks: true, preventClicksPropagation: true, slideToClickedSlide: false, // Lazy Loading lazyLoading: false, lazyLoadingInPrevNext: false, lazyLoadingInPrevNextAmount: 1, lazyLoadingOnTransitionStart: false, // Images preloadImages: true, updateOnImagesReady: true, // loop loop: false, loopAdditionalSlides: 0, loopedSlides: null, // Control control: undefined, controlInverse: false, controlBy: 'slide', //or 'container' normalizeSlideIndex: true, // Swiping/no swiping allowSwipeToPrev: true, allowSwipeToNext: true, swipeHandler: null, //'.swipe-handler', noSwiping: true, noSwipingClass: 'swiper-no-swiping', // Passive Listeners passiveListeners: true, // NS containerModifierClass: 'swiper-container-', // NEW slideClass: 'swiper-slide', slideActiveClass: 'swiper-slide-active', slideDuplicateActiveClass: 'swiper-slide-duplicate-active', slideVisibleClass: 'swiper-slide-visible', slideDuplicateClass: 'swiper-slide-duplicate', slideNextClass: 'swiper-slide-next', slideDuplicateNextClass: 'swiper-slide-duplicate-next', slidePrevClass: 'swiper-slide-prev', slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', wrapperClass: 'swiper-wrapper', bulletClass: 'swiper-pagination-bullet', bulletActiveClass: 'swiper-pagination-bullet-active', buttonDisabledClass: 'swiper-button-disabled', paginationCurrentClass: 'swiper-pagination-current', paginationTotalClass: 'swiper-pagination-total', paginationHiddenClass: 'swiper-pagination-hidden', paginationProgressbarClass: 'swiper-pagination-progressbar', paginationClickableClass: 'swiper-pagination-clickable', // NEW paginationModifierClass: 'swiper-pagination-', // NEW lazyLoadingClass: 'swiper-lazy', lazyStatusLoadingClass: 'swiper-lazy-loading', lazyStatusLoadedClass: 'swiper-lazy-loaded', lazyPreloaderClass: 'swiper-lazy-preloader', notificationClass: 'swiper-notification', preloaderClass: 'preloader', zoomContainerClass: 'swiper-zoom-container', // Observer observer: false, observeParents: false, // Accessibility a11y: false, prevSlideMessage: 'Previous slide', nextSlideMessage: 'Next slide', firstSlideMessage: 'This is the first slide', lastSlideMessage: 'This is the last slide', paginationBulletMessage: 'Go to slide {{index}}', // Callbacks runCallbacksOnInit: true /* Callbacks: onInit: function (swiper) onDestroy: function (swiper) onBeforeResize: function (swiper) onAfterResize: function (swiper) onClick: function (swiper, e) onTap: function (swiper, e) onDoubleTap: function (swiper, e) onSliderMove: function (swiper, e) onSlideChangeStart: function (swiper) onSlideChangeEnd: function (swiper) onTransitionStart: function (swiper) onTransitionEnd: function (swiper) onImagesReady: function (swiper) onProgress: function (swiper, progress) onTouchStart: function (swiper, e) onTouchMove: function (swiper, e) onTouchMoveOpposite: function (swiper, e) onTouchEnd: function (swiper, e) onReachBeginning: function (swiper) onReachEnd: function (swiper) onSetTransition: function (swiper, duration) onSetTranslate: function (swiper, translate) onAutoplayStart: function (swiper) onAutoplayStop: function (swiper), onLazyImageLoad: function (swiper, slide, image) onLazyImageReady: function (swiper, slide, image) onKeyPress: function (swiper, keyCode) */ }; var initialVirtualTranslate = params && params.virtualTranslate; params = params || {}; var originalParams = {}; for (var param in params) { if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) { originalParams[param] = {}; for (var deepParam in params[param]) { originalParams[param][deepParam] = params[param][deepParam]; } } else { originalParams[param] = params[param]; } } for (var def in defaults) { if (typeof params[def] === 'undefined') { params[def] = defaults[def]; } else if (typeof params[def] === 'object') { for (var deepDef in defaults[def]) { if (typeof params[def][deepDef] === 'undefined') { params[def][deepDef] = defaults[def][deepDef]; } } } } // Swiper var s = this; // Params s.params = params; s.originalParams = originalParams; // Classname s.classNames = []; /*========================= Dom Library and plugins ===========================*/ if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){ $ = Dom7; } if (typeof $ === 'undefined') { if (typeof Dom7 === 'undefined') { $ = window.Dom7 || window.Zepto || window.jQuery; } else { $ = Dom7; } if (!$) return; } // Export it to Swiper instance s.$ = $; /*========================= Breakpoints ===========================*/ s.currentBreakpoint = undefined; s.getActiveBreakpoint = function () { //Get breakpoint for window width if (!s.params.breakpoints) return false; var breakpoint = false; var points = [], point; for ( point in s.params.breakpoints ) { if (s.params.breakpoints.hasOwnProperty(point)) { points.push(point); } } points.sort(function (a, b) { return parseInt(a, 10) > parseInt(b, 10); }); for (var i = 0; i < points.length; i++) { point = points[i]; if (point >= window.innerWidth && !breakpoint) { breakpoint = point; } } return breakpoint || 'max'; }; s.setBreakpoint = function () { //Set breakpoint for window width and update parameters var breakpoint = s.getActiveBreakpoint(); if (breakpoint && s.currentBreakpoint !== breakpoint) { var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams; var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView); for ( var param in breakPointsParams ) { s.params[param] = breakPointsParams[param]; } s.currentBreakpoint = breakpoint; if(needsReLoop && s.destroyLoop) { s.reLoop(true); } } }; // Set breakpoint on load if (s.params.breakpoints) { s.setBreakpoint(); } /*========================= Preparation - Define Container, Wrapper and Pagination ===========================*/ s.container = $(container); if (s.container.length === 0) return; if (s.container.length > 1) { var swipers = []; s.container.each(function () { var container = this; swipers.push(new Swiper(this, params)); }); return swipers; } // Save instance in container HTML Element and in data s.container[0].swiper = s; s.container.data('swiper', s); s.classNames.push(s.params.containerModifierClass + s.params.direction); if (s.params.freeMode) { s.classNames.push(s.params.containerModifierClass + 'free-mode'); } if (!s.support.flexbox) { s.classNames.push(s.params.containerModifierClass + 'no-flexbox'); s.params.slidesPerColumn = 1; } if (s.params.autoHeight) { s.classNames.push(s.params.containerModifierClass + 'autoheight'); } // Enable slides progress when required if (s.params.parallax || s.params.watchSlidesVisibility) { s.params.watchSlidesProgress = true; } // Max resistance when touchReleaseOnEdges if (s.params.touchReleaseOnEdges) { s.params.resistanceRatio = 0; } // Coverflow / 3D if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) { if (s.support.transforms3d) { s.params.watchSlidesProgress = true; s.classNames.push(s.params.containerModifierClass + '3d'); } else { s.params.effect = 'slide'; } } if (s.params.effect !== 'slide') { s.classNames.push(s.params.containerModifierClass + s.params.effect); } if (s.params.effect === 'cube') { s.params.resistanceRatio = 0; s.params.slidesPerView = 1; s.params.slidesPerColumn = 1; s.params.slidesPerGroup = 1; s.params.centeredSlides = false; s.params.spaceBetween = 0; s.params.virtualTranslate = true; } if (s.params.effect === 'fade' || s.params.effect === 'flip') { s.params.slidesPerView = 1; s.params.slidesPerColumn = 1; s.params.slidesPerGroup = 1; s.params.watchSlidesProgress = true; s.params.spaceBetween = 0; if (typeof initialVirtualTranslate === 'undefined') { s.params.virtualTranslate = true; } } // Grab Cursor if (s.params.grabCursor && s.support.touch) { s.params.grabCursor = false; } // Wrapper s.wrapper = s.container.children('.' + s.params.wrapperClass); // Pagination if (s.params.pagination) { s.paginationContainer = $(s.params.pagination); if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) { s.paginationContainer = s.container.find(s.params.pagination); } if (s.params.paginationType === 'bullets' && s.params.paginationClickable) { s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable'); } else { s.params.paginationClickable = false; } s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType); } // Next/Prev Buttons if (s.params.nextButton || s.params.prevButton) { if (s.params.nextButton) { s.nextButton = $(s.params.nextButton); if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) { s.nextButton = s.container.find(s.params.nextButton); } } if (s.params.prevButton) { s.prevButton = $(s.params.prevButton); if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) { s.prevButton = s.container.find(s.params.prevButton); } } } // Is Horizontal s.isHorizontal = function () { return s.params.direction === 'horizontal'; }; // s.isH = isH; // RTL s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl'); if (s.rtl) { s.classNames.push(s.params.containerModifierClass + 'rtl'); } // Wrong RTL support if (s.rtl) { s.wrongRTL = s.wrapper.css('display') === '-webkit-box'; } // Columns if (s.params.slidesPerColumn > 1) { s.classNames.push(s.params.containerModifierClass + 'multirow'); } // Check for Android if (s.device.android) { s.classNames.push(s.params.containerModifierClass + 'android'); } // Add classes s.container.addClass(s.classNames.join(' ')); // Translate s.translate = 0; // Progress s.progress = 0; // Velocity s.velocity = 0; /*========================= Locks, unlocks ===========================*/ s.lockSwipeToNext = function () { s.params.allowSwipeToNext = false; if (s.params.allowSwipeToPrev === false && s.params.grabCursor) { s.unsetGrabCursor(); } }; s.lockSwipeToPrev = function () { s.params.allowSwipeToPrev = false; if (s.params.allowSwipeToNext === false && s.params.grabCursor) { s.unsetGrabCursor(); } }; s.lockSwipes = function () { s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false; if (s.params.grabCursor) s.unsetGrabCursor(); }; s.unlockSwipeToNext = function () { s.params.allowSwipeToNext = true; if (s.params.allowSwipeToPrev === true && s.params.grabCursor) { s.setGrabCursor(); } }; s.unlockSwipeToPrev = function () { s.params.allowSwipeToPrev = true; if (s.params.allowSwipeToNext === true && s.params.grabCursor) { s.setGrabCursor(); } }; s.unlockSwipes = function () { s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true; if (s.params.grabCursor) s.setGrabCursor(); }; /*========================= Round helper ===========================*/ function round(a) { return Math.floor(a); } /*========================= Set grab cursor ===========================*/ s.setGrabCursor = function(moving) { s.container[0].style.cursor = 'move'; s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; s.container[0].style.cursor = moving ? 'grabbing': 'grab'; }; s.unsetGrabCursor = function () { s.container[0].style.cursor = ''; }; if (s.params.grabCursor) { s.setGrabCursor(); } /*========================= Update on Images Ready ===========================*/ s.imagesToLoad = []; s.imagesLoaded = 0; s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) { var image; function onReady () { if (callback) callback(); } if (!imgElement.complete || !checkForComplete) { if (src) { image = new window.Image(); image.onload = onReady; image.onerror = onReady; if (sizes) { image.sizes = sizes; } if (srcset) { image.srcset = srcset; } if (src) { image.src = src; } } else { onReady(); } } else {//image already loaded... onReady(); } }; s.preloadImages = function () { s.imagesToLoad = s.container.find('img'); function _onReady() { if (typeof s === 'undefined' || s === null || !s) return; if (s.imagesLoaded !== undefined) s.imagesLoaded++; if (s.imagesLoaded === s.imagesToLoad.length) { if (s.params.updateOnImagesReady) s.update(); s.emit('onImagesReady', s); } } for (var i = 0; i < s.imagesToLoad.length; i++) { s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady); } }; /*========================= Autoplay ===========================*/ s.autoplayTimeoutId = undefined; s.autoplaying = false; s.autoplayPaused = false; function autoplay() { var autoplayDelay = s.params.autoplay; var activeSlide = s.slides.eq(s.activeIndex); if (activeSlide.attr('data-swiper-autoplay')) { autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay; } s.autoplayTimeoutId = setTimeout(function () { if (s.params.loop) { s.fixLoop(); s._slideNext(); s.emit('onAutoplay', s); } else { if (!s.isEnd) { s._slideNext(); s.emit('onAutoplay', s); } else { if (!params.autoplayStopOnLast) { s._slideTo(0); s.emit('onAutoplay', s); } else { s.stopAutoplay(); } } } }, autoplayDelay); } s.startAutoplay = function () { if (typeof s.autoplayTimeoutId !== 'undefined') return false; if (!s.params.autoplay) return false; if (s.autoplaying) return false; s.autoplaying = true; s.emit('onAutoplayStart', s); autoplay(); }; s.stopAutoplay = function (internal) { if (!s.autoplayTimeoutId) return; if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); s.autoplaying = false; s.autoplayTimeoutId = undefined; s.emit('onAutoplayStop', s); }; s.pauseAutoplay = function (speed) { if (s.autoplayPaused) return; if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); s.autoplayPaused = true; if (speed === 0) { s.autoplayPaused = false; autoplay(); } else { s.wrapper.transitionEnd(function () { if (!s) return; s.autoplayPaused = false; if (!s.autoplaying) { s.stopAutoplay(); } else { autoplay(); } }); } }; /*========================= Min/Max Translate ===========================*/ s.minTranslate = function () { return (-s.snapGrid[0]); }; s.maxTranslate = function () { return (-s.snapGrid[s.snapGrid.length - 1]); }; /*========================= Slider/slides sizes ===========================*/ s.updateAutoHeight = function () { var activeSlides = []; var newHeight = 0; var i; // Find slides currently in view if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) { for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) { var index = s.activeIndex + i; if(index > s.slides.length) break; activeSlides.push(s.slides.eq(index)[0]); } } else { activeSlides.push(s.slides.eq(s.activeIndex)[0]); } // Find new height from heighest slide in view for (i = 0; i < activeSlides.length; i++) { if (typeof activeSlides[i] !== 'undefined') { var height = activeSlides[i].offsetHeight; newHeight = height > newHeight ? height : newHeight; } } // Update Height if (newHeight) s.wrapper.css('height', newHeight + 'px'); }; s.updateContainerSize = function () { var width, height; if (typeof s.params.width !== 'undefined') { width = s.params.width; } else { width = s.container[0].clientWidth; } if (typeof s.params.height !== 'undefined') { height = s.params.height; } else { height = s.container[0].clientHeight; } if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) { return; } //Subtract paddings width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10); height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10); // Store values s.width = width; s.height = height; s.size = s.isHorizontal() ? s.width : s.height; }; s.updateSlidesSize = function () { s.slides = s.wrapper.children('.' + s.params.slideClass); s.snapGrid = []; s.slidesGrid = []; s.slidesSizesGrid = []; var spaceBetween = s.params.spaceBetween, slidePosition = -s.params.slidesOffsetBefore, i, prevSlideSize = 0, index = 0; if (typeof s.size === 'undefined') return; if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size; } s.virtualSize = -spaceBetween; // reset margins if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''}); else s.slides.css({marginRight: '', marginBottom: ''}); var slidesNumberEvenToRows; if (s.params.slidesPerColumn > 1) { if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) { slidesNumberEvenToRows = s.slides.length; } else { slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn; } if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') { slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn); } } // Calc slides var slideSize; var slidesPerColumn = s.params.slidesPerColumn; var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length); for (i = 0; i < s.slides.length; i++) { slideSize = 0; var slide = s.slides.eq(i); if (s.params.slidesPerColumn > 1) { // Set slides order var newSlideOrderIndex; var column, row; if (s.params.slidesPerColumnFill === 'column') { column = Math.floor(i / slidesPerColumn); row = i - column * slidesPerColumn; if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) { if (++row >= slidesPerColumn) { row = 0; column++; } } newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn; slide .css({ '-webkit-box-ordinal-group': newSlideOrderIndex, '-moz-box-ordinal-group': newSlideOrderIndex, '-ms-flex-order': newSlideOrderIndex, '-webkit-order': newSlideOrderIndex, 'order': newSlideOrderIndex }); } else { row = Math.floor(i / slidesPerRow); column = i - row * slidesPerRow; } slide .css( 'margin-' + (s.isHorizontal() ? 'top' : 'left'), (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px') ) .attr('data-swiper-column', column) .attr('data-swiper-row', row); } if (slide.css('display') === 'none') continue; if (s.params.slidesPerView === 'auto') { slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); if (s.params.roundLengths) slideSize = round(slideSize); } else { slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView; if (s.params.roundLengths) slideSize = round(slideSize); if (s.isHorizontal()) { s.slides[i].style.width = slideSize + 'px'; } else { s.slides[i].style.height = slideSize + 'px'; } } s.slides[i].swiperSlideSize = slideSize; s.slidesSizesGrid.push(slideSize); if (s.params.centeredSlides) { slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); s.slidesGrid.push(slidePosition); } else { if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); s.slidesGrid.push(slidePosition); slidePosition = slidePosition + slideSize + spaceBetween; } s.virtualSize += slideSize + spaceBetween; prevSlideSize = slideSize; index ++; } s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter; var newSlidesGrid; if ( s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) { s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); } if (!s.support.flexbox || s.params.setWrapperSize) { if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); } if (s.params.slidesPerColumn > 1) { s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows; s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween; if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); if (s.params.centeredSlides) { newSlidesGrid = []; for (i = 0; i < s.snapGrid.length; i++) { if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]); } s.snapGrid = newSlidesGrid; } } // Remove last grid elements depending on width if (!s.params.centeredSlides) { newSlidesGrid = []; for (i = 0; i < s.snapGrid.length; i++) { if (s.snapGrid[i] <= s.virtualSize - s.size) { newSlidesGrid.push(s.snapGrid[i]); } } s.snapGrid = newSlidesGrid; if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) { s.snapGrid.push(s.virtualSize - s.size); } } if (s.snapGrid.length === 0) s.snapGrid = [0]; if (s.params.spaceBetween !== 0) { if (s.isHorizontal()) { if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'}); else s.slides.css({marginRight: spaceBetween + 'px'}); } else s.slides.css({marginBottom: spaceBetween + 'px'}); } if (s.params.watchSlidesProgress) { s.updateSlidesOffset(); } }; s.updateSlidesOffset = function () { for (var i = 0; i < s.slides.length; i++) { s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop; } }; /*========================= Dynamic Slides Per View ===========================*/ s.currentSlidesPerView = function () { var spv = 1, i, j; if (s.params.centeredSlides) { var size = s.slides[s.activeIndex].swiperSlideSize; var breakLoop; for (i = s.activeIndex + 1; i < s.slides.length; i++) { if (s.slides[i] && !breakLoop) { size += s.slides[i].swiperSlideSize; spv ++; if (size > s.size) breakLoop = true; } } for (j = s.activeIndex - 1; j >= 0; j--) { if (s.slides[j] && !breakLoop) { size += s.slides[j].swiperSlideSize; spv ++; if (size > s.size) breakLoop = true; } } } else { for (i = s.activeIndex + 1; i < s.slides.length; i++) { if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) { spv++; } } } return spv; }; /*========================= Slider/slides progress ===========================*/ s.updateSlidesProgress = function (translate) { if (typeof translate === 'undefined') { translate = s.translate || 0; } if (s.slides.length === 0) return; if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset(); var offsetCenter = -translate; if (s.rtl) offsetCenter = translate; // Visible Slides s.slides.removeClass(s.params.slideVisibleClass); for (var i = 0; i < s.slides.length; i++) { var slide = s.slides[i]; var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween); if (s.params.watchSlidesVisibility) { var slideBefore = -(offsetCenter - slide.swiperSlideOffset); var slideAfter = slideBefore + s.slidesSizesGrid[i]; var isVisible = (slideBefore >= 0 && slideBefore < s.size) || (slideAfter > 0 && slideAfter <= s.size) || (slideBefore <= 0 && slideAfter >= s.size); if (isVisible) { s.slides.eq(i).addClass(s.params.slideVisibleClass); } } slide.progress = s.rtl ? -slideProgress : slideProgress; } }; s.updateProgress = function (translate) { if (typeof translate === 'undefined') { translate = s.translate || 0; } var translatesDiff = s.maxTranslate() - s.minTranslate(); var wasBeginning = s.isBeginning; var wasEnd = s.isEnd; if (translatesDiff === 0) { s.progress = 0; s.isBeginning = s.isEnd = true; } else { s.progress = (translate - s.minTranslate()) / (translatesDiff); s.isBeginning = s.progress <= 0; s.isEnd = s.progress >= 1; } if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s); if (s.isEnd && !wasEnd) s.emit('onReachEnd', s); if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate); s.emit('onProgress', s, s.progress); }; s.updateActiveIndex = function () { var translate = s.rtl ? s.translate : -s.translate; var newActiveIndex, i, snapIndex; for (i = 0; i < s.slidesGrid.length; i ++) { if (typeof s.slidesGrid[i + 1] !== 'undefined') { if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) { newActiveIndex = i; } else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) { newActiveIndex = i + 1; } } else { if (translate >= s.slidesGrid[i]) { newActiveIndex = i; } } } // Normalize slideIndex if(s.params.normalizeSlideIndex){ if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0; } // for (i = 0; i < s.slidesGrid.length; i++) { // if (- translate >= s.slidesGrid[i]) { // newActiveIndex = i; // } // } snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup); if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1; if (newActiveIndex === s.activeIndex) { return; } s.snapIndex = snapIndex; s.previousIndex = s.activeIndex; s.activeIndex = newActiveIndex; s.updateClasses(); s.updateRealIndex(); }; s.updateRealIndex = function(){ s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10); }; /*========================= Classes ===========================*/ s.updateClasses = function () { s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass); var activeSlide = s.slides.eq(s.activeIndex); // Active classes activeSlide.addClass(s.params.slideActiveClass); if (params.loop) { // Duplicate to all looped slides if (activeSlide.hasClass(s.params.slideDuplicateClass)) { s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); } else { s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); } } // Next Slide var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass); if (s.params.loop && nextSlide.length === 0) { nextSlide = s.slides.eq(0); nextSlide.addClass(s.params.slideNextClass); } // Prev Slide var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass); if (s.params.loop && prevSlide.length === 0) { prevSlide = s.slides.eq(-1); prevSlide.addClass(s.params.slidePrevClass); } if (params.loop) { // Duplicate to all looped slides if (nextSlide.hasClass(s.params.slideDuplicateClass)) { s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); } else { s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); } if (prevSlide.hasClass(s.params.slideDuplicateClass)) { s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); } else { s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); } } // Pagination if (s.paginationContainer && s.paginationContainer.length > 0) { // Current/Total var current, total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; if (s.params.loop) { current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup); if (current > s.slides.length - 1 - s.loopedSlides * 2) { current = current - (s.slides.length - s.loopedSlides * 2); } if (current > total - 1) current = current - total; if (current < 0 && s.params.paginationType !== 'bullets') current = total + current; } else { if (typeof s.snapIndex !== 'undefined') { current = s.snapIndex; } else { current = s.activeIndex || 0; } } // Types if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) { s.bullets.removeClass(s.params.bulletActiveClass); if (s.paginationContainer.length > 1) { s.bullets.each(function () { if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass); }); } else { s.bullets.eq(current).addClass(s.params.bulletActiveClass); } } if (s.params.paginationType === 'fraction') { s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1); s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total); } if (s.params.paginationType === 'progress') { var scale = (current + 1) / total, scaleX = scale, scaleY = 1; if (!s.isHorizontal()) { scaleY = scale; scaleX = 1; } s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed); } if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) { s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total)); s.emit('onPaginationRendered', s, s.paginationContainer[0]); } } // Next/active buttons if (!s.params.loop) { if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { if (s.isBeginning) { s.prevButton.addClass(s.params.buttonDisabledClass); if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton); } else { s.prevButton.removeClass(s.params.buttonDisabledClass); if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton); } } if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { if (s.isEnd) { s.nextButton.addClass(s.params.buttonDisabledClass); if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton); } else { s.nextButton.removeClass(s.params.buttonDisabledClass); if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton); } } } }; /*========================= Pagination ===========================*/ s.updatePagination = function () { if (!s.params.pagination) return; if (s.paginationContainer && s.paginationContainer.length > 0) { var paginationHTML = ''; if (s.params.paginationType === 'bullets') { var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; for (var i = 0; i < numberOfBullets; i++) { if (s.params.paginationBulletRender) { paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass); } else { paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '">'; } } s.paginationContainer.html(paginationHTML); s.bullets = s.paginationContainer.find('.' + s.params.bulletClass); if (s.params.paginationClickable && s.params.a11y && s.a11y) { s.a11y.initPagination(); } } if (s.params.paginationType === 'fraction') { if (s.params.paginationFractionRender) { paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass); } else { paginationHTML = '' + ' / ' + ''; } s.paginationContainer.html(paginationHTML); } if (s.params.paginationType === 'progress') { if (s.params.paginationProgressRender) { paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass); } else { paginationHTML = ''; } s.paginationContainer.html(paginationHTML); } if (s.params.paginationType !== 'custom') { s.emit('onPaginationRendered', s, s.paginationContainer[0]); } } }; /*========================= Common update method ===========================*/ s.update = function (updateTranslate) { if (!s) return; s.updateContainerSize(); s.updateSlidesSize(); s.updateProgress(); s.updatePagination(); s.updateClasses(); if (s.params.scrollbar && s.scrollbar) { s.scrollbar.set(); } var newTranslate; function forceSetTranslate() { var translate = s.rtl ? -s.translate : s.translate; newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); s.setWrapperTranslate(newTranslate); s.updateActiveIndex(); s.updateClasses(); } if (updateTranslate) { var translated; if (s.controller && s.controller.spline) { s.controller.spline = undefined; } if (s.params.freeMode) { forceSetTranslate(); if (s.params.autoHeight) { s.updateAutoHeight(); } } else { if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { translated = s.slideTo(s.slides.length - 1, 0, false, true); } else { translated = s.slideTo(s.activeIndex, 0, false, true); } if (!translated) { forceSetTranslate(); } } } else if (s.params.autoHeight) { s.updateAutoHeight(); } }; /*========================= Resize Handler ===========================*/ s.onResize = function (forceUpdatePagination) { if (s.params.onBeforeResize) s.params.onBeforeResize(s); //Breakpoints if (s.params.breakpoints) { s.setBreakpoint(); } // Disable locks on resize var allowSwipeToPrev = s.params.allowSwipeToPrev; var allowSwipeToNext = s.params.allowSwipeToNext; s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true; s.updateContainerSize(); s.updateSlidesSize(); if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination(); if (s.params.scrollbar && s.scrollbar) { s.scrollbar.set(); } if (s.controller && s.controller.spline) { s.controller.spline = undefined; } var slideChangedBySlideTo = false; if (s.params.freeMode) { var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); s.setWrapperTranslate(newTranslate); s.updateActiveIndex(); s.updateClasses(); if (s.params.autoHeight) { s.updateAutoHeight(); } } else { s.updateClasses(); if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true); } else { slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true); } } if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) { s.lazy.load(); } // Return locks after resize s.params.allowSwipeToPrev = allowSwipeToPrev; s.params.allowSwipeToNext = allowSwipeToNext; if (s.params.onAfterResize) s.params.onAfterResize(s); }; /*========================= Events ===========================*/ //Define Touch Events s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'}; if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'}; else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'}; s.touchEvents = { start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start, move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move, end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end }; // WP8 Touch Events Fix if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) { (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction); } // Attach/detach events s.initEvents = function (detach) { var actionDom = detach ? 'off' : 'on'; var action = detach ? 'removeEventListener' : 'addEventListener'; var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0]; var target = s.support.touch ? touchEventsTarget : document; var moveCapture = s.params.nested ? true : false; //Touch Events if (s.browser.ie) { touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false); target[action](s.touchEvents.move, s.onTouchMove, moveCapture); target[action](s.touchEvents.end, s.onTouchEnd, false); } else { if (s.support.touch) { var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener); touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture); touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener); } if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) { touchEventsTarget[action]('mousedown', s.onTouchStart, false); document[action]('mousemove', s.onTouchMove, moveCapture); document[action]('mouseup', s.onTouchEnd, false); } } window[action]('resize', s.onResize); // Next, Prev, Index if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { s.nextButton[actionDom]('click', s.onClickNext); if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey); } if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { s.prevButton[actionDom]('click', s.onClickPrev); if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey); } if (s.params.pagination && s.params.paginationClickable) { s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex); if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey); } // Prevent Links Clicks if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true); }; s.attachEvents = function () { s.initEvents(); }; s.detachEvents = function () { s.initEvents(true); }; /*========================= Handle Clicks ===========================*/ // Prevent Clicks s.allowClick = true; s.preventClicks = function (e) { if (!s.allowClick) { if (s.params.preventClicks) e.preventDefault(); if (s.params.preventClicksPropagation && s.animating) { e.stopPropagation(); e.stopImmediatePropagation(); } } }; // Clicks s.onClickNext = function (e) { e.preventDefault(); if (s.isEnd && !s.params.loop) return; s.slideNext(); }; s.onClickPrev = function (e) { e.preventDefault(); if (s.isBeginning && !s.params.loop) return; s.slidePrev(); }; s.onClickIndex = function (e) { e.preventDefault(); var index = $(this).index() * s.params.slidesPerGroup; if (s.params.loop) index = index + s.loopedSlides; s.slideTo(index); }; /*========================= Handle Touches ===========================*/ function findElementInEvent(e, selector) { var el = $(e.target); if (!el.is(selector)) { if (typeof selector === 'string') { el = el.parents(selector); } else if (selector.nodeType) { var found; el.parents().each(function (index, _el) { if (_el === selector) found = selector; }); if (!found) return undefined; else return selector; } } if (el.length === 0) { return undefined; } return el[0]; } s.updateClickedSlide = function (e) { var slide = findElementInEvent(e, '.' + s.params.slideClass); var slideFound = false; if (slide) { for (var i = 0; i < s.slides.length; i++) { if (s.slides[i] === slide) slideFound = true; } } if (slide && slideFound) { s.clickedSlide = slide; s.clickedIndex = $(slide).index(); } else { s.clickedSlide = undefined; s.clickedIndex = undefined; return; } if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) { var slideToIndex = s.clickedIndex, realIndex, duplicatedSlides, slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView; if (s.params.loop) { if (s.animating) return; realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10); if (s.params.centeredSlides) { if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) { s.fixLoop(); slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); setTimeout(function () { s.slideTo(slideToIndex); }, 0); } else { s.slideTo(slideToIndex); } } else { if (slideToIndex > s.slides.length - slidesPerView) { s.fixLoop(); slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); setTimeout(function () { s.slideTo(slideToIndex); }, 0); } else { s.slideTo(slideToIndex); } } } else { s.slideTo(slideToIndex); } } }; var isTouched, isMoved, allowTouchCallbacks, touchStartTime, isScrolling, currentTranslate, startTranslate, allowThresholdMove, // Form elements to match formElements = 'input, select, textarea, button, video', // Last click time lastClickTime = Date.now(), clickTimeout, //Velocities velocities = [], allowMomentumBounce; // Animating Flag s.animating = false; // Touches information s.touches = { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }; // Touch handlers var isTouchEvent, startMoving; s.onTouchStart = function (e) { if (e.originalEvent) e = e.originalEvent; isTouchEvent = e.type === 'touchstart'; if (!isTouchEvent && 'which' in e && e.which === 3) return; if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) { s.allowClick = true; return; } if (s.params.swipeHandler) { if (!findElementInEvent(e, s.params.swipeHandler)) return; } var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) { return; } isTouched = true; isMoved = false; allowTouchCallbacks = true; isScrolling = undefined; startMoving = undefined; s.touches.startX = startX; s.touches.startY = startY; touchStartTime = Date.now(); s.allowClick = true; s.updateContainerSize(); s.swipeDirection = undefined; if (s.params.threshold > 0) allowThresholdMove = false; if (e.type !== 'touchstart') { var preventDefault = true; if ($(e.target).is(formElements)) preventDefault = false; if (document.activeElement && $(document.activeElement).is(formElements)) { document.activeElement.blur(); } if (preventDefault) { e.preventDefault(); } } s.emit('onTouchStart', s, e); }; s.onTouchMove = function (e) { if (e.originalEvent) e = e.originalEvent; if (isTouchEvent && e.type === 'mousemove') return; if (e.preventedByNestedSwiper) { s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; return; } if (s.params.onlyExternal) { // isMoved = true; s.allowClick = false; if (isTouched) { s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; touchStartTime = Date.now(); } return; } if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) { if (!s.isHorizontal()) { // Vertical if ( (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) || (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate()) ) { return; } } else { if ( (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) || (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate()) ) { return; } } } if (isTouchEvent && document.activeElement) { if (e.target === document.activeElement && $(e.target).is(formElements)) { isMoved = true; s.allowClick = false; return; } } if (allowTouchCallbacks) { s.emit('onTouchMove', s, e); } if (e.targetTouches && e.targetTouches.length > 1) return; s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; if (typeof isScrolling === 'undefined') { var touchAngle; if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) { isScrolling = false; } else { touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI; isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle); } } if (isScrolling) { s.emit('onTouchMoveOpposite', s, e); } if (typeof startMoving === 'undefined') { if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) { startMoving = true; } } if (!isTouched) return; if (isScrolling) { isTouched = false; return; } if (!startMoving) { return; } s.allowClick = false; s.emit('onSliderMove', s, e); e.preventDefault(); if (s.params.touchMoveStopPropagation && !s.params.nested) { e.stopPropagation(); } if (!isMoved) { if (params.loop) { s.fixLoop(); } startTranslate = s.getWrapperTranslate(); s.setWrapperTransition(0); if (s.animating) { s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd'); } if (s.params.autoplay && s.autoplaying) { if (s.params.autoplayDisableOnInteraction) { s.stopAutoplay(); } else { s.pauseAutoplay(); } } allowMomentumBounce = false; //Grab Cursor if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { s.setGrabCursor(true); } } isMoved = true; var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; diff = diff * s.params.touchRatio; if (s.rtl) diff = -diff; s.swipeDirection = diff > 0 ? 'prev' : 'next'; currentTranslate = diff + startTranslate; var disableParentSwiper = true; if ((diff > 0 && currentTranslate > s.minTranslate())) { disableParentSwiper = false; if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio); } else if (diff < 0 && currentTranslate < s.maxTranslate()) { disableParentSwiper = false; if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio); } if (disableParentSwiper) { e.preventedByNestedSwiper = true; } // Directions locks if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) { currentTranslate = startTranslate; } if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) { currentTranslate = startTranslate; } // Threshold if (s.params.threshold > 0) { if (Math.abs(diff) > s.params.threshold || allowThresholdMove) { if (!allowThresholdMove) { allowThresholdMove = true; s.touches.startX = s.touches.currentX; s.touches.startY = s.touches.currentY; currentTranslate = startTranslate; s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; return; } } else { currentTranslate = startTranslate; return; } } if (!s.params.followFinger) return; // Update active index in free mode if (s.params.freeMode || s.params.watchSlidesProgress) { s.updateActiveIndex(); } if (s.params.freeMode) { //Velocity if (velocities.length === 0) { velocities.push({ position: s.touches[s.isHorizontal() ? 'startX' : 'startY'], time: touchStartTime }); } velocities.push({ position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'], time: (new window.Date()).getTime() }); } // Update progress s.updateProgress(currentTranslate); // Update translate s.setWrapperTranslate(currentTranslate); }; s.onTouchEnd = function (e) { if (e.originalEvent) e = e.originalEvent; if (allowTouchCallbacks) { s.emit('onTouchEnd', s, e); } allowTouchCallbacks = false; if (!isTouched) return; //Return Grab Cursor if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { s.setGrabCursor(false); } // Time diff var touchEndTime = Date.now(); var timeDiff = touchEndTime - touchStartTime; // Tap, doubleTap, Click if (s.allowClick) { s.updateClickedSlide(e); s.emit('onTap', s, e); if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) { if (clickTimeout) clearTimeout(clickTimeout); clickTimeout = setTimeout(function () { if (!s) return; if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) { s.paginationContainer.toggleClass(s.params.paginationHiddenClass); } s.emit('onClick', s, e); }, 300); } if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) { if (clickTimeout) clearTimeout(clickTimeout); s.emit('onDoubleTap', s, e); } } lastClickTime = Date.now(); setTimeout(function () { if (s) s.allowClick = true; }, 0); if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) { isTouched = isMoved = false; return; } isTouched = isMoved = false; var currentPos; if (s.params.followFinger) { currentPos = s.rtl ? s.translate : -s.translate; } else { currentPos = -currentTranslate; } if (s.params.freeMode) { if (currentPos < -s.minTranslate()) { s.slideTo(s.activeIndex); return; } else if (currentPos > -s.maxTranslate()) { if (s.slides.length < s.snapGrid.length) { s.slideTo(s.snapGrid.length - 1); } else { s.slideTo(s.slides.length - 1); } return; } if (s.params.freeModeMomentum) { if (velocities.length > 1) { var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop(); var distance = lastMoveEvent.position - velocityEvent.position; var time = lastMoveEvent.time - velocityEvent.time; s.velocity = distance / time; s.velocity = s.velocity / 2; if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) { s.velocity = 0; } // this implies that the user stopped moving a finger then released. // There would be no events with distance zero, so the last event is stale. if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) { s.velocity = 0; } } else { s.velocity = 0; } s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio; velocities.length = 0; var momentumDuration = 1000 * s.params.freeModeMomentumRatio; var momentumDistance = s.velocity * momentumDuration; var newPosition = s.translate + momentumDistance; if (s.rtl) newPosition = - newPosition; var doBounce = false; var afterBouncePosition; var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio; if (newPosition < s.maxTranslate()) { if (s.params.freeModeMomentumBounce) { if (newPosition + s.maxTranslate() < -bounceAmount) { newPosition = s.maxTranslate() - bounceAmount; } afterBouncePosition = s.maxTranslate(); doBounce = true; allowMomentumBounce = true; } else { newPosition = s.maxTranslate(); } } else if (newPosition > s.minTranslate()) { if (s.params.freeModeMomentumBounce) { if (newPosition - s.minTranslate() > bounceAmount) { newPosition = s.minTranslate() + bounceAmount; } afterBouncePosition = s.minTranslate(); doBounce = true; allowMomentumBounce = true; } else { newPosition = s.minTranslate(); } } else if (s.params.freeModeSticky) { var j = 0, nextSlide; for (j = 0; j < s.snapGrid.length; j += 1) { if (s.snapGrid[j] > -newPosition) { nextSlide = j; break; } } if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') { newPosition = s.snapGrid[nextSlide]; } else { newPosition = s.snapGrid[nextSlide - 1]; } if (!s.rtl) newPosition = - newPosition; } //Fix duration if (s.velocity !== 0) { if (s.rtl) { momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity); } else { momentumDuration = Math.abs((newPosition - s.translate) / s.velocity); } } else if (s.params.freeModeSticky) { s.slideReset(); return; } if (s.params.freeModeMomentumBounce && doBounce) { s.updateProgress(afterBouncePosition); s.setWrapperTransition(momentumDuration); s.setWrapperTranslate(newPosition); s.onTransitionStart(); s.animating = true; s.wrapper.transitionEnd(function () { if (!s || !allowMomentumBounce) return; s.emit('onMomentumBounce', s); s.setWrapperTransition(s.params.speed); s.setWrapperTranslate(afterBouncePosition); s.wrapper.transitionEnd(function () { if (!s) return; s.onTransitionEnd(); }); }); } else if (s.velocity) { s.updateProgress(newPosition); s.setWrapperTransition(momentumDuration); s.setWrapperTranslate(newPosition); s.onTransitionStart(); if (!s.animating) { s.animating = true; s.wrapper.transitionEnd(function () { if (!s) return; s.onTransitionEnd(); }); } } else { s.updateProgress(newPosition); } s.updateActiveIndex(); } if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) { s.updateProgress(); s.updateActiveIndex(); } return; } // Find current slide var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0]; for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) { if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') { if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) { stopIndex = i; groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i]; } } else { if (currentPos >= s.slidesGrid[i]) { stopIndex = i; groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2]; } } } // Find current slide size var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize; if (timeDiff > s.params.longSwipesMs) { // Long touches if (!s.params.longSwipes) { s.slideTo(s.activeIndex); return; } if (s.swipeDirection === 'next') { if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup); else s.slideTo(stopIndex); } if (s.swipeDirection === 'prev') { if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup); else s.slideTo(stopIndex); } } else { // Short swipes if (!s.params.shortSwipes) { s.slideTo(s.activeIndex); return; } if (s.swipeDirection === 'next') { s.slideTo(stopIndex + s.params.slidesPerGroup); } if (s.swipeDirection === 'prev') { s.slideTo(stopIndex); } } }; /*========================= Transitions ===========================*/ s._slideTo = function (slideIndex, speed) { return s.slideTo(slideIndex, speed, true, true); }; s.slideTo = function (slideIndex, speed, runCallbacks, internal) { if (typeof runCallbacks === 'undefined') runCallbacks = true; if (typeof slideIndex === 'undefined') slideIndex = 0; if (slideIndex < 0) slideIndex = 0; s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup); if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1; var translate = - s.snapGrid[s.snapIndex]; // Stop autoplay if (s.params.autoplay && s.autoplaying) { if (internal || !s.params.autoplayDisableOnInteraction) { s.pauseAutoplay(speed); } else { s.stopAutoplay(); } } // Update progress s.updateProgress(translate); // Normalize slideIndex if(s.params.normalizeSlideIndex){ for (var i = 0; i < s.slidesGrid.length; i++) { if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) { slideIndex = i; } } } // Directions locks if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) { return false; } if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) { if ((s.activeIndex || 0) !== slideIndex ) return false; } // Update Index if (typeof speed === 'undefined') speed = s.params.speed; s.previousIndex = s.activeIndex || 0; s.activeIndex = slideIndex; s.updateRealIndex(); if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) { // Update Height if (s.params.autoHeight) { s.updateAutoHeight(); } s.updateClasses(); if (s.params.effect !== 'slide') { s.setWrapperTranslate(translate); } return false; } s.updateClasses(); s.onTransitionStart(runCallbacks); if (speed === 0 || s.browser.lteIE9) { s.setWrapperTranslate(translate); s.setWrapperTransition(0); s.onTransitionEnd(runCallbacks); } else { s.setWrapperTranslate(translate); s.setWrapperTransition(speed); if (!s.animating) { s.animating = true; s.wrapper.transitionEnd(function () { if (!s) return; s.onTransitionEnd(runCallbacks); }); } } return true; }; s.onTransitionStart = function (runCallbacks) { if (typeof runCallbacks === 'undefined') runCallbacks = true; if (s.params.autoHeight) { s.updateAutoHeight(); } if (s.lazy) s.lazy.onTransitionStart(); if (runCallbacks) { s.emit('onTransitionStart', s); if (s.activeIndex !== s.previousIndex) { s.emit('onSlideChangeStart', s); if (s.activeIndex > s.previousIndex) { s.emit('onSlideNextStart', s); } else { s.emit('onSlidePrevStart', s); } } } }; s.onTransitionEnd = function (runCallbacks) { s.animating = false; s.setWrapperTransition(0); if (typeof runCallbacks === 'undefined') runCallbacks = true; if (s.lazy) s.lazy.onTransitionEnd(); if (runCallbacks) { s.emit('onTransitionEnd', s); if (s.activeIndex !== s.previousIndex) { s.emit('onSlideChangeEnd', s); if (s.activeIndex > s.previousIndex) { s.emit('onSlideNextEnd', s); } else { s.emit('onSlidePrevEnd', s); } } } if (s.params.history && s.history) { s.history.setHistory(s.params.history, s.activeIndex); } if (s.params.hashnav && s.hashnav) { s.hashnav.setHash(); } }; s.slideNext = function (runCallbacks, speed, internal) { if (s.params.loop) { if (s.animating) return false; s.fixLoop(); var clientLeft = s.container[0].clientLeft; return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); } else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); }; s._slideNext = function (speed) { return s.slideNext(true, speed, true); }; s.slidePrev = function (runCallbacks, speed, internal) { if (s.params.loop) { if (s.animating) return false; s.fixLoop(); var clientLeft = s.container[0].clientLeft; return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); } else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); }; s._slidePrev = function (speed) { return s.slidePrev(true, speed, true); }; s.slideReset = function (runCallbacks, speed, internal) { return s.slideTo(s.activeIndex, speed, runCallbacks); }; s.disableTouchControl = function () { s.params.onlyExternal = true; return true; }; s.enableTouchControl = function () { s.params.onlyExternal = false; return true; }; /*========================= Translate/transition helpers ===========================*/ s.setWrapperTransition = function (duration, byController) { s.wrapper.transition(duration); if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { s.effects[s.params.effect].setTransition(duration); } if (s.params.parallax && s.parallax) { s.parallax.setTransition(duration); } if (s.params.scrollbar && s.scrollbar) { s.scrollbar.setTransition(duration); } if (s.params.control && s.controller) { s.controller.setTransition(duration, byController); } s.emit('onSetTransition', s, duration); }; s.setWrapperTranslate = function (translate, updateActiveIndex, byController) { var x = 0, y = 0, z = 0; if (s.isHorizontal()) { x = s.rtl ? -translate : translate; } else { y = translate; } if (s.params.roundLengths) { x = round(x); y = round(y); } if (!s.params.virtualTranslate) { if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)'); else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)'); } s.translate = s.isHorizontal() ? x : y; // Check if we need to update progress var progress; var translatesDiff = s.maxTranslate() - s.minTranslate(); if (translatesDiff === 0) { progress = 0; } else { progress = (translate - s.minTranslate()) / (translatesDiff); } if (progress !== s.progress) { s.updateProgress(translate); } if (updateActiveIndex) s.updateActiveIndex(); if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { s.effects[s.params.effect].setTranslate(s.translate); } if (s.params.parallax && s.parallax) { s.parallax.setTranslate(s.translate); } if (s.params.scrollbar && s.scrollbar) { s.scrollbar.setTranslate(s.translate); } if (s.params.control && s.controller) { s.controller.setTranslate(s.translate, byController); } s.emit('onSetTranslate', s, s.translate); }; s.getTranslate = function (el, axis) { var matrix, curTransform, curStyle, transformMatrix; // automatic axis detection if (typeof axis === 'undefined') { axis = 'x'; } if (s.params.virtualTranslate) { return s.rtl ? -s.translate : s.translate; } curStyle = window.getComputedStyle(el, null); if (window.WebKitCSSMatrix) { curTransform = curStyle.transform || curStyle.webkitTransform; if (curTransform.split(',').length > 6) { curTransform = curTransform.split(', ').map(function(a){ return a.replace(',','.'); }).join(', '); } // Some old versions of Webkit choke when 'none' is passed; pass // empty string instead in this case transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); } else { transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); matrix = transformMatrix.toString().split(','); } if (axis === 'x') { //Latest Chrome and webkits Fix if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; //Crazy IE10 Matrix else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); //Normal Browsers else curTransform = parseFloat(matrix[4]); } if (axis === 'y') { //Latest Chrome and webkits Fix if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; //Crazy IE10 Matrix else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); //Normal Browsers else curTransform = parseFloat(matrix[5]); } if (s.rtl && curTransform) curTransform = -curTransform; return curTransform || 0; }; s.getWrapperTranslate = function (axis) { if (typeof axis === 'undefined') { axis = s.isHorizontal() ? 'x' : 'y'; } return s.getTranslate(s.wrapper[0], axis); }; /*========================= Observer ===========================*/ s.observers = []; function initObserver(target, options) { options = options || {}; // create an observer instance var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; var observer = new ObserverFunc(function (mutations) { mutations.forEach(function (mutation) { s.onResize(true); s.emit('onObserverUpdate', s, mutation); }); }); observer.observe(target, { attributes: typeof options.attributes === 'undefined' ? true : options.attributes, childList: typeof options.childList === 'undefined' ? true : options.childList, characterData: typeof options.characterData === 'undefined' ? true : options.characterData }); s.observers.push(observer); } s.initObservers = function () { if (s.params.observeParents) { var containerParents = s.container.parents(); for (var i = 0; i < containerParents.length; i++) { initObserver(containerParents[i]); } } // Observe container initObserver(s.container[0], {childList: false}); // Observe wrapper initObserver(s.wrapper[0], {attributes: false}); }; s.disconnectObservers = function () { for (var i = 0; i < s.observers.length; i++) { s.observers[i].disconnect(); } s.observers = []; }; /*========================= Loop ===========================*/ // Create looped slides s.createLoop = function () { // Remove duplicated slides s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); var slides = s.wrapper.children('.' + s.params.slideClass); if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length; s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10); s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides; if (s.loopedSlides > slides.length) { s.loopedSlides = slides.length; } var prependSlides = [], appendSlides = [], i; slides.each(function (index, el) { var slide = $(this); if (index < s.loopedSlides) appendSlides.push(el); if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el); slide.attr('data-swiper-slide-index', index); }); for (i = 0; i < appendSlides.length; i++) { s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); } for (i = prependSlides.length - 1; i >= 0; i--) { s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); } }; s.destroyLoop = function () { s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); s.slides.removeAttr('data-swiper-slide-index'); }; s.reLoop = function (updatePosition) { var oldIndex = s.activeIndex - s.loopedSlides; s.destroyLoop(); s.createLoop(); s.updateSlidesSize(); if (updatePosition) { s.slideTo(oldIndex + s.loopedSlides, 0, false); } }; s.fixLoop = function () { var newIndex; //Fix For Negative Oversliding if (s.activeIndex < s.loopedSlides) { newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex; newIndex = newIndex + s.loopedSlides; s.slideTo(newIndex, 0, false, true); } //Fix For Positive Oversliding else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) { newIndex = -s.slides.length + s.activeIndex + s.loopedSlides; newIndex = newIndex + s.loopedSlides; s.slideTo(newIndex, 0, false, true); } }; /*========================= Append/Prepend/Remove Slides ===========================*/ s.appendSlide = function (slides) { if (s.params.loop) { s.destroyLoop(); } if (typeof slides === 'object' && slides.length) { for (var i = 0; i < slides.length; i++) { if (slides[i]) s.wrapper.append(slides[i]); } } else { s.wrapper.append(slides); } if (s.params.loop) { s.createLoop(); } if (!(s.params.observer && s.support.observer)) { s.update(true); } }; s.prependSlide = function (slides) { if (s.params.loop) { s.destroyLoop(); } var newActiveIndex = s.activeIndex + 1; if (typeof slides === 'object' && slides.length) { for (var i = 0; i < slides.length; i++) { if (slides[i]) s.wrapper.prepend(slides[i]); } newActiveIndex = s.activeIndex + slides.length; } else { s.wrapper.prepend(slides); } if (s.params.loop) { s.createLoop(); } if (!(s.params.observer && s.support.observer)) { s.update(true); } s.slideTo(newActiveIndex, 0, false); }; s.removeSlide = function (slidesIndexes) { if (s.params.loop) { s.destroyLoop(); s.slides = s.wrapper.children('.' + s.params.slideClass); } var newActiveIndex = s.activeIndex, indexToRemove; if (typeof slidesIndexes === 'object' && slidesIndexes.length) { for (var i = 0; i < slidesIndexes.length; i++) { indexToRemove = slidesIndexes[i]; if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); if (indexToRemove < newActiveIndex) newActiveIndex--; } newActiveIndex = Math.max(newActiveIndex, 0); } else { indexToRemove = slidesIndexes; if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); if (indexToRemove < newActiveIndex) newActiveIndex--; newActiveIndex = Math.max(newActiveIndex, 0); } if (s.params.loop) { s.createLoop(); } if (!(s.params.observer && s.support.observer)) { s.update(true); } if (s.params.loop) { s.slideTo(newActiveIndex + s.loopedSlides, 0, false); } else { s.slideTo(newActiveIndex, 0, false); } }; s.removeAllSlides = function () { var slidesIndexes = []; for (var i = 0; i < s.slides.length; i++) { slidesIndexes.push(i); } s.removeSlide(slidesIndexes); }; /*========================= Effects ===========================*/ s.effects = { fade: { setTranslate: function () { for (var i = 0; i < s.slides.length; i++) { var slide = s.slides.eq(i); var offset = slide[0].swiperSlideOffset; var tx = -offset; if (!s.params.virtualTranslate) tx = tx - s.translate; var ty = 0; if (!s.isHorizontal()) { ty = tx; tx = 0; } var slideOpacity = s.params.fade.crossFade ? Math.max(1 - Math.abs(slide[0].progress), 0) : 1 + Math.min(Math.max(slide[0].progress, -1), 0); slide .css({ opacity: slideOpacity }) .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)'); } }, setTransition: function (duration) { s.slides.transition(duration); if (s.params.virtualTranslate && duration !== 0) { var eventTriggered = false; s.slides.transitionEnd(function () { if (eventTriggered) return; if (!s) return; eventTriggered = true; s.animating = false; var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; for (var i = 0; i < triggerEvents.length; i++) { s.wrapper.trigger(triggerEvents[i]); } }); } } }, flip: { setTranslate: function () { for (var i = 0; i < s.slides.length; i++) { var slide = s.slides.eq(i); var progress = slide[0].progress; if (s.params.flip.limitRotation) { progress = Math.max(Math.min(slide[0].progress, 1), -1); } var offset = slide[0].swiperSlideOffset; var rotate = -180 * progress, rotateY = rotate, rotateX = 0, tx = -offset, ty = 0; if (!s.isHorizontal()) { ty = tx; tx = 0; rotateX = -rotateY; rotateY = 0; } else if (s.rtl) { rotateY = -rotateY; } slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length; if (s.params.flip.slideShadows) { //Set shadows var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); if (shadowBefore.length === 0) { shadowBefore = $('
'); slide.append(shadowBefore); } if (shadowAfter.length === 0) { shadowAfter = $('
'); slide.append(shadowAfter); } if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); } slide .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'); } }, setTransition: function (duration) { s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); if (s.params.virtualTranslate && duration !== 0) { var eventTriggered = false; s.slides.eq(s.activeIndex).transitionEnd(function () { if (eventTriggered) return; if (!s) return; if (!$(this).hasClass(s.params.slideActiveClass)) return; eventTriggered = true; s.animating = false; var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; for (var i = 0; i < triggerEvents.length; i++) { s.wrapper.trigger(triggerEvents[i]); } }); } } }, cube: { setTranslate: function () { var wrapperRotate = 0, cubeShadow; if (s.params.cube.shadow) { if (s.isHorizontal()) { cubeShadow = s.wrapper.find('.swiper-cube-shadow'); if (cubeShadow.length === 0) { cubeShadow = $('
'); s.wrapper.append(cubeShadow); } cubeShadow.css({height: s.width + 'px'}); } else { cubeShadow = s.container.find('.swiper-cube-shadow'); if (cubeShadow.length === 0) { cubeShadow = $('
'); s.container.append(cubeShadow); } } } for (var i = 0; i < s.slides.length; i++) { var slide = s.slides.eq(i); var slideAngle = i * 90; var round = Math.floor(slideAngle / 360); if (s.rtl) { slideAngle = -slideAngle; round = Math.floor(-slideAngle / 360); } var progress = Math.max(Math.min(slide[0].progress, 1), -1); var tx = 0, ty = 0, tz = 0; if (i % 4 === 0) { tx = - round * 4 * s.size; tz = 0; } else if ((i - 1) % 4 === 0) { tx = 0; tz = - round * 4 * s.size; } else if ((i - 2) % 4 === 0) { tx = s.size + round * 4 * s.size; tz = s.size; } else if ((i - 3) % 4 === 0) { tx = - s.size; tz = 3 * s.size + s.size * 4 * round; } if (s.rtl) { tx = -tx; } if (!s.isHorizontal()) { ty = tx; tx = 0; } var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)'; if (progress <= 1 && progress > -1) { wrapperRotate = i * 90 + progress * 90; if (s.rtl) wrapperRotate = -i * 90 - progress * 90; } slide.transform(transform); if (s.params.cube.slideShadows) { //Set shadows var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); if (shadowBefore.length === 0) { shadowBefore = $('
'); slide.append(shadowBefore); } if (shadowAfter.length === 0) { shadowAfter = $('
'); slide.append(shadowAfter); } if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); } } s.wrapper.css({ '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px', '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px', '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px', 'transform-origin': '50% 50% -' + (s.size / 2) + 'px' }); if (s.params.cube.shadow) { if (s.isHorizontal()) { cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')'); } else { var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); var scale1 = s.params.cube.shadowScale, scale2 = s.params.cube.shadowScale / multiplier, offset = s.params.cube.shadowOffset; cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)'); } } var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0; s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)'); }, setTransition: function (duration) { s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); if (s.params.cube.shadow && !s.isHorizontal()) { s.container.find('.swiper-cube-shadow').transition(duration); } } }, coverflow: { setTranslate: function () { var transform = s.translate; var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2; var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate; var translate = s.params.coverflow.depth; //Each slide offset from center for (var i = 0, length = s.slides.length; i < length; i++) { var slide = s.slides.eq(i); var slideSize = s.slidesSizesGrid[i]; var slideOffset = slide[0].swiperSlideOffset; var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier; var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0; var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier; // var rotateZ = 0 var translateZ = -translate * Math.abs(offsetMultiplier); var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier); var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0; //Fix for ultra small values if (Math.abs(translateX) < 0.001) translateX = 0; if (Math.abs(translateY) < 0.001) translateY = 0; if (Math.abs(translateZ) < 0.001) translateZ = 0; if (Math.abs(rotateY) < 0.001) rotateY = 0; if (Math.abs(rotateX) < 0.001) rotateX = 0; var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'; slide.transform(slideTransform); slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; if (s.params.coverflow.slideShadows) { //Set shadows var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); if (shadowBefore.length === 0) { shadowBefore = $('
'); slide.append(shadowBefore); } if (shadowAfter.length === 0) { shadowAfter = $('
'); slide.append(shadowAfter); } if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; } } //Set correct perspective for IE10 if (s.browser.ie) { var ws = s.wrapper[0].style; ws.perspectiveOrigin = center + 'px 50%'; } }, setTransition: function (duration) { s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); } } }; /*========================= Images Lazy Loading ===========================*/ s.lazy = { initialImageLoaded: false, loadImageInSlide: function (index, loadInDuplicate) { if (typeof index === 'undefined') return; if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true; if (s.slides.length === 0) return; var slide = s.slides.eq(index); var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')'); if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) { img = img.add(slide[0]); } if (img.length === 0) return; img.each(function () { var _img = $(this); _img.addClass(s.params.lazyStatusLoadingClass); var background = _img.attr('data-background'); var src = _img.attr('data-src'), srcset = _img.attr('data-srcset'), sizes = _img.attr('data-sizes'); s.loadImage(_img[0], (src || background), srcset, sizes, false, function () { if (typeof s === 'undefined' || s === null || !s) return; if (background) { _img.css('background-image', 'url("' + background + '")'); _img.removeAttr('data-background'); } else { if (srcset) { _img.attr('srcset', srcset); _img.removeAttr('data-srcset'); } if (sizes) { _img.attr('sizes', sizes); _img.removeAttr('data-sizes'); } if (src) { _img.attr('src', src); _img.removeAttr('data-src'); } } _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass); slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove(); if (s.params.loop && loadInDuplicate) { var slideOriginalIndex = slide.attr('data-swiper-slide-index'); if (slide.hasClass(s.params.slideDuplicateClass)) { var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')'); s.lazy.loadImageInSlide(originalSlide.index(), false); } else { var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]'); s.lazy.loadImageInSlide(duplicatedSlide.index(), false); } } s.emit('onLazyImageReady', s, slide[0], _img[0]); }); s.emit('onLazyImageLoad', s, slide[0], _img[0]); }); }, load: function () { var i; var slidesPerView = s.params.slidesPerView; if (slidesPerView === 'auto') { slidesPerView = 0; } if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true; if (s.params.watchSlidesVisibility) { s.wrapper.children('.' + s.params.slideVisibleClass).each(function () { s.lazy.loadImageInSlide($(this).index()); }); } else { if (slidesPerView > 1) { for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) { if (s.slides[i]) s.lazy.loadImageInSlide(i); } } else { s.lazy.loadImageInSlide(s.activeIndex); } } if (s.params.lazyLoadingInPrevNext) { if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) { var amount = s.params.lazyLoadingInPrevNextAmount; var spv = slidesPerView; var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length); var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0); // Next Slides for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) { if (s.slides[i]) s.lazy.loadImageInSlide(i); } // Prev Slides for (i = minIndex; i < s.activeIndex ; i++) { if (s.slides[i]) s.lazy.loadImageInSlide(i); } } else { var nextSlide = s.wrapper.children('.' + s.params.slideNextClass); if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index()); var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass); if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index()); } } }, onTransitionStart: function () { if (s.params.lazyLoading) { if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) { s.lazy.load(); } } }, onTransitionEnd: function () { if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) { s.lazy.load(); } } }; /*========================= Scrollbar ===========================*/ s.scrollbar = { isTouched: false, setDragPosition: function (e) { var sb = s.scrollbar; var x = 0, y = 0; var translate; var pointerPosition = s.isHorizontal() ? ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) : ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ; var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2; var positionMin = -s.minTranslate() * sb.moveDivider; var positionMax = -s.maxTranslate() * sb.moveDivider; if (position < positionMin) { position = positionMin; } else if (position > positionMax) { position = positionMax; } position = -position / sb.moveDivider; s.updateProgress(position); s.setWrapperTranslate(position, true); }, dragStart: function (e) { var sb = s.scrollbar; sb.isTouched = true; e.preventDefault(); e.stopPropagation(); sb.setDragPosition(e); clearTimeout(sb.dragTimeout); sb.track.transition(0); if (s.params.scrollbarHide) { sb.track.css('opacity', 1); } s.wrapper.transition(100); sb.drag.transition(100); s.emit('onScrollbarDragStart', s); }, dragMove: function (e) { var sb = s.scrollbar; if (!sb.isTouched) return; if (e.preventDefault) e.preventDefault(); else e.returnValue = false; sb.setDragPosition(e); s.wrapper.transition(0); sb.track.transition(0); sb.drag.transition(0); s.emit('onScrollbarDragMove', s); }, dragEnd: function (e) { var sb = s.scrollbar; if (!sb.isTouched) return; sb.isTouched = false; if (s.params.scrollbarHide) { clearTimeout(sb.dragTimeout); sb.dragTimeout = setTimeout(function () { sb.track.css('opacity', 0); sb.track.transition(400); }, 1000); } s.emit('onScrollbarDragEnd', s); if (s.params.scrollbarSnapOnRelease) { s.slideReset(); } }, draggableEvents: (function () { if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop; else return s.touchEvents; })(), enableDraggable: function () { var sb = s.scrollbar; var target = s.support.touch ? sb.track : document; $(sb.track).on(sb.draggableEvents.start, sb.dragStart); $(target).on(sb.draggableEvents.move, sb.dragMove); $(target).on(sb.draggableEvents.end, sb.dragEnd); }, disableDraggable: function () { var sb = s.scrollbar; var target = s.support.touch ? sb.track : document; $(sb.track).off(sb.draggableEvents.start, sb.dragStart); $(target).off(sb.draggableEvents.move, sb.dragMove); $(target).off(sb.draggableEvents.end, sb.dragEnd); }, set: function () { if (!s.params.scrollbar) return; var sb = s.scrollbar; sb.track = $(s.params.scrollbar); if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) { sb.track = s.container.find(s.params.scrollbar); } sb.drag = sb.track.find('.swiper-scrollbar-drag'); if (sb.drag.length === 0) { sb.drag = $('
'); sb.track.append(sb.drag); } sb.drag[0].style.width = ''; sb.drag[0].style.height = ''; sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight; sb.divider = s.size / s.virtualSize; sb.moveDivider = sb.divider * (sb.trackSize / s.size); sb.dragSize = sb.trackSize * sb.divider; if (s.isHorizontal()) { sb.drag[0].style.width = sb.dragSize + 'px'; } else { sb.drag[0].style.height = sb.dragSize + 'px'; } if (sb.divider >= 1) { sb.track[0].style.display = 'none'; } else { sb.track[0].style.display = ''; } if (s.params.scrollbarHide) { sb.track[0].style.opacity = 0; } }, setTranslate: function () { if (!s.params.scrollbar) return; var diff; var sb = s.scrollbar; var translate = s.translate || 0; var newPos; var newSize = sb.dragSize; newPos = (sb.trackSize - sb.dragSize) * s.progress; if (s.rtl && s.isHorizontal()) { newPos = -newPos; if (newPos > 0) { newSize = sb.dragSize - newPos; newPos = 0; } else if (-newPos + sb.dragSize > sb.trackSize) { newSize = sb.trackSize + newPos; } } else { if (newPos < 0) { newSize = sb.dragSize + newPos; newPos = 0; } else if (newPos + sb.dragSize > sb.trackSize) { newSize = sb.trackSize - newPos; } } if (s.isHorizontal()) { if (s.support.transforms3d) { sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)'); } else { sb.drag.transform('translateX(' + (newPos) + 'px)'); } sb.drag[0].style.width = newSize + 'px'; } else { if (s.support.transforms3d) { sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)'); } else { sb.drag.transform('translateY(' + (newPos) + 'px)'); } sb.drag[0].style.height = newSize + 'px'; } if (s.params.scrollbarHide) { clearTimeout(sb.timeout); sb.track[0].style.opacity = 1; sb.timeout = setTimeout(function () { sb.track[0].style.opacity = 0; sb.track.transition(400); }, 1000); } }, setTransition: function (duration) { if (!s.params.scrollbar) return; s.scrollbar.drag.transition(duration); } }; /*========================= Controller ===========================*/ s.controller = { LinearSpline: function (x, y) { var binarySearch = (function() { var maxIndex, minIndex, guess; return function(array, val) { minIndex = -1; maxIndex = array.length; while (maxIndex - minIndex > 1) if (array[guess = maxIndex + minIndex >> 1] <= val) { minIndex = guess; } else { maxIndex = guess; } return maxIndex; }; })(); this.x = x; this.y = y; this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value: // (x1,y1) is the known point before given value, // (x3,y3) is the known point after given value. var i1, i3; var l = this.x.length; this.interpolate = function (x2) { if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2): i3 = binarySearch(this.x, x2); i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already: // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1]; }; }, //xxx: for now i will just save one spline function to to getInterpolateFunction: function(c){ if(!s.controller.spline) s.controller.spline = s.params.loop ? new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) : new s.controller.LinearSpline(s.snapGrid, c.snapGrid); }, setTranslate: function (translate, byController) { var controlled = s.params.control; var multiplier, controlledTranslate; function setControlledTranslate(c) { // this will create an Interpolate function based on the snapGrids // x is the Grid of the scrolled scroller and y will be the controlled scroller // it makes sense to create this only once and recall it for the interpolation // the function does a lot of value caching for performance translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate; if (s.params.controlBy === 'slide') { s.controller.getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid // but it did not work out controlledTranslate = -s.controller.spline.interpolate(-translate); } if(!controlledTranslate || s.params.controlBy === 'container'){ multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate()); controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate(); } if (s.params.controlInverse) { controlledTranslate = c.maxTranslate() - controlledTranslate; } c.updateProgress(controlledTranslate); c.setWrapperTranslate(controlledTranslate, false, s); c.updateActiveIndex(); } if (Array.isArray(controlled)) { for (var i = 0; i < controlled.length; i++) { if (controlled[i] !== byController && controlled[i] instanceof Swiper) { setControlledTranslate(controlled[i]); } } } else if (controlled instanceof Swiper && byController !== controlled) { setControlledTranslate(controlled); } }, setTransition: function (duration, byController) { var controlled = s.params.control; var i; function setControlledTransition(c) { c.setWrapperTransition(duration, s); if (duration !== 0) { c.onTransitionStart(); c.wrapper.transitionEnd(function(){ if (!controlled) return; if (c.params.loop && s.params.controlBy === 'slide') { c.fixLoop(); } c.onTransitionEnd(); }); } } if (Array.isArray(controlled)) { for (i = 0; i < controlled.length; i++) { if (controlled[i] !== byController && controlled[i] instanceof Swiper) { setControlledTransition(controlled[i]); } } } else if (controlled instanceof Swiper && byController !== controlled) { setControlledTransition(controlled); } } }; /*========================= Hash Navigation ===========================*/ s.hashnav = { onHashCange: function (e, a) { var newHash = document.location.hash.replace('#', ''); var activeSlideHash = s.slides.eq(s.activeIndex).attr('data-hash'); if (newHash !== activeSlideHash) { s.slideTo(s.wrapper.children('.' + s.params.slideClass + '[data-hash="' + (newHash) + '"]').index()); } }, attachEvents: function (detach) { var action = detach ? 'off' : 'on'; $(window)[action]('hashchange', s.hashnav.onHashCange); }, setHash: function () { if (!s.hashnav.initialized || !s.params.hashnav) return; if (s.params.replaceState && window.history && window.history.replaceState) { window.history.replaceState(null, null, ('#' + s.slides.eq(s.activeIndex).attr('data-hash') || '')); } else { var slide = s.slides.eq(s.activeIndex); var hash = slide.attr('data-hash') || slide.attr('data-history'); document.location.hash = hash || ''; } }, init: function () { if (!s.params.hashnav || s.params.history) return; s.hashnav.initialized = true; var hash = document.location.hash.replace('#', ''); if (hash) { var speed = 0; for (var i = 0, length = s.slides.length; i < length; i++) { var slide = s.slides.eq(i); var slideHash = slide.attr('data-hash') || slide.attr('data-history'); if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) { var index = slide.index(); s.slideTo(index, speed, s.params.runCallbacksOnInit, true); } } } if (s.params.hashnavWatchState) s.hashnav.attachEvents(); }, destroy: function () { if (s.params.hashnavWatchState) s.hashnav.attachEvents(true); } }; /*========================= History Api with fallback to Hashnav ===========================*/ s.history = { init: function () { if (!s.params.history) return; if (!window.history || !window.history.pushState) { s.params.history = false; s.params.hashnav = true; return; } s.history.initialized = true; this.paths = this.getPathValues(); if (!this.paths.key && !this.paths.value) return; this.scrollToSlide(0, this.paths.value, s.params.runCallbacksOnInit); if (!s.params.replaceState) { window.addEventListener('popstate', this.setHistoryPopState); } }, setHistoryPopState: function() { s.history.paths = s.history.getPathValues(); s.history.scrollToSlide(s.params.speed, s.history.paths.value, false); }, getPathValues: function() { var pathArray = window.location.pathname.slice(1).split('/'); var total = pathArray.length; var key = pathArray[total - 2]; var value = pathArray[total - 1]; return { key: key, value: value }; }, setHistory: function (key, index) { if (!s.history.initialized || !s.params.history) return; var slide = s.slides.eq(index); var value = this.slugify(slide.attr('data-history')); if (!window.location.pathname.includes(key)) { value = key + '/' + value; } if (s.params.replaceState) { window.history.replaceState(null, null, value); } else { window.history.pushState(null, null, value); } }, slugify: function(text) { return text.toString().toLowerCase() .replace(/\s+/g, '-') .replace(/[^\w\-]+/g, '') .replace(/\-\-+/g, '-') .replace(/^-+/, '') .replace(/-+$/, ''); }, scrollToSlide: function(speed, value, runCallbacks) { if (value) { for (var i = 0, length = s.slides.length; i < length; i++) { var slide = s.slides.eq(i); var slideHistory = this.slugify(slide.attr('data-history')); if (slideHistory === value && !slide.hasClass(s.params.slideDuplicateClass)) { var index = slide.index(); s.slideTo(index, speed, runCallbacks); } } } else { s.slideTo(0, speed, runCallbacks); } } }; /*========================= Keyboard Control ===========================*/ function handleKeyboard(e) { if (e.originalEvent) e = e.originalEvent; //jquery fix var kc = e.keyCode || e.charCode; // Directions locks if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) { return false; } if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) { return false; } if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { return; } if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { return; } if (kc === 37 || kc === 39 || kc === 38 || kc === 40) { var inView = false; //Check that swiper should be inside of visible area of window if (s.container.parents('.' + s.params.slideClass).length > 0 && s.container.parents('.' + s.params.slideActiveClass).length === 0) { return; } var windowScroll = { left: window.pageXOffset, top: window.pageYOffset }; var windowWidth = window.innerWidth; var windowHeight = window.innerHeight; var swiperOffset = s.container.offset(); if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft; var swiperCoord = [ [swiperOffset.left, swiperOffset.top], [swiperOffset.left + s.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + s.height], [swiperOffset.left + s.width, swiperOffset.top + s.height] ]; for (var i = 0; i < swiperCoord.length; i++) { var point = swiperCoord[i]; if ( point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth && point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight ) { inView = true; } } if (!inView) return; } if (s.isHorizontal()) { if (kc === 37 || kc === 39) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; } if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext(); if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev(); } else { if (kc === 38 || kc === 40) { if (e.preventDefault) e.preventDefault(); else e.returnValue = false; } if (kc === 40) s.slideNext(); if (kc === 38) s.slidePrev(); } s.emit('onKeyPress', s, kc); } s.disableKeyboardControl = function () { s.params.keyboardControl = false; $(document).off('keydown', handleKeyboard); }; s.enableKeyboardControl = function () { s.params.keyboardControl = true; $(document).on('keydown', handleKeyboard); }; /*========================= Mousewheel Control ===========================*/ s.mousewheel = { event: false, lastScrollTime: (new window.Date()).getTime() }; function isEventSupported() { var eventName = 'onwheel'; var isSupported = eventName in document; if (!isSupported) { var element = document.createElement('div'); element.setAttribute(eventName, 'return;'); isSupported = typeof element[eventName] === 'function'; } if (!isSupported && document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard. // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature document.implementation.hasFeature('', '') !== true ) { // This is the only way to test support for the `wheel` event in IE9+. isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); } return isSupported; } /** * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is * complicated, thus this doc is long and (hopefully) detailed enough to answer * your questions. * * If you need to react to the mouse wheel in a predictable way, this code is * like your bestest friend. * hugs * * * As of today, there are 4 DOM event types you can listen to: * * 'wheel' -- Chrome(31+), FF(17+), IE(9+) * 'mousewheel' -- Chrome, IE(6+), Opera, Safari * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother! * 'DOMMouseScroll' -- FF(0.9.7+) since 2003 * * So what to do? The is the best: * * normalizeWheel.getEventType(); * * In your event callback, use this code to get sane interpretation of the * deltas. This code will return an object with properties: * * spinX -- normalized spin speed (use for zoom) - x plane * spinY -- " - y plane * pixelX -- normalized distance (to pixels) - x plane * pixelY -- " - y plane * * Wheel values are provided by the browser assuming you are using the wheel to * scroll a web page by a number of lines or pixels (or pages). Values can vary * significantly on different platforms and browsers, forgetting that you can * scroll at different speeds. Some devices (like trackpads) emit more events * at smaller increments with fine granularity, and some emit massive jumps with * linear speed or acceleration. * * This code does its best to normalize the deltas for you: * * - spin is trying to normalize how far the wheel was spun (or trackpad * dragged). This is super useful for zoom support where you want to * throw away the chunky scroll steps on the PC and make those equal to * the slow and smooth tiny steps on the Mac. Key data: This code tries to * resolve a single slow step on a wheel to 1. * * - pixel is normalizing the desired scroll delta in pixel units. You'll * get the crazy differences between browsers, but at least it'll be in * pixels! * * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This * should translate to positive value zooming IN, negative zooming OUT. * This matches the newer 'wheel' event. * * Why are there spinX, spinY (or pixels)? * * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn * with a mouse. It results in side-scrolling in the browser by default. * * - spinY is what you expect -- it's the classic axis of a mouse wheel. * * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and * probably is by browsers in conjunction with fancy 3D controllers .. but * you know. * * Implementation info: * * Examples of 'wheel' event if you scroll slowly (down) by one step with an * average mouse: * * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120) * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12) * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A) * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120) * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120) * * On the trackpad: * * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6) * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A) * * On other/older browsers.. it's more complicated as there can be multiple and * also missing delta values. * * The 'wheel' event is more standard: * * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents * * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain * backward compatibility with older events. Those other values help us * better normalize spin speed. Example of what the browsers provide: * * | event.wheelDelta | event.detail * ------------------+------------------+-------------- * Safari v5/OS X | -120 | 0 * Safari v5/Win7 | -120 | 0 * Chrome v17/OS X | -120 | 0 * Chrome v17/Win7 | -120 | 0 * IE9/Win7 | -120 | undefined * Firefox v4/OS X | undefined | 1 * Firefox v4/Win7 | undefined | 3 * */ function normalizeWheel( /*object*/ event ) /*object*/ { // Reasonable defaults var PIXEL_STEP = 10; var LINE_HEIGHT = 40; var PAGE_HEIGHT = 800; var sX = 0, sY = 0, // spinX, spinY pX = 0, pY = 0; // pixelX, pixelY // Legacy if( 'detail' in event ) { sY = event.detail; } if( 'wheelDelta' in event ) { sY = -event.wheelDelta / 120; } if( 'wheelDeltaY' in event ) { sY = -event.wheelDeltaY / 120; } if( 'wheelDeltaX' in event ) { sX = -event.wheelDeltaX / 120; } // side scrolling on FF with DOMMouseScroll if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) { sX = sY; sY = 0; } pX = sX * PIXEL_STEP; pY = sY * PIXEL_STEP; if( 'deltaY' in event ) { pY = event.deltaY; } if( 'deltaX' in event ) { pX = event.deltaX; } if( (pX || pY) && event.deltaMode ) { if( event.deltaMode === 1 ) { // delta in LINE units pX *= LINE_HEIGHT; pY *= LINE_HEIGHT; } else { // delta in PAGE units pX *= PAGE_HEIGHT; pY *= PAGE_HEIGHT; } } // Fall-back if spin cannot be determined if( pX && !sX ) { sX = (pX < 1) ? -1 : 1; } if( pY && !sY ) { sY = (pY < 1) ? -1 : 1; } return { spinX: sX, spinY: sY, pixelX: pX, pixelY: pY }; } if (s.params.mousewheelControl) { /** * The best combination if you prefer spinX + spinY normalization. It favors * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with * 'wheel' event, making spin speed determination impossible. */ s.mousewheel.event = (navigator.userAgent.indexOf('firefox') > -1) ? 'DOMMouseScroll' : isEventSupported() ? 'wheel' : 'mousewheel'; } function handleMousewheel(e) { if (e.originalEvent) e = e.originalEvent; //jquery fix var delta = 0; var rtlFactor = s.rtl ? -1 : 1; var data = normalizeWheel( e ); if (s.params.mousewheelForceToAxis) { if (s.isHorizontal()) { if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor; else return; } else { if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY; else return; } } else { delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? - data.pixelX * rtlFactor : - data.pixelY; } if (delta === 0) return; if (s.params.mousewheelInvert) delta = -delta; if (!s.params.freeMode) { if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) { if (delta < 0) { if ((!s.isEnd || s.params.loop) && !s.animating) { s.slideNext(); s.emit('onScroll', s, e); } else if (s.params.mousewheelReleaseOnEdges) return true; } else { if ((!s.isBeginning || s.params.loop) && !s.animating) { s.slidePrev(); s.emit('onScroll', s, e); } else if (s.params.mousewheelReleaseOnEdges) return true; } } s.mousewheel.lastScrollTime = (new window.Date()).getTime(); } else { //Freemode or scrollContainer: var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity; var wasBeginning = s.isBeginning, wasEnd = s.isEnd; if (position >= s.minTranslate()) position = s.minTranslate(); if (position <= s.maxTranslate()) position = s.maxTranslate(); s.setWrapperTransition(0); s.setWrapperTranslate(position); s.updateProgress(); s.updateActiveIndex(); if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) { s.updateClasses(); } if (s.params.freeModeSticky) { clearTimeout(s.mousewheel.timeout); s.mousewheel.timeout = setTimeout(function () { s.slideReset(); }, 300); } else { if (s.params.lazyLoading && s.lazy) { s.lazy.load(); } } // Emit event s.emit('onScroll', s, e); // Stop autoplay if (s.params.autoplay && s.params.autoplayDisableOnInteraction) s.stopAutoplay(); // Return page scroll on edge positions if (position === 0 || position === s.maxTranslate()) return; } if (e.preventDefault) e.preventDefault(); else e.returnValue = false; return false; } s.disableMousewheelControl = function () { if (!s.mousewheel.event) return false; var target = s.container; if (s.params.mousewheelEventsTarged !== 'container') { target = $(s.params.mousewheelEventsTarged); } target.off(s.mousewheel.event, handleMousewheel); s.params.mousewheelControl = false; return true; }; s.enableMousewheelControl = function () { if (!s.mousewheel.event) return false; var target = s.container; if (s.params.mousewheelEventsTarged !== 'container') { target = $(s.params.mousewheelEventsTarged); } target.on(s.mousewheel.event, handleMousewheel); s.params.mousewheelControl = true; return true; }; /*========================= Parallax ===========================*/ function setParallaxTransform(el, progress) { el = $(el); var p, pX, pY; var rtlFactor = s.rtl ? -1 : 1; p = el.attr('data-swiper-parallax') || '0'; pX = el.attr('data-swiper-parallax-x'); pY = el.attr('data-swiper-parallax-y'); if (pX || pY) { pX = pX || '0'; pY = pY || '0'; } else { if (s.isHorizontal()) { pX = p; pY = '0'; } else { pY = p; pX = '0'; } } if ((pX).indexOf('%') >= 0) { pX = parseInt(pX, 10) * progress * rtlFactor + '%'; } else { pX = pX * progress * rtlFactor + 'px' ; } if ((pY).indexOf('%') >= 0) { pY = parseInt(pY, 10) * progress + '%'; } else { pY = pY * progress + 'px' ; } el.transform('translate3d(' + pX + ', ' + pY + ',0px)'); } s.parallax = { setTranslate: function () { s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ setParallaxTransform(this, s.progress); }); s.slides.each(function () { var slide = $(this); slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () { var progress = Math.min(Math.max(slide[0].progress, -1), 1); setParallaxTransform(this, progress); }); }); }, setTransition: function (duration) { if (typeof duration === 'undefined') duration = s.params.speed; s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ var el = $(this); var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration; if (duration === 0) parallaxDuration = 0; el.transition(parallaxDuration); }); } }; /*========================= Zoom ===========================*/ s.zoom = { // "Global" Props scale: 1, currentScale: 1, isScaling: false, gesture: { slide: undefined, slideWidth: undefined, slideHeight: undefined, image: undefined, imageWrap: undefined, zoomMax: s.params.zoomMax }, image: { isTouched: undefined, isMoved: undefined, currentX: undefined, currentY: undefined, minX: undefined, minY: undefined, maxX: undefined, maxY: undefined, width: undefined, height: undefined, startX: undefined, startY: undefined, touchesStart: {}, touchesCurrent: {} }, velocity: { x: undefined, y: undefined, prevPositionX: undefined, prevPositionY: undefined, prevTime: undefined }, // Calc Scale From Multi-touches getDistanceBetweenTouches: function (e) { if (e.targetTouches.length < 2) return 1; var x1 = e.targetTouches[0].pageX, y1 = e.targetTouches[0].pageY, x2 = e.targetTouches[1].pageX, y2 = e.targetTouches[1].pageY; var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); return distance; }, // Events onGestureStart: function (e) { var z = s.zoom; if (!s.support.gestures) { if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { return; } z.gesture.scaleStart = z.getDistanceBetweenTouches(e); } if (!z.gesture.slide || !z.gesture.slide.length) { z.gesture.slide = $(this); if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex); z.gesture.image = z.gesture.slide.find('img, svg, canvas'); z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ; if (z.gesture.imageWrap.length === 0) { z.gesture.image = undefined; return; } } z.gesture.image.transition(0); z.isScaling = true; }, onGestureChange: function (e) { var z = s.zoom; if (!s.support.gestures) { if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { return; } z.gesture.scaleMove = z.getDistanceBetweenTouches(e); } if (!z.gesture.image || z.gesture.image.length === 0) return; if (s.support.gestures) { z.scale = e.scale * z.currentScale; } else { z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale; } if (z.scale > z.gesture.zoomMax) { z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5); } if (z.scale < s.params.zoomMin) { z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5); } z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')'); }, onGestureEnd: function (e) { var z = s.zoom; if (!s.support.gestures) { if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) { return; } } if (!z.gesture.image || z.gesture.image.length === 0) return; z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin); z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')'); z.currentScale = z.scale; z.isScaling = false; if (z.scale === 1) z.gesture.slide = undefined; }, onTouchStart: function (s, e) { var z = s.zoom; if (!z.gesture.image || z.gesture.image.length === 0) return; if (z.image.isTouched) return; if (s.device.os === 'android') e.preventDefault(); z.image.isTouched = true; z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; }, onTouchMove: function (e) { var z = s.zoom; if (!z.gesture.image || z.gesture.image.length === 0) return; s.allowClick = false; if (!z.image.isTouched || !z.gesture.slide) return; if (!z.image.isMoved) { z.image.width = z.gesture.image[0].offsetWidth; z.image.height = z.gesture.image[0].offsetHeight; z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0; z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0; z.gesture.slideWidth = z.gesture.slide[0].offsetWidth; z.gesture.slideHeight = z.gesture.slide[0].offsetHeight; z.gesture.imageWrap.transition(0); if (s.rtl) z.image.startX = -z.image.startX; if (s.rtl) z.image.startY = -z.image.startY; } // Define if we need image drag var scaledWidth = z.image.width * z.scale; var scaledHeight = z.image.height * z.scale; if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return; z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); z.image.maxX = -z.image.minX; z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); z.image.maxY = -z.image.minY; z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; if (!z.image.isMoved && !z.isScaling) { if (s.isHorizontal() && (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) || (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x) ) { z.image.isTouched = false; return; } else if (!s.isHorizontal() && (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) || (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y) ) { z.image.isTouched = false; return; } } e.preventDefault(); e.stopPropagation(); z.image.isMoved = true; z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX; z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY; if (z.image.currentX < z.image.minX) { z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8); } if (z.image.currentX > z.image.maxX) { z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8); } if (z.image.currentY < z.image.minY) { z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8); } if (z.image.currentY > z.image.maxY) { z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8); } //Velocity if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x; if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y; if (!z.velocity.prevTime) z.velocity.prevTime = Date.now(); z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2; z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2; if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0; if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0; z.velocity.prevPositionX = z.image.touchesCurrent.x; z.velocity.prevPositionY = z.image.touchesCurrent.y; z.velocity.prevTime = Date.now(); z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); }, onTouchEnd: function (s, e) { var z = s.zoom; if (!z.gesture.image || z.gesture.image.length === 0) return; if (!z.image.isTouched || !z.image.isMoved) { z.image.isTouched = false; z.image.isMoved = false; return; } z.image.isTouched = false; z.image.isMoved = false; var momentumDurationX = 300; var momentumDurationY = 300; var momentumDistanceX = z.velocity.x * momentumDurationX; var newPositionX = z.image.currentX + momentumDistanceX; var momentumDistanceY = z.velocity.y * momentumDurationY; var newPositionY = z.image.currentY + momentumDistanceY; //Fix duration if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x); if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y); var momentumDuration = Math.max(momentumDurationX, momentumDurationY); z.image.currentX = newPositionX; z.image.currentY = newPositionY; // Define if we need image drag var scaledWidth = z.image.width * z.scale; var scaledHeight = z.image.height * z.scale; z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); z.image.maxX = -z.image.minX; z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); z.image.maxY = -z.image.minY; z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX); z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY); z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); }, onTransitionEnd: function (s) { var z = s.zoom; if (z.gesture.slide && s.previousIndex !== s.activeIndex) { z.gesture.image.transform('translate3d(0,0,0) scale(1)'); z.gesture.imageWrap.transform('translate3d(0,0,0)'); z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined; z.scale = z.currentScale = 1; } }, // Toggle Zoom toggleZoom: function (s, e) { var z = s.zoom; if (!z.gesture.slide) { z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex); z.gesture.image = z.gesture.slide.find('img, svg, canvas'); z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); } if (!z.gesture.image || z.gesture.image.length === 0) return; var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight; if (typeof z.image.touchesStart.x === 'undefined' && e) { touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; } else { touchX = z.image.touchesStart.x; touchY = z.image.touchesStart.y; } if (z.scale && z.scale !== 1) { // Zoom Out z.scale = z.currentScale = 1; z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)'); z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)'); z.gesture.slide = undefined; } else { // Zoom In z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax; if (e) { slideWidth = z.gesture.slide[0].offsetWidth; slideHeight = z.gesture.slide[0].offsetHeight; offsetX = z.gesture.slide.offset().left; offsetY = z.gesture.slide.offset().top; diffX = offsetX + slideWidth/2 - touchX; diffY = offsetY + slideHeight/2 - touchY; imageWidth = z.gesture.image[0].offsetWidth; imageHeight = z.gesture.image[0].offsetHeight; scaledWidth = imageWidth * z.scale; scaledHeight = imageHeight * z.scale; translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0); translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0); translateMaxX = -translateMinX; translateMaxY = -translateMinY; translateX = diffX * z.scale; translateY = diffY * z.scale; if (translateX < translateMinX) { translateX = translateMinX; } if (translateX > translateMaxX) { translateX = translateMaxX; } if (translateY < translateMinY) { translateY = translateMinY; } if (translateY > translateMaxY) { translateY = translateMaxY; } } else { translateX = 0; translateY = 0; } z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)'); z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')'); } }, // Attach/Detach Events attachEvents: function (detach) { var action = detach ? 'off' : 'on'; if (s.params.zoom) { var target = s.slides; var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; // Scale image if (s.support.gestures) { s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener); s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener); s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener); } else if (s.touchEvents.start === 'touchstart') { s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener); s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener); s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener); } // Move image s[action]('touchStart', s.zoom.onTouchStart); s.slides.each(function (index, slide){ if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) { $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove); } }); s[action]('touchEnd', s.zoom.onTouchEnd); // Scale Out s[action]('transitionEnd', s.zoom.onTransitionEnd); if (s.params.zoomToggle) { s.on('doubleTap', s.zoom.toggleZoom); } } }, init: function () { s.zoom.attachEvents(); }, destroy: function () { s.zoom.attachEvents(true); } }; /*========================= Plugins API. Collect all and init all plugins ===========================*/ s._plugins = []; for (var plugin in s.plugins) { var p = s.plugins[plugin](s, s.params[plugin]); if (p) s._plugins.push(p); } // Method to call all plugins event/method s.callPlugins = function (eventName) { for (var i = 0; i < s._plugins.length; i++) { if (eventName in s._plugins[i]) { s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); } } }; /*========================= Events/Callbacks/Plugins Emitter ===========================*/ function normalizeEventName (eventName) { if (eventName.indexOf('on') !== 0) { if (eventName[0] !== eventName[0].toUpperCase()) { eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1); } else { eventName = 'on' + eventName; } } return eventName; } s.emitterEventListeners = { }; s.emit = function (eventName) { // Trigger callbacks if (s.params[eventName]) { s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); } var i; // Trigger events if (s.emitterEventListeners[eventName]) { for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); } } // Trigger plugins if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); }; s.on = function (eventName, handler) { eventName = normalizeEventName(eventName); if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = []; s.emitterEventListeners[eventName].push(handler); return s; }; s.off = function (eventName, handler) { var i; eventName = normalizeEventName(eventName); if (typeof handler === 'undefined') { // Remove all handlers for such event s.emitterEventListeners[eventName] = []; return s; } if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return; for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1); } return s; }; s.once = function (eventName, handler) { eventName = normalizeEventName(eventName); var _handler = function () { handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]); s.off(eventName, _handler); }; s.on(eventName, _handler); return s; }; // Accessibility tools s.a11y = { makeFocusable: function ($el) { $el.attr('tabIndex', '0'); return $el; }, addRole: function ($el, role) { $el.attr('role', role); return $el; }, addLabel: function ($el, label) { $el.attr('aria-label', label); return $el; }, disable: function ($el) { $el.attr('aria-disabled', true); return $el; }, enable: function ($el) { $el.attr('aria-disabled', false); return $el; }, onEnterKey: function (event) { if (event.keyCode !== 13) return; if ($(event.target).is(s.params.nextButton)) { s.onClickNext(event); if (s.isEnd) { s.a11y.notify(s.params.lastSlideMessage); } else { s.a11y.notify(s.params.nextSlideMessage); } } else if ($(event.target).is(s.params.prevButton)) { s.onClickPrev(event); if (s.isBeginning) { s.a11y.notify(s.params.firstSlideMessage); } else { s.a11y.notify(s.params.prevSlideMessage); } } if ($(event.target).is('.' + s.params.bulletClass)) { $(event.target)[0].click(); } }, liveRegion: $(''), notify: function (message) { var notification = s.a11y.liveRegion; if (notification.length === 0) return; notification.html(''); notification.html(message); }, init: function () { // Setup accessibility if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { s.a11y.makeFocusable(s.nextButton); s.a11y.addRole(s.nextButton, 'button'); s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage); } if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { s.a11y.makeFocusable(s.prevButton); s.a11y.addRole(s.prevButton, 'button'); s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage); } $(s.container).append(s.a11y.liveRegion); }, initPagination: function () { if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) { s.bullets.each(function () { var bullet = $(this); s.a11y.makeFocusable(bullet); s.a11y.addRole(bullet, 'button'); s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1)); }); } }, destroy: function () { if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove(); } }; /*========================= Init/Destroy ===========================*/ s.init = function () { if (s.params.loop) s.createLoop(); s.updateContainerSize(); s.updateSlidesSize(); s.updatePagination(); if (s.params.scrollbar && s.scrollbar) { s.scrollbar.set(); if (s.params.scrollbarDraggable) { s.scrollbar.enableDraggable(); } } if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { if (!s.params.loop) s.updateProgress(); s.effects[s.params.effect].setTranslate(); } if (s.params.loop) { s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit); } else { s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit); if (s.params.initialSlide === 0) { if (s.parallax && s.params.parallax) s.parallax.setTranslate(); if (s.lazy && s.params.lazyLoading) { s.lazy.load(); s.lazy.initialImageLoaded = true; } } } s.attachEvents(); if (s.params.observer && s.support.observer) { s.initObservers(); } if (s.params.preloadImages && !s.params.lazyLoading) { s.preloadImages(); } if (s.params.zoom && s.zoom) { s.zoom.init(); } if (s.params.autoplay) { s.startAutoplay(); } if (s.params.keyboardControl) { if (s.enableKeyboardControl) s.enableKeyboardControl(); } if (s.params.mousewheelControl) { if (s.enableMousewheelControl) s.enableMousewheelControl(); } // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history if (s.params.hashnavReplaceState) { s.params.replaceState = s.params.hashnavReplaceState; } if (s.params.history) { if (s.history) s.history.init(); } if (s.params.hashnav) { if (s.hashnav) s.hashnav.init(); } if (s.params.a11y && s.a11y) s.a11y.init(); s.emit('onInit', s); }; // Cleanup dynamic styles s.cleanupStyles = function () { // Container s.container.removeClass(s.classNames.join(' ')).removeAttr('style'); // Wrapper s.wrapper.removeAttr('style'); // Slides if (s.slides && s.slides.length) { s.slides .removeClass([ s.params.slideVisibleClass, s.params.slideActiveClass, s.params.slideNextClass, s.params.slidePrevClass ].join(' ')) .removeAttr('style') .removeAttr('data-swiper-column') .removeAttr('data-swiper-row'); } // Pagination/Bullets if (s.paginationContainer && s.paginationContainer.length) { s.paginationContainer.removeClass(s.params.paginationHiddenClass); } if (s.bullets && s.bullets.length) { s.bullets.removeClass(s.params.bulletActiveClass); } // Buttons if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass); if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass); // Scrollbar if (s.params.scrollbar && s.scrollbar) { if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style'); if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style'); } }; // Destroy s.destroy = function (deleteInstance, cleanupStyles) { // Detach evebts s.detachEvents(); // Stop autoplay s.stopAutoplay(); // Disable draggable if (s.params.scrollbar && s.scrollbar) { if (s.params.scrollbarDraggable) { s.scrollbar.disableDraggable(); } } // Destroy loop if (s.params.loop) { s.destroyLoop(); } // Cleanup styles if (cleanupStyles) { s.cleanupStyles(); } // Disconnect observer s.disconnectObservers(); // Destroy zoom if (s.params.zoom && s.zoom) { s.zoom.destroy(); } // Disable keyboard/mousewheel if (s.params.keyboardControl) { if (s.disableKeyboardControl) s.disableKeyboardControl(); } if (s.params.mousewheelControl) { if (s.disableMousewheelControl) s.disableMousewheelControl(); } // Disable a11y if (s.params.a11y && s.a11y) s.a11y.destroy(); // Delete history popstate if (s.params.history && !s.params.replaceState) { window.removeEventListener('popstate', s.history.setHistoryPopState); } if (s.params.hashnav && s.hashnav) { s.hashnav.destroy(); } // Destroy callback s.emit('onDestroy'); // Delete instance if (deleteInstance !== false) s = null; }; s.init(); // Return swiper instance return s; }; /*================================================== Prototype ====================================================*/ Swiper.prototype = { isSafari: (function () { var ua = window.navigator.userAgent.toLowerCase(); return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); })(), isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), isArray: function (arr) { return Object.prototype.toString.apply(arr) === '[object Array]'; }, /*================================================== Browser ====================================================*/ browser: { ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled, ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1), lteIE9: (function() { // create temporary DIV var div = document.createElement('div'); // add content to tmp DIV which is wrapped into the IE HTML conditional statement div.innerHTML = ''; // return true / false value based on what will browser render return div.getElementsByTagName('i').length === 1; })() }, /*================================================== Devices ====================================================*/ device: (function () { var ua = window.navigator.userAgent; var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); return { ios: ipad || iphone || ipod, android: android }; })(), /*================================================== Feature Detection ====================================================*/ support: { touch : (window.Modernizr && Modernizr.touch === true) || (function () { return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch); })(), transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () { var div = document.createElement('div').style; return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div); })(), flexbox: (function () { var div = document.createElement('div').style; var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' '); for (var i = 0; i < styles.length; i++) { if (styles[i] in div) return true; } })(), observer: (function () { return ('MutationObserver' in window || 'WebkitMutationObserver' in window); })(), passiveListener: (function () { var supportsPassive = false; try { var opts = Object.defineProperty({}, 'passive', { get: function() { supportsPassive = true; } }); window.addEventListener('testPassiveListener', null, opts); } catch (e) {} return supportsPassive; })(), gestures: (function () { return 'ongesturestart' in window; })() }, /*================================================== Plugins ====================================================*/ plugins: {} }; /*=========================== Dom7 Library ===========================*/ var Dom7 = (function () { var Dom7 = function (arr) { var _this = this, i = 0; // Create array-like object for (i = 0; i < arr.length; i++) { _this[i] = arr[i]; } _this.length = arr.length; // Return collection with methods return this; }; var $ = function (selector, context) { var arr = [], i = 0; if (selector && !context) { if (selector instanceof Dom7) { return selector; } } if (selector) { // String if (typeof selector === 'string') { var els, tempParent, html = selector.trim(); if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { var toCreate = 'div'; if (html.indexOf(':~]/)) { // Pure ID selector els = [document.getElementById(selector.split('#')[1])]; } else { // Other selectors els = (context || document).querySelectorAll(selector); } for (i = 0; i < els.length; i++) { if (els[i]) arr.push(els[i]); } } } // Node/element else if (selector.nodeType || selector === window || selector === document) { arr.push(selector); } //Array of elements or instance of Dom else if (selector.length > 0 && selector[0].nodeType) { for (i = 0; i < selector.length; i++) { arr.push(selector[i]); } } } return new Dom7(arr); }; Dom7.prototype = { // Classes and attriutes addClass: function (className) { if (typeof className === 'undefined') { return this; } var classes = className.split(' '); for (var i = 0; i < classes.length; i++) { for (var j = 0; j < this.length; j++) { this[j].classList.add(classes[i]); } } return this; }, removeClass: function (className) { var classes = className.split(' '); for (var i = 0; i < classes.length; i++) { for (var j = 0; j < this.length; j++) { this[j].classList.remove(classes[i]); } } return this; }, hasClass: function (className) { if (!this[0]) return false; else return this[0].classList.contains(className); }, toggleClass: function (className) { var classes = className.split(' '); for (var i = 0; i < classes.length; i++) { for (var j = 0; j < this.length; j++) { this[j].classList.toggle(classes[i]); } } return this; }, attr: function (attrs, value) { if (arguments.length === 1 && typeof attrs === 'string') { // Get attr if (this[0]) return this[0].getAttribute(attrs); else return undefined; } else { // Set attrs for (var i = 0; i < this.length; i++) { if (arguments.length === 2) { // String this[i].setAttribute(attrs, value); } else { // Object for (var attrName in attrs) { this[i][attrName] = attrs[attrName]; this[i].setAttribute(attrName, attrs[attrName]); } } } return this; } }, removeAttr: function (attr) { for (var i = 0; i < this.length; i++) { this[i].removeAttribute(attr); } return this; }, data: function (key, value) { if (typeof value === 'undefined') { // Get value if (this[0]) { var dataKey = this[0].getAttribute('data-' + key); if (dataKey) return dataKey; else if (this[0].dom7ElementDataStorage && (key in this[0].dom7ElementDataStorage)) return this[0].dom7ElementDataStorage[key]; else return undefined; } else return undefined; } else { // Set value for (var i = 0; i < this.length; i++) { var el = this[i]; if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {}; el.dom7ElementDataStorage[key] = value; } return this; } }, // Transforms transform : function (transform) { for (var i = 0; i < this.length; i++) { var elStyle = this[i].style; elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform; } return this; }, transition: function (duration) { if (typeof duration !== 'string') { duration = duration + 'ms'; } for (var i = 0; i < this.length; i++) { var elStyle = this[i].style; elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration; } return this; }, //Events on: function (eventName, targetSelector, listener, capture) { function handleLiveEvent(e) { var target = e.target; if ($(target).is(targetSelector)) listener.call(target, e); else { var parents = $(target).parents(); for (var k = 0; k < parents.length; k++) { if ($(parents[k]).is(targetSelector)) listener.call(parents[k], e); } } } var events = eventName.split(' '); var i, j; for (i = 0; i < this.length; i++) { if (typeof targetSelector === 'function' || targetSelector === false) { // Usual events if (typeof targetSelector === 'function') { listener = arguments[1]; capture = arguments[2] || false; } for (j = 0; j < events.length; j++) { this[i].addEventListener(events[j], listener, capture); } } else { //Live events for (j = 0; j < events.length; j++) { if (!this[i].dom7LiveListeners) this[i].dom7LiveListeners = []; this[i].dom7LiveListeners.push({listener: listener, liveListener: handleLiveEvent}); this[i].addEventListener(events[j], handleLiveEvent, capture); } } } return this; }, off: function (eventName, targetSelector, listener, capture) { var events = eventName.split(' '); for (var i = 0; i < events.length; i++) { for (var j = 0; j < this.length; j++) { if (typeof targetSelector === 'function' || targetSelector === false) { // Usual events if (typeof targetSelector === 'function') { listener = arguments[1]; capture = arguments[2] || false; } this[j].removeEventListener(events[i], listener, capture); } else { // Live event if (this[j].dom7LiveListeners) { for (var k = 0; k < this[j].dom7LiveListeners.length; k++) { if (this[j].dom7LiveListeners[k].listener === listener) { this[j].removeEventListener(events[i], this[j].dom7LiveListeners[k].liveListener, capture); } } } } } } return this; }, once: function (eventName, targetSelector, listener, capture) { var dom = this; if (typeof targetSelector === 'function') { targetSelector = false; listener = arguments[1]; capture = arguments[2]; } function proxy(e) { listener(e); dom.off(eventName, targetSelector, proxy, capture); } dom.on(eventName, targetSelector, proxy, capture); }, trigger: function (eventName, eventData) { for (var i = 0; i < this.length; i++) { var evt; try { evt = new window.CustomEvent(eventName, {detail: eventData, bubbles: true, cancelable: true}); } catch (e) { evt = document.createEvent('Event'); evt.initEvent(eventName, true, true); evt.detail = eventData; } this[i].dispatchEvent(evt); } return this; }, transitionEnd: function (callback) { var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'], i, j, dom = this; function fireCallBack(e) { /*jshint validthis:true */ if (e.target !== this) return; callback.call(this, e); for (i = 0; i < events.length; i++) { dom.off(events[i], fireCallBack); } } if (callback) { for (i = 0; i < events.length; i++) { dom.on(events[i], fireCallBack); } } return this; }, // Sizing/Styles width: function () { if (this[0] === window) { return window.innerWidth; } else { if (this.length > 0) { return parseFloat(this.css('width')); } else { return null; } } }, outerWidth: function (includeMargins) { if (this.length > 0) { if (includeMargins) return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left')); else return this[0].offsetWidth; } else return null; }, height: function () { if (this[0] === window) { return window.innerHeight; } else { if (this.length > 0) { return parseFloat(this.css('height')); } else { return null; } } }, outerHeight: function (includeMargins) { if (this.length > 0) { if (includeMargins) return this[0].offsetHeight + parseFloat(this.css('margin-top')) + parseFloat(this.css('margin-bottom')); else return this[0].offsetHeight; } else return null; }, offset: function () { if (this.length > 0) { var el = this[0]; var box = el.getBoundingClientRect(); var body = document.body; var clientTop = el.clientTop || body.clientTop || 0; var clientLeft = el.clientLeft || body.clientLeft || 0; var scrollTop = window.pageYOffset || el.scrollTop; var scrollLeft = window.pageXOffset || el.scrollLeft; return { top: box.top + scrollTop - clientTop, left: box.left + scrollLeft - clientLeft }; } else { return null; } }, css: function (props, value) { var i; if (arguments.length === 1) { if (typeof props === 'string') { if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props); } else { for (i = 0; i < this.length; i++) { for (var prop in props) { this[i].style[prop] = props[prop]; } } return this; } } if (arguments.length === 2 && typeof props === 'string') { for (i = 0; i < this.length; i++) { this[i].style[props] = value; } return this; } return this; }, //Dom manipulation each: function (callback) { for (var i = 0; i < this.length; i++) { callback.call(this[i], i, this[i]); } return this; }, html: function (html) { if (typeof html === 'undefined') { return this[0] ? this[0].innerHTML : undefined; } else { for (var i = 0; i < this.length; i++) { this[i].innerHTML = html; } return this; } }, text: function (text) { if (typeof text === 'undefined') { if (this[0]) { return this[0].textContent.trim(); } else return null; } else { for (var i = 0; i < this.length; i++) { this[i].textContent = text; } return this; } }, is: function (selector) { if (!this[0]) return false; var compareWith, i; if (typeof selector === 'string') { var el = this[0]; if (el === document) return selector === document; if (el === window) return selector === window; if (el.matches) return el.matches(selector); else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); else if (el.mozMatchesSelector) return el.mozMatchesSelector(selector); else if (el.msMatchesSelector) return el.msMatchesSelector(selector); else { compareWith = $(selector); for (i = 0; i < compareWith.length; i++) { if (compareWith[i] === this[0]) return true; } return false; } } else if (selector === document) return this[0] === document; else if (selector === window) return this[0] === window; else { if (selector.nodeType || selector instanceof Dom7) { compareWith = selector.nodeType ? [selector] : selector; for (i = 0; i < compareWith.length; i++) { if (compareWith[i] === this[0]) return true; } return false; } return false; } }, index: function () { if (this[0]) { var child = this[0]; var i = 0; while ((child = child.previousSibling) !== null) { if (child.nodeType === 1) i++; } return i; } else return undefined; }, eq: function (index) { if (typeof index === 'undefined') return this; var length = this.length; var returnIndex; if (index > length - 1) { return new Dom7([]); } if (index < 0) { returnIndex = length + index; if (returnIndex < 0) return new Dom7([]); else return new Dom7([this[returnIndex]]); } return new Dom7([this[index]]); }, append: function (newChild) { var i, j; for (i = 0; i < this.length; i++) { if (typeof newChild === 'string') { var tempDiv = document.createElement('div'); tempDiv.innerHTML = newChild; while (tempDiv.firstChild) { this[i].appendChild(tempDiv.firstChild); } } else if (newChild instanceof Dom7) { for (j = 0; j < newChild.length; j++) { this[i].appendChild(newChild[j]); } } else { this[i].appendChild(newChild); } } return this; }, prepend: function (newChild) { var i, j; for (i = 0; i < this.length; i++) { if (typeof newChild === 'string') { var tempDiv = document.createElement('div'); tempDiv.innerHTML = newChild; for (j = tempDiv.childNodes.length - 1; j >= 0; j--) { this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); } // this[i].insertAdjacentHTML('afterbegin', newChild); } else if (newChild instanceof Dom7) { for (j = 0; j < newChild.length; j++) { this[i].insertBefore(newChild[j], this[i].childNodes[0]); } } else { this[i].insertBefore(newChild, this[i].childNodes[0]); } } return this; }, insertBefore: function (selector) { var before = $(selector); for (var i = 0; i < this.length; i++) { if (before.length === 1) { before[0].parentNode.insertBefore(this[i], before[0]); } else if (before.length > 1) { for (var j = 0; j < before.length; j++) { before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]); } } } }, insertAfter: function (selector) { var after = $(selector); for (var i = 0; i < this.length; i++) { if (after.length === 1) { after[0].parentNode.insertBefore(this[i], after[0].nextSibling); } else if (after.length > 1) { for (var j = 0; j < after.length; j++) { after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling); } } } }, next: function (selector) { if (this.length > 0) { if (selector) { if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) return new Dom7([this[0].nextElementSibling]); else return new Dom7([]); } else { if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]); else return new Dom7([]); } } else return new Dom7([]); }, nextAll: function (selector) { var nextEls = []; var el = this[0]; if (!el) return new Dom7([]); while (el.nextElementSibling) { var next = el.nextElementSibling; if (selector) { if($(next).is(selector)) nextEls.push(next); } else nextEls.push(next); el = next; } return new Dom7(nextEls); }, prev: function (selector) { if (this.length > 0) { if (selector) { if (this[0].previousElementSibling && $(this[0].previousElementSibling).is(selector)) return new Dom7([this[0].previousElementSibling]); else return new Dom7([]); } else { if (this[0].previousElementSibling) return new Dom7([this[0].previousElementSibling]); else return new Dom7([]); } } else return new Dom7([]); }, prevAll: function (selector) { var prevEls = []; var el = this[0]; if (!el) return new Dom7([]); while (el.previousElementSibling) { var prev = el.previousElementSibling; if (selector) { if($(prev).is(selector)) prevEls.push(prev); } else prevEls.push(prev); el = prev; } return new Dom7(prevEls); }, parent: function (selector) { var parents = []; for (var i = 0; i < this.length; i++) { if (selector) { if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); } else { parents.push(this[i].parentNode); } } return $($.unique(parents)); }, parents: function (selector) { var parents = []; for (var i = 0; i < this.length; i++) { var parent = this[i].parentNode; while (parent) { if (selector) { if ($(parent).is(selector)) parents.push(parent); } else { parents.push(parent); } parent = parent.parentNode; } } return $($.unique(parents)); }, find : function (selector) { var foundElements = []; for (var i = 0; i < this.length; i++) { var found = this[i].querySelectorAll(selector); for (var j = 0; j < found.length; j++) { foundElements.push(found[j]); } } return new Dom7(foundElements); }, children: function (selector) { var children = []; for (var i = 0; i < this.length; i++) { var childNodes = this[i].childNodes; for (var j = 0; j < childNodes.length; j++) { if (!selector) { if (childNodes[j].nodeType === 1) children.push(childNodes[j]); } else { if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) children.push(childNodes[j]); } } } return new Dom7($.unique(children)); }, remove: function () { for (var i = 0; i < this.length; i++) { if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); } return this; }, add: function () { var dom = this; var i, j; for (i = 0; i < arguments.length; i++) { var toAdd = $(arguments[i]); for (j = 0; j < toAdd.length; j++) { dom[dom.length] = toAdd[j]; dom.length++; } } return dom; } }; $.fn = Dom7.prototype; $.unique = function (arr) { var unique = []; for (var i = 0; i < arr.length; i++) { if (unique.indexOf(arr[i]) === -1) unique.push(arr[i]); } return unique; }; return $; })(); /*=========================== Get Dom libraries ===========================*/ var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7']; for (var i = 0; i < swiperDomPlugins.length; i++) { if (window[swiperDomPlugins[i]]) { addLibraryPlugin(window[swiperDomPlugins[i]]); } } // Required DOM Plugins var domLib; if (typeof Dom7 === 'undefined') { domLib = window.Dom7 || window.Zepto || window.jQuery; } else { domLib = Dom7; } /*=========================== Add .swiper plugin from Dom libraries ===========================*/ function addLibraryPlugin(lib) { lib.fn.swiper = function (params) { var firstInstance; lib(this).each(function () { var s = new Swiper(this, params); if (!firstInstance) firstInstance = s; }); return firstInstance; }; } if (domLib) { if (!('transitionEnd' in domLib.fn)) { domLib.fn.transitionEnd = function (callback) { var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'], i, j, dom = this; function fireCallBack(e) { /*jshint validthis:true */ if (e.target !== this) return; callback.call(this, e); for (i = 0; i < events.length; i++) { dom.off(events[i], fireCallBack); } } if (callback) { for (i = 0; i < events.length; i++) { dom.on(events[i], fireCallBack); } } return this; }; } if (!('transform' in domLib.fn)) { domLib.fn.transform = function (transform) { for (var i = 0; i < this.length; i++) { var elStyle = this[i].style; elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform; } return this; }; } if (!('transition' in domLib.fn)) { domLib.fn.transition = function (duration) { if (typeof duration !== 'string') { duration = duration + 'ms'; } for (var i = 0; i < this.length; i++) { var elStyle = this[i].style; elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration; } return this; }; } if (!('outerWidth' in domLib.fn)) { domLib.fn.outerWidth = function (includeMargins) { if (this.length > 0) { if (includeMargins) return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left')); else return this[0].offsetWidth; } else return null; }; } } window.Swiper = Swiper; })(); /*=========================== Swiper AMD Export ===========================*/ if (typeof(module) !== 'undefined') { module.exports = window.Swiper; } else if (typeof define === 'function' && define.amd) { define([], function () { 'use strict'; return window.Swiper; }); } //# sourceMappingURL=maps/swiper.js.map ================================================ FILE: swiper/style.css ================================================ /*Define a container of sliders.*/ .swiper-container { margin-left: auto; margin-right: auto; position: relative; overflow: hidden; z-index: 1; } .swiper-container-fullscreen { height: 100%; } .swipper-gallery { height: 300px; } .swiper-container-no-flexbox .swiper-slide { float: left; } .swiper-container-vertical > .swiper-wrapper { -webkit-box-orient: vertical; -moz-box-orient: vertical; -ms-flex-direction: column; -webkit-flex-direction: column; flex-direction: column; } /*Define a wrapper of swiper.*/ .swiper-wrapper { position: relative; width: 100%; z-index: 1; height: 100%; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-transition-property: -webkit-transform; -moz-transition-property: -moz-transform; -o-transition-property: -o-transform; -ms-transition-property: -ms-transform; transition-property: transform; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } .swiper-container-android .swiper-slide, .swiper-wrapper { -webkit-transform: translate3d(0px, 0, 0); -moz-transform: translate3d(0px, 0, 0); -o-transform: translate(0px, 0px); -ms-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); } .swiper-container-multirow > .swiper-wrapper { -webkit-box-lines: multiple; -moz-box-lines: multiple; -ms-flex-wrap: wrap; -webkit-flex-wrap: wrap; flex-wrap: wrap; } .swiper-container-free-mode > .swiper-wrapper { -webkit-transition-timing-function: ease-out; -moz-transition-timing-function: ease-out; -ms-transition-timing-function: ease-out; -o-transition-timing-function: ease-out; transition-timing-function: ease-out; margin: 0 auto; } /*Define a element slide.*/ .swiper-slide { -webkit-flex-shrink: 0; -ms-flex: 0 0 auto; flex-shrink: 0; width: 100%; height: 100%; position: relative; } /*Align all elements in the center of vertical.*/ .swiper-slide.vertical-align-center { display: flex; flex-direction: column; justify-content: center; padding: 30px; text-align: center; } .swiper-slide i { font-size: 120px; } .swiper-slide h1 { font-size: 40px; font-weight: 600; width: 100%; } .swiper-slide h2 { font-size: 30px; font-weight: 600; width: 100%; } .swiper-slide .margin-bottom { margin-bottom: 25px; } /* Auto Height */ .swiper-container-autoheight .swiper-slide, .swiper-container-autoheight { height: auto; } .swiper-container-autoheight .swiper-wrapper { -webkit-box-align: start; -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; -webkit-transition-property: -webkit-transform, height; -moz-transition-property: -moz-transform; -o-transition-property: -o-transform; -ms-transition-property: -ms-transform; transition-property: transform, height; } /* a11y */ .swiper-container .swiper-notification { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; z-index: -1000; } /* Windows Phone 8 Fixes */ .swiper-wp8-horizontal { -ms-touch-action: pan-y; touch-action: pan-y; } .swiper-wp8-vertical { -ms-touch-action: pan-x; touch-action: pan-x; } /* Arrows */ .swiper-button-prev, .swiper-button-next { position: absolute; top: 50%; width: 27px; height: 44px; margin-top: -22px; z-index: 10; cursor: pointer; -moz-background-size: 27px 44px; -webkit-background-size: 27px 44px; background-size: 27px 44px; background-position: center; background-repeat: no-repeat; } .swiper-button-prev.swiper-button-disabled, .swiper-button-next.swiper-button-disabled { opacity: 0.35; cursor: auto; pointer-events: none; } .swiper-button-prev, .swiper-container-rtl .swiper-button-next { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); left: 10px; right: auto; } .swiper-button-prev.swiper-button-black, .swiper-container-rtl .swiper-button-next.swiper-button-black { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); } .swiper-button-prev.swiper-button-white, .swiper-container-rtl .swiper-button-next.swiper-button-white { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); } .swiper-button-next, .swiper-container-rtl .swiper-button-prev { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); right: 10px; left: auto; } .swiper-button-next.swiper-button-black, .swiper-container-rtl .swiper-button-prev.swiper-button-black { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); } .swiper-button-next.swiper-button-white, .swiper-container-rtl .swiper-button-prev.swiper-button-white { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); } /* Pagination Styles */ .swiper-pagination { position: absolute; text-align: center; -webkit-transition: 300ms; -moz-transition: 300ms; -o-transition: 300ms; transition: 300ms; -webkit-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); z-index: 10; } .swiper-pagination.swiper-pagination-hidden { opacity: 0; } /* Common Styles */ .swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets { bottom: 10px; left: 0; width: 100%; } /* Bullets */ .swiper-pagination-bullet { width: 8px; height: 8px; display: inline-block; border-radius: 100%; background: #000; opacity: 0.2; } button.swiper-pagination-bullet { border: none; margin: 0; padding: 0; box-shadow: none; -moz-appearance: none; -ms-appearance: none; -webkit-appearance: none; appearance: none; } .swiper-pagination-clickable .swiper-pagination-bullet { cursor: pointer; } /*Define a white bullet pagination.*/ .swiper-pagination-white { } /*Define a black bullet pagination.*/ .swiper-pagination-black { } .swiper-pagination-white .swiper-pagination-bullet { background: #fff; } .swiper-pagination-bullet-active { opacity: 1; background: #007aff; } .swiper-pagination-white .swiper-pagination-bullet-active { background: #fff; } .swiper-pagination-black .swiper-pagination-bullet-active { background: #000; } .swiper-container-vertical > .swiper-pagination-bullets { right: 10px; top: 50%; -webkit-transform: translate3d(0px, -50%, 0); -moz-transform: translate3d(0px, -50%, 0); -o-transform: translate(0px, -50%); -ms-transform: translate3d(0px, -50%, 0); transform: translate3d(0px, -50%, 0); } .swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet { margin: 5px 0; display: block; } .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet { margin: 0 5px; } /* Progress */ .swiper-pagination-progress { background: rgba(0, 0, 0, 0.25); position: absolute; } .swiper-pagination-progress .swiper-pagination-progressbar { background: #007aff; position: absolute; left: 0; top: 0; width: 100%; height: 100%; -webkit-transform: scale(0); -ms-transform: scale(0); -o-transform: scale(0); transform: scale(0); -webkit-transform-origin: left top; -moz-transform-origin: left top; -ms-transform-origin: left top; -o-transform-origin: left top; transform-origin: left top; } .swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar { -webkit-transform-origin: right top; -moz-transform-origin: right top; -ms-transform-origin: right top; -o-transform-origin: right top; transform-origin: right top; } .swiper-container-horizontal > .swiper-pagination-progress { width: 100%; height: 4px; left: 0; top: 0; } .swiper-container-vertical > .swiper-pagination-progress { width: 4px; height: 100%; left: 0; top: 0; } .swiper-pagination-progress.swiper-pagination-white { background: rgba(255, 255, 255, 0.5); } .swiper-pagination-progress.swiper-pagination-white .swiper-pagination-progressbar { background: #fff; } .swiper-pagination-progress.swiper-pagination-black .swiper-pagination-progressbar { background: #000; } /* 3D Container */ .swiper-container-3d { -webkit-perspective: 1200px; -moz-perspective: 1200px; -o-perspective: 1200px; perspective: 1200px; } .swiper-container-3d .swiper-wrapper, .swiper-container-3d .swiper-slide, .swiper-container-3d .swiper-slide-shadow-left, .swiper-container-3d .swiper-slide-shadow-right, .swiper-container-3d .swiper-slide-shadow-top, .swiper-container-3d .swiper-slide-shadow-bottom, .swiper-container-3d .swiper-cube-shadow { -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; transform-style: preserve-3d; } .swiper-container-3d .swiper-slide-shadow-left, .swiper-container-3d .swiper-slide-shadow-right, .swiper-container-3d .swiper-slide-shadow-top, .swiper-container-3d .swiper-slide-shadow-bottom { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; } .swiper-container-3d .swiper-slide-shadow-left { background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); } .swiper-container-3d .swiper-slide-shadow-right { background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); } .swiper-container-3d .swiper-slide-shadow-top { background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); } .swiper-container-3d .swiper-slide-shadow-bottom { background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); } .swiper-container-coverflow .swiper-wrapper, .swiper-container-flip .swiper-wrapper { -ms-perspective: 1200px; } .swiper-container-cube, .swiper-container-flip { overflow: visible; } .swiper-container-cube .swiper-slide, .swiper-container-flip .swiper-slide { pointer-events: none; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -ms-backface-visibility: hidden; backface-visibility: hidden; z-index: 1; } .swiper-container-cube .swiper-slide .swiper-slide, .swiper-container-flip .swiper-slide .swiper-slide { pointer-events: none; } .swiper-container-cube .swiper-slide-active, .swiper-container-flip .swiper-slide-active, .swiper-container-cube .swiper-slide-active .swiper-slide-active, .swiper-container-flip .swiper-slide-active .swiper-slide-active { pointer-events: auto; } .swiper-container-cube .swiper-slide-shadow-top, .swiper-container-flip .swiper-slide-shadow-top, .swiper-container-cube .swiper-slide-shadow-bottom, .swiper-container-flip .swiper-slide-shadow-bottom, .swiper-container-cube .swiper-slide-shadow-left, .swiper-container-flip .swiper-slide-shadow-left, .swiper-container-cube .swiper-slide-shadow-right, .swiper-container-flip .swiper-slide-shadow-right { z-index: 0; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -ms-backface-visibility: hidden; backface-visibility: hidden; } .swiper-container-cube .swiper-slide { visibility: hidden; -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0; width: 100%; height: 100%; } .swiper-container-cube.swiper-container-rtl .swiper-slide { -webkit-transform-origin: 100% 0; -moz-transform-origin: 100% 0; -ms-transform-origin: 100% 0; transform-origin: 100% 0; } .swiper-container-cube .swiper-slide-active, .swiper-container-cube .swiper-slide-next, .swiper-container-cube .swiper-slide-prev, .swiper-container-cube .swiper-slide-next + .swiper-slide { pointer-events: auto; visibility: visible; } .swiper-container-cube .swiper-cube-shadow { position: absolute; left: 0; bottom: 0px; width: 100%; height: 100%; background: #000; opacity: 0.6; -webkit-filter: blur(50px); filter: blur(50px); z-index: 0; } .swiper-container-fade.swiper-container-free-mode .swiper-slide { -webkit-transition-timing-function: ease-out; -moz-transition-timing-function: ease-out; -ms-transition-timing-function: ease-out; -o-transition-timing-function: ease-out; transition-timing-function: ease-out; } .swiper-container-fade .swiper-slide { pointer-events: none; -webkit-transition-property: opacity; -moz-transition-property: opacity; -o-transition-property: opacity; transition-property: opacity; } .swiper-container-fade .swiper-slide .swiper-slide { pointer-events: none; } .swiper-container-fade .swiper-slide-active, .swiper-container-fade .swiper-slide-active .swiper-slide-active { pointer-events: auto; } .swiper-zoom-container { width: 100%; height: 100%; display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-box-pack: center; -moz-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; -webkit-box-align: center; -moz-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; text-align: center; } .swiper-zoom-container > img, .swiper-zoom-container > svg, .swiper-zoom-container > canvas { max-width: 100%; max-height: 100%; object-fit: contain; } /* Scrollbar */ .swiper-scrollbar { border-radius: 10px; position: relative; -ms-touch-action: none; background: rgba(0, 0, 0, 0.1); } .swiper-container-horizontal > .swiper-scrollbar { position: absolute; left: 1%; bottom: 3px; z-index: 50; height: 5px; width: 98%; } .swiper-container-vertical > .swiper-scrollbar { position: absolute; right: 3px; top: 1%; z-index: 50; width: 5px; height: 98%; } .swiper-scrollbar-drag { height: 100%; width: 100%; position: relative; background: rgba(0, 0, 0, 0.5); border-radius: 10px; left: 0; top: 0; } .swiper-scrollbar-cursor-drag { cursor: move; } /* Preloader */ .swiper-lazy-preloader { width: 42px; height: 42px; position: absolute; left: 50%; top: 50%; margin-left: -21px; margin-top: -21px; z-index: 10; -webkit-transform-origin: 50%; -moz-transform-origin: 50%; transform-origin: 50%; -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite; -moz-animation: swiper-preloader-spin 1s steps(12, end) infinite; animation: swiper-preloader-spin 1s steps(12, end) infinite; } .swiper-lazy-preloader:after { display: block; content: ""; width: 100%; height: 100%; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); background-position: 50%; -webkit-background-size: 100%; background-size: 100%; background-repeat: no-repeat; } .swiper-lazy-preloader-white:after { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); } @-webkit-keyframes swiper-preloader-spin { 100% { -webkit-transform: rotate(360deg); } } @keyframes swiper-preloader-spin { 100% { transform: rotate(360deg); } } ================================================ FILE: tab/component.json ================================================ { "name":"tab", "author": "fabiorogeriosj", "dependencies": [ "base", "button" ] } ================================================ FILE: tab/index.html ================================================

Tab

Tabs are a horizontal region of buttons or links that allow for a consistent navigation experience between screens. It can contain any combination of text and icons, and is a popular method for enabling mobile navigation.

Dependency: base and button. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install tab

Your tab need have id and for you open tab, just call function openTab('ID_YOUR_TAB'). For init you tab opne you need add class `active` in your button by tab and in your content of tab. See this small example:

You can put your tab in footer and using just icon

See this good example using another components MobileUI :)

================================================ FILE: tab/script.js ================================================ window.openTab = function(t){ var button = event.target; while (!button.parentNode.classList.contains('tab')) { if(button.nodeName == 'BODY') { console.error('The component tab not found, please check your code.'); return false; } button = button.parentNode } var tabContent = document.getElementById(t).parentNode.getElementsByClassName('tab-content'); var buttonActived = button.parentNode.getElementsByClassName('active'); for (var i = 0; i < tabContent.length; i++) { tabContent[i].setAttribute('class',tabContent[i].getAttribute('class').replace('active','')); } for (var i = 0; i < buttonActived.length; i++) { buttonActived[i].setAttribute('class',buttonActived[i].getAttribute('class').replace('active','')); } button.setAttribute('class', button.getAttribute('class') + ' active'); document.getElementById(t).setAttribute('class', document.getElementById(t).getAttribute('class') + ' active'); } ================================================ FILE: tab/style.css ================================================ /*Define a new tab.*/ .tab { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; } /*Define a area content by tab*/ .tab-content { display: none; } /*Define that tab and ab-content is open.*/ .tab-content.active { display: block; } .tab button { -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; font-size: 13px !important; text-transform: uppercase; opacity: 0.6; margin: 0; } .footer.tab button.icon { margin-top: 0; } .header.tab.shadow { box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2); } .platform-ios .tab button { text-transform: none; } .tab button.active { opacity: 1; } .tab button.icon { font-size: 14px; line-height: 16px; } .tab button::before { display: block; font-size: 25px; } .tab button.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: #fff; } /*Create a badge in tab.*/ .tab button .badge { width: 20px; height: 20px; margin-left: 10px; text-align: center; font-size: 14px; font-weight: bold; border-radius: 50%; margin-top: 10px; position: absolute; line-height: 18px; padding-top: 1px; } .tab.footer button.active::after { top: 0; } .header.tab.footer.shadow { box-shadow: -2px -2px 3px rgba(0, 0, 0, 0.2); } .platform-ios .tab button.active::after { display: none; } ================================================ FILE: timeline/component.json ================================================ { "name":"timeline", "author": "gustavoquinalha", "dependencies": ["base", "grid"] } ================================================ FILE: timeline/index.html ================================================

Timeline

To use this component you need install with the command:

mobileui install timeline
================================================ FILE: timeline/style.css ================================================ /*Define a timeline component.*/ .timeline { font-size: 14px; padding: 2px; } .timeline .marker { position: relative; } .timeline .marker::before { background: rgba(0,0,0,0.3); content: ""; height: 100%; width: 2px; margin: 0 auto; position: absolute; margin-top: 10px; z-index: 0; left: 18px; } .timeline .row:last-child .marker::before { display: none; } .timeline .icon-circle, .timeline .icon-circle-small, .timeline .icon-circle-big { margin: 0 auto; margin-top: 10px; position: absolute; margin-left: 7px; } .timeline .icon-circle i::before, .timeline .icon-circle-small i::before, .timeline .icon-circle-big i::before { margin-top: 4px; } .timeline .avatar-group { -webkit-transform: translateX(10px); transform: translateX(10px); } .timeline .avatar-photo { background: #eaeaea; width: 30px; height: 30px; overflow: hidden; text-align: center; border: 1px solid #d7d2d2 } .timeline .avatar-photo small { margin-top: 100px; } .timeline .circle-more { background: #eaeaea; width: 30px; height: 30px; overflow: hidden; text-align: center; border-radius: 50%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; color: #bdbbbb; border: 1px solid #d7d2d2; font-size: 12px; } ================================================ FILE: toast/component.json ================================================ { "name":"toast", "author": "lucasssv", "dependencies": [ "base" ] } ================================================ FILE: toast/index.html ================================================

Toast

A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. Toasts automatically disappear after a timeout.

Dependency: base. The dependencies will be installed together with this module

To use this component you need install with the command:

mobileui install toast

To use, you need to call the function openToast('YOUR MESSAGE') or openToast(objectCustomized).

See this small example:

================================================ FILE: toast/script.js ================================================ window.openToast = function (config) { var defaultConfig = { class: 'black radius padding shadow', duration: 2000, position: 'bottom', onclick: window.closeToast } if (typeof config === 'string') { defaultConfig.message = config } if (typeof config === 'object' && config.message) { defaultConfig.message = config.message } if (typeof config === 'object' && config.class) { defaultConfig.class = config.class } if (typeof config === 'object' && config.duration) { defaultConfig.duration = config.duration } if (typeof config === 'object' && config.position) { defaultConfig.position = 'toast-' + config.position } if (typeof config === 'object' && config.onclick) { defaultConfig.onclick = config.onclick } var body = document.getElementsByTagName('body')[0] if (event && event.target && event.target.parentNode && event.target.parentNode.className.indexOf('body') >= 0) { body = event.target.parentNode } var toast = document.createElement('div') toast.className = 'toast' toast.classList.add(defaultConfig.position) var spanToast = document.createElement('div') spanToast.className = defaultConfig.class spanToast.innerHTML = defaultConfig.message spanToast.onclick = defaultConfig.onclick toast.appendChild(spanToast) body.appendChild(toast) setTimeout(function() { toast.classList.add('show') }, 100) setTimeout(function() { if(!toast) return false toast.classList.remove('show') setTimeout(function() { if(!toast.parentNode) return false toast.parentNode.removeChild(toast) }, 400) }, defaultConfig.duration) } window.closeToast = function(event) { event.target.parentNode.classList.remove('show') setTimeout(function() { event.target.parentNode.parentNode.removeChild(event.target.parentNode) }, 400) } ================================================ FILE: toast/style.css ================================================ /* Show a Toast message (a little text popup) */ .toast { z-index: 999999; position: absolute; left: 0; padding: 20px; text-align: center; width: 100%; opacity: 0; transition: opacity .25s ease-in-out; -moz-transition: opacity .25s ease-in-out; -webkit-transition: opacity .25s ease-in-out; } .toast.show { opacity: 1; } .toast.toast-bottom { bottom: 10px; } .toast.toast-top { top: 10px; } .toast.toast-center { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; justify-content: center; -webkit-box-align: center; -moz-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; height: 100%; top: 0; } .toast div { padding: 10px; display: inline-block; } .toast .full { display: block; width: 100%; }