<!DOCTYPE html>
<html>

<head>
  <link rel="stylesheet" href="style.css">
  <script src="riot+compiler-min.js"></script>
  <script src="onsen-ui-min-2.0.0-rc.4.js"></script>

  <link rel="stylesheet" href="onsenui.css" type="text/css" media="all" />
  <link rel="stylesheet" href="onsen-css-components.css" type="text/css" media="all" />

  <!-- include riot tags -->
  <script src="page1-component.html" type='riot/tag'></script>
  <script src="page2-component.html" type='riot/tag'></script>

  <script>
    var nav = {};
    var activeComponents = {};

    /* compile riot tags synchronously [optional] */
    riot.compile(function() {
      ons.ready(function() {
        nav = document.getElementById('navigator');
        nav.pushPage('page1.html');

        document.addEventListener('init', function(event) {

          switch (event.target.id) {
            case 'page1':
              console.log('page1');
              if (activeComponents['page1'] != null)
                activeComponents['page1'].unmount(true);

              activeComponents['page1'] = riot.mount('page1-component', {
                contents: 'Page 1 contents'
              })[0];
              break;
            case 'page2':
              console.log('page2');
              if (activeComponents['page2'] != null)
                activeComponents['page2'].unmount(true);

              activeComponents['page2'] = riot.mount('page2-component', {
                title: 'Page 2 title',
                contents: 'Page 2 contents'
              })[0];
              break;
          }
        });
      });
    });
  </script>

</head>

<body>
  <ons-page>
    <ons-navigator id="navigator">
    </ons-navigator>
  </ons-page>

  <ons-template id="page1.html">
    <ons-page id="page1">
      <page1-component></page1-component>
    </ons-page>
  </ons-template>

  <ons-template id="page2.html">
    <ons-page id="page2">
      <page2-component></page2-component>
    </ons-page>
  </ons-template>

</body>

</html>
/* Styles go here */

"undefined"==typeof WeakMap&&!function(){var defineProperty=Object.defineProperty,counter=Date.now()%1e9,WeakMap=function(){this.name="__st"+(1e9*Math.random()>>>0)+(counter++ +"__")};WeakMap.prototype={set:function(key,value){var entry=key[this.name];return entry&&entry[0]===key?entry[1]=value:defineProperty(key,this.name,{value:[key,value],writable:!0}),this},get:function(key){var entry;return(entry=key[this.name])&&entry[0]===key?entry[1]:void 0},"delete":function(key){var entry=key[this.name];return entry&&entry[0]===key?(entry[0]=entry[1]=void 0,!0):!1},has:function(key){var entry=key[this.name];return entry?entry[0]===key:!1}},window.WeakMap=WeakMap}(),function(global){function scheduleCallback(observer){scheduledObservers.push(observer),isScheduled||(isScheduled=!0,setImmediate(dispatchCallbacks))}function wrapIfNeeded(node){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(node)||node}function dispatchCallbacks(){isScheduled=!1;var observers=scheduledObservers;scheduledObservers=[],observers.sort(function(o1,o2){return o1.uid_-o2.uid_});var anyNonEmpty=!1;observers.forEach(function(observer){var queue=observer.takeRecords();removeTransientObserversFor(observer),queue.length&&(observer.callback_(queue,observer),anyNonEmpty=!0)}),anyNonEmpty&&dispatchCallbacks()}function removeTransientObserversFor(observer){observer.nodes_.forEach(function(node){var registrations=registrationsTable.get(node);registrations&&registrations.forEach(function(registration){registration.observer===observer&&registration.removeTransientObservers()})})}function forEachAncestorAndObserverEnqueueRecord(target,callback){for(var node=target;node;node=node.parentNode){var registrations=registrationsTable.get(node);if(registrations)for(var j=0;j<registrations.length;j++){var registration=registrations[j],options=registration.options;if(node===target||options.subtree){var record=callback(options);record&&registration.enqueue(record)}}}}function JsMutationObserver(callback){this.callback_=callback,this.nodes_=[],this.records_=[],this.uid_=++uidCounter}function MutationRecord(type,target){this.type=type,this.target=target,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function copyMutationRecord(original){var record=new MutationRecord(original.type,original.target);return record.addedNodes=original.addedNodes.slice(),record.removedNodes=original.removedNodes.slice(),record.previousSibling=original.previousSibling,record.nextSibling=original.nextSibling,record.attributeName=original.attributeName,record.attributeNamespace=original.attributeNamespace,record.oldValue=original.oldValue,record}function getRecord(type,target){return currentRecord=new MutationRecord(type,target)}function getRecordWithOldValue(oldValue){return recordWithOldValue?recordWithOldValue:(recordWithOldValue=copyMutationRecord(currentRecord),recordWithOldValue.oldValue=oldValue,recordWithOldValue)}function clearRecords(){currentRecord=recordWithOldValue=void 0}function recordRepresentsCurrentMutation(record){return record===recordWithOldValue||record===currentRecord}function selectRecord(lastRecord,newRecord){return lastRecord===newRecord?lastRecord:recordWithOldValue&&recordRepresentsCurrentMutation(lastRecord)?recordWithOldValue:null}function Registration(observer,target,options){this.observer=observer,this.target=target,this.options=options,this.transientObservedNodes=[]}var setImmediate,registrationsTable=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))setImmediate=setTimeout;else if(window.setImmediate)setImmediate=window.setImmediate;else{var setImmediateQueue=[],sentinel=String(Math.random());window.addEventListener("message",function(e){if(e.data===sentinel){var queue=setImmediateQueue;setImmediateQueue=[],queue.forEach(function(func){func()})}}),setImmediate=function(func){setImmediateQueue.push(func),window.postMessage(sentinel,"*")}}var isScheduled=!1,scheduledObservers=[],uidCounter=0;JsMutationObserver.prototype={observe:function(target,options){if(target=wrapIfNeeded(target),!options.childList&&!options.attributes&&!options.characterData||options.attributeOldValue&&!options.attributes||options.attributeFilter&&options.attributeFilter.length&&!options.attributes||options.characterDataOldValue&&!options.characterData)throw new SyntaxError;var registrations=registrationsTable.get(target);registrations||registrationsTable.set(target,registrations=[]);for(var registration,i=0;i<registrations.length;i++)if(registrations[i].observer===this){registration=registrations[i],registration.removeListeners(),registration.options=options;break}registration||(registration=new Registration(this,target,options),registrations.push(registration),this.nodes_.push(target)),registration.addListeners()},disconnect:function(){this.nodes_.forEach(function(node){for(var registrations=registrationsTable.get(node),i=0;i<registrations.length;i++){var registration=registrations[i];if(registration.observer===this){registration.removeListeners(),registrations.splice(i,1);break}}},this),this.records_=[]},takeRecords:function(){var copyOfRecords=this.records_;return this.records_=[],copyOfRecords}};var currentRecord,recordWithOldValue;Registration.prototype={enqueue:function(record){var records=this.observer.records_,length=records.length;if(records.length>0){var lastRecord=records[length-1],recordToReplaceLast=selectRecord(lastRecord,record);if(recordToReplaceLast)return void(records[length-1]=recordToReplaceLast)}else scheduleCallback(this.observer);records[length]=record},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(node){var options=this.options;options.attributes&&node.addEventListener("DOMAttrModified",this,!0),options.characterData&&node.addEventListener("DOMCharacterDataModified",this,!0),options.childList&&node.addEventListener("DOMNodeInserted",this,!0),(options.childList||options.subtree)&&node.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(node){var options=this.options;options.attributes&&node.removeEventListener("DOMAttrModified",this,!0),options.characterData&&node.removeEventListener("DOMCharacterDataModified",this,!0),options.childList&&node.removeEventListener("DOMNodeInserted",this,!0),(options.childList||options.subtree)&&node.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(node){if(node!==this.target){this.addListeners_(node),this.transientObservedNodes.push(node);var registrations=registrationsTable.get(node);registrations||registrationsTable.set(node,registrations=[]),registrations.push(this)}},removeTransientObservers:function(){var transientObservedNodes=this.transientObservedNodes;this.transientObservedNodes=[],transientObservedNodes.forEach(function(node){this.removeListeners_(node);for(var registrations=registrationsTable.get(node),i=0;i<registrations.length;i++)if(registrations[i]===this){registrations.splice(i,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var name=e.attrName,namespace=e.relatedNode.namespaceURI,target=e.target,record=new getRecord("attributes",target);record.attributeName=name,record.attributeNamespace=namespace;var oldValue=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;forEachAncestorAndObserverEnqueueRecord(target,function(options){return!options.attributes||options.attributeFilter&&options.attributeFilter.length&&-1===options.attributeFilter.indexOf(name)&&-1===options.attributeFilter.indexOf(namespace)?void 0:options.attributeOldValue?getRecordWithOldValue(oldValue):record});break;case"DOMCharacterDataModified":var target=e.target,record=getRecord("characterData",target),oldValue=e.prevValue;forEachAncestorAndObserverEnqueueRecord(target,function(options){return options.characterData?options.characterDataOldValue?getRecordWithOldValue(oldValue):record:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var addedNodes,removedNodes,changedNode=e.target;"DOMNodeInserted"===e.type?(addedNodes=[changedNode],removedNodes=[]):(addedNodes=[],removedNodes=[changedNode]);var previousSibling=changedNode.previousSibling,nextSibling=changedNode.nextSibling,record=getRecord("childList",e.target.parentNode);record.addedNodes=addedNodes,record.removedNodes=removedNodes,record.previousSibling=previousSibling,record.nextSibling=nextSibling,forEachAncestorAndObserverEnqueueRecord(e.relatedNode,function(options){return options.childList?record:void 0})}clearRecords()}},global.JsMutationObserver=JsMutationObserver,global.MutationObserver||(global.MutationObserver=JsMutationObserver)}(this),window.CustomElements=window.CustomElements||{flags:{}},function(scope){var flags=scope.flags,modules=[],addModule=function(module){modules.push(module)},initializeModules=function(){modules.forEach(function(module){module(scope)})};scope.addModule=addModule,scope.initializeModules=initializeModules,scope.hasNative=Boolean(document.registerElement),scope.useNative=!flags.register&&scope.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(scope){function forSubtree(node,cb){findAllElements(node,function(e){return cb(e)?!0:void forRoots(e,cb)}),forRoots(node,cb)}function findAllElements(node,find,data){var e=node.firstElementChild;if(!e)for(e=node.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)find(e,data)!==!0&&findAllElements(e,find,data),e=e.nextElementSibling;return null}function forRoots(node,cb){for(var root=node.shadowRoot;root;)forSubtree(root,cb),root=root.olderShadowRoot}function forDocumentTree(doc,cb){_forDocumentTree(doc,cb,[])}function _forDocumentTree(doc,cb,processingDocuments){if(doc=wrap(doc),!(processingDocuments.indexOf(doc)>=0)){processingDocuments.push(doc);for(var n,imports=doc.querySelectorAll("link[rel="+IMPORT_LINK_TYPE+"]"),i=0,l=imports.length;l>i&&(n=imports[i]);i++)n["import"]&&_forDocumentTree(n["import"],cb,processingDocuments);cb(doc)}}var IMPORT_LINK_TYPE=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";scope.forDocumentTree=forDocumentTree,scope.forSubtree=forSubtree}),window.CustomElements.addModule(function(scope){function addedNode(node){return added(node)||addedSubtree(node)}function added(node){return scope.upgrade(node)?!0:void attached(node)}function addedSubtree(node){forSubtree(node,function(e){return added(e)?!0:void 0})}function attachedNode(node){attached(node),inDocument(node)&&forSubtree(node,function(e){attached(e)})}function deferMutation(fn){pendingMutations.push(fn),isPendingMutations||(isPendingMutations=!0,setTimeout(takeMutations))}function takeMutations(){isPendingMutations=!1;for(var p,$p=pendingMutations,i=0,l=$p.length;l>i&&(p=$p[i]);i++)p();pendingMutations=[]}function attached(element){hasPolyfillMutations?deferMutation(function(){_attached(element)}):_attached(element)}function _attached(element){element.__upgraded__&&(element.attachedCallback||element.detachedCallback)&&!element.__attached&&inDocument(element)&&(element.__attached=!0,element.attachedCallback&&element.attachedCallback())}function detachedNode(node){detached(node),forSubtree(node,function(e){detached(e)})}function detached(element){hasPolyfillMutations?deferMutation(function(){_detached(element)}):_detached(element)}function _detached(element){element.__upgraded__&&(element.attachedCallback||element.detachedCallback)&&element.__attached&&!inDocument(element)&&(element.__attached=!1,element.detachedCallback&&element.detachedCallback())}function inDocument(element){for(var p=element,doc=wrap(document);p;){if(p==doc)return!0;p=p.parentNode||p.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&p.host}}function watchShadow(node){if(node.shadowRoot&&!node.shadowRoot.__watched){flags.dom&&console.log("watching shadow-root for: ",node.localName);for(var root=node.shadowRoot;root;)observe(root),root=root.olderShadowRoot}}function handler(mutations){if(flags.dom){var mx=mutations[0];if(mx&&"childList"===mx.type&&mx.addedNodes&&mx.addedNodes){for(var d=mx.addedNodes[0];d&&d!==document&&!d.host;)d=d.parentNode;var u=d&&(d.URL||d._URL||d.host&&d.host.localName)||"";u=u.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",mutations.length,u||"")}mutations.forEach(function(mx){"childList"===mx.type&&(forEach(mx.addedNodes,function(n){n.localName&&addedNode(n)}),forEach(mx.removedNodes,function(n){n.localName&&detachedNode(n)}))}),flags.dom&&console.groupEnd()}function takeRecords(node){for(node=wrap(node),node||(node=wrap(document));node.parentNode;)node=node.parentNode;var observer=node.__observer;observer&&(handler(observer.takeRecords()),takeMutations())}function observe(inRoot){if(!inRoot.__observer){var observer=new MutationObserver(handler);observer.observe(inRoot,{childList:!0,subtree:!0}),inRoot.__observer=observer}}function upgradeDocument(doc){doc=wrap(doc),flags.dom&&console.group("upgradeDocument: ",doc.baseURI.split("/").pop()),addedNode(doc),observe(doc),flags.dom&&console.groupEnd()}function upgradeDocumentTree(doc){forDocumentTree(doc,upgradeDocument)}var flags=scope.flags,forSubtree=scope.forSubtree,forDocumentTree=scope.forDocumentTree,hasPolyfillMutations=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;scope.hasPolyfillMutations=hasPolyfillMutations;var isPendingMutations=!1,pendingMutations=[],forEach=Array.prototype.forEach.call.bind(Array.prototype.forEach),originalCreateShadowRoot=Element.prototype.createShadowRoot;originalCreateShadowRoot&&(Element.prototype.createShadowRoot=function(){var root=originalCreateShadowRoot.call(this);return CustomElements.watchShadow(this),root}),scope.watchShadow=watchShadow,scope.upgradeDocumentTree=upgradeDocumentTree,scope.upgradeSubtree=addedSubtree,scope.upgradeAll=addedNode,scope.attachedNode=attachedNode,scope.takeRecords=takeRecords}),window.CustomElements.addModule(function(scope){function upgrade(node){if(!node.__upgraded__&&node.nodeType===Node.ELEMENT_NODE){var is=node.getAttribute("is"),definition=scope.getRegisteredDefinition(is||node.localName);if(definition){if(is&&definition.tag==node.localName)return upgradeWithDefinition(node,definition);if(!is&&!definition["extends"])return upgradeWithDefinition(node,definition)}}}function upgradeWithDefinition(element,definition){return flags.upgrade&&console.group("upgrade:",element.localName),definition.is&&element.setAttribute("is",definition.is),implementPrototype(element,definition),element.__upgraded__=!0,created(element),scope.attachedNode(element),scope.upgradeSubtree(element),flags.upgrade&&console.groupEnd(),element}function implementPrototype(element,definition){Object.__proto__?element.__proto__=definition.prototype:(customMixin(element,definition.prototype,definition["native"]),element.__proto__=definition.prototype)}function customMixin(inTarget,inSrc,inNative){for(var used={},p=inSrc;p!==inNative&&p!==HTMLElement.prototype;){for(var k,keys=Object.getOwnPropertyNames(p),i=0;k=keys[i];i++)used[k]||(Object.defineProperty(inTarget,k,Object.getOwnPropertyDescriptor(p,k)),used[k]=1);p=Object.getPrototypeOf(p)}}function created(element){element.createdCallback&&element.createdCallback()}var flags=scope.flags;scope.upgrade=upgrade,scope.upgradeWithDefinition=upgradeWithDefinition,scope.implementPrototype=implementPrototype}),window.CustomElements.addModule(function(scope){function register(name,options){var definition=options||{};if(!name)throw new Error("document.registerElement: first argument `name` must not be empty");if(name.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(name)+"'.");if(isReservedTag(name))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(name)+"'. The type name is invalid.");if(getRegisteredDefinition(name))throw new Error("DuplicateDefinitionError: a type with name '"+String(name)+"' is already registered");return definition.prototype||(definition.prototype=Object.create(HTMLElement.prototype)),definition.__name=name.toLowerCase(),definition.lifecycle=definition.lifecycle||{},definition.ancestry=ancestry(definition["extends"]),resolveTagName(definition),resolvePrototypeChain(definition),overrideAttributeApi(definition.prototype),registerDefinition(definition.__name,definition),definition.ctor=generateConstructor(definition),definition.ctor.prototype=definition.prototype,definition.prototype.constructor=definition.ctor,scope.ready&&upgradeDocumentTree(document),definition.ctor}function overrideAttributeApi(prototype){if(!prototype.setAttribute._polyfilled){var setAttribute=prototype.setAttribute;prototype.setAttribute=function(name,value){changeAttribute.call(this,name,value,setAttribute)};var removeAttribute=prototype.removeAttribute;prototype.removeAttribute=function(name){changeAttribute.call(this,name,null,removeAttribute)},prototype.setAttribute._polyfilled=!0}}function changeAttribute(name,value,operation){name=name.toLowerCase();var oldValue=this.getAttribute(name);operation.apply(this,arguments);var newValue=this.getAttribute(name);this.attributeChangedCallback&&newValue!==oldValue&&this.attributeChangedCallback(name,oldValue,newValue)}function isReservedTag(name){for(var i=0;i<reservedTagList.length;i++)if(name===reservedTagList[i])return!0}function ancestry(extnds){var extendee=getRegisteredDefinition(extnds);return extendee?ancestry(extendee["extends"]).concat([extendee]):[]}function resolveTagName(definition){for(var a,baseTag=definition["extends"],i=0;a=definition.ancestry[i];i++)baseTag=a.is&&a.tag;definition.tag=baseTag||definition.__name,baseTag&&(definition.is=definition.__name)}function resolvePrototypeChain(definition){if(!Object.__proto__){var nativePrototype=HTMLElement.prototype;if(definition.is){var inst=document.createElement(definition.tag),expectedPrototype=Object.getPrototypeOf(inst);expectedPrototype===definition.prototype&&(nativePrototype=expectedPrototype)}for(var ancestor,proto=definition.prototype;proto&&proto!==nativePrototype;)ancestor=Object.getPrototypeOf(proto),proto.__proto__=ancestor,proto=ancestor;definition["native"]=nativePrototype}}function instantiate(definition){return upgradeWithDefinition(domCreateElement(definition.tag),definition)}function getRegisteredDefinition(name){return name?registry[name.toLowerCase()]:void 0}function registerDefinition(name,definition){registry[name]=definition}function generateConstructor(definition){return function(){return instantiate(definition)}}function createElementNS(namespace,tag,typeExtension){return namespace===HTML_NAMESPACE?createElement(tag,typeExtension):domCreateElementNS(namespace,tag)}function createElement(tag,typeExtension){tag&&(tag=tag.toLowerCase()),typeExtension&&(typeExtension=typeExtension.toLowerCase());var definition=getRegisteredDefinition(typeExtension||tag);if(definition){if(tag==definition.tag&&typeExtension==definition.is)return new definition.ctor;if(!typeExtension&&!definition.is)return new definition.ctor}var element;return typeExtension?(element=createElement(tag),element.setAttribute("is",typeExtension),element):(element=domCreateElement(tag),tag.indexOf("-")>=0&&implementPrototype(element,HTMLElement),element)}function wrapDomMethodToForceUpgrade(obj,methodName){var orig=obj[methodName];obj[methodName]=function(){var n=orig.apply(this,arguments);return upgradeAll(n),n}}var isInstance,isIE11OrOlder=scope.isIE11OrOlder,upgradeDocumentTree=scope.upgradeDocumentTree,upgradeAll=scope.upgradeAll,upgradeWithDefinition=scope.upgradeWithDefinition,implementPrototype=scope.implementPrototype,useNative=scope.useNative,reservedTagList=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],registry={},HTML_NAMESPACE="http://www.w3.org/1999/xhtml",domCreateElement=document.createElement.bind(document),domCreateElementNS=document.createElementNS.bind(document);isInstance=Object.__proto__||useNative?function(obj,base){return obj instanceof base}:function(obj,ctor){for(var p=obj;p;){if(p===ctor.prototype)return!0;p=p.__proto__}return!1},wrapDomMethodToForceUpgrade(Node.prototype,"cloneNode"),wrapDomMethodToForceUpgrade(document,"importNode"),isIE11OrOlder&&!function(){var importNode=document.importNode;document.importNode=function(){var n=importNode.apply(document,arguments);if(n.nodeType==n.DOCUMENT_FRAGMENT_NODE){var f=document.createDocumentFragment();return f.appendChild(n),f}return n}}(),document.registerElement=register,document.createElement=createElement,document.createElementNS=createElementNS,scope.registry=registry,scope["instanceof"]=isInstance,scope.reservedTagList=reservedTagList,scope.getRegisteredDefinition=getRegisteredDefinition,document.register=document.registerElement}),function(scope){function bootstrap(){upgradeDocumentTree(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(elt){upgradeDocumentTree(wrap(elt["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var useNative=scope.useNative,initializeModules=scope.initializeModules,isIE11OrOlder=/Trident/.test(navigator.userAgent);if(useNative){var nop=function(){};scope.watchShadow=nop,scope.upgrade=nop,scope.upgradeAll=nop,scope.upgradeDocumentTree=nop,scope.upgradeSubtree=nop,scope.takeRecords=nop,scope["instanceof"]=function(obj,base){return obj instanceof base}}else initializeModules();var upgradeDocumentTree=scope.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(node){return node}),isIE11OrOlder&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(inType,params){params=params||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(inType,Boolean(params.bubbles),Boolean(params.cancelable),params.detail),e},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||scope.flags.eager)bootstrap();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var loadEvent=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(loadEvent,bootstrap)}else bootstrap();scope.isIE11OrOlder=isIE11OrOlder}(window.CustomElements),window.CustomEvent||!function(){var CustomEvent;CustomEvent=function(event,params){var evt;return params=params||{bubbles:!1,cancelable:!1,detail:void 0},evt=document.createEvent("CustomEvent"),evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail),evt},CustomEvent.prototype=window.Event.prototype,window.CustomEvent=CustomEvent}(),"undefined"==typeof WeakMap&&!function(){var defineProperty=Object.defineProperty,counter=Date.now()%1e9,WeakMap=function(){this.name="__st"+(1e9*Math.random()>>>0)+(counter++ +"__")};WeakMap.prototype={set:function(key,value){var entry=key[this.name];return entry&&entry[0]===key?entry[1]=value:defineProperty(key,this.name,{value:[key,value],writable:!0}),this},get:function(key){var entry;return(entry=key[this.name])&&entry[0]===key?entry[1]:void 0},"delete":function(key){var entry=key[this.name];return entry&&entry[0]===key?(entry[0]=entry[1]=void 0,!0):!1},has:function(key){var entry=key[this.name];return entry?entry[0]===key:!1}},window.WeakMap=WeakMap}(),function(global){function scheduleCallback(observer){scheduledObservers.push(observer),isScheduled||(isScheduled=!0,setImmediate(dispatchCallbacks))}function wrapIfNeeded(node){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(node)||node}function dispatchCallbacks(){isScheduled=!1;var observers=scheduledObservers;scheduledObservers=[],observers.sort(function(o1,o2){return o1.uid_-o2.uid_});var anyNonEmpty=!1;observers.forEach(function(observer){var queue=observer.takeRecords();removeTransientObserversFor(observer),queue.length&&(observer.callback_(queue,observer),anyNonEmpty=!0)}),anyNonEmpty&&dispatchCallbacks()}function removeTransientObserversFor(observer){observer.nodes_.forEach(function(node){var registrations=registrationsTable.get(node);registrations&&registrations.forEach(function(registration){registration.observer===observer&&registration.removeTransientObservers()})})}function forEachAncestorAndObserverEnqueueRecord(target,callback){for(var node=target;node;node=node.parentNode){var registrations=registrationsTable.get(node);if(registrations)for(var j=0;j<registrations.length;j++){var registration=registrations[j],options=registration.options;if(node===target||options.subtree){var record=callback(options);record&&registration.enqueue(record)}}}}function JsMutationObserver(callback){this.callback_=callback,this.nodes_=[],this.records_=[],this.uid_=++uidCounter}function MutationRecord(type,target){this.type=type,this.target=target,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function copyMutationRecord(original){var record=new MutationRecord(original.type,original.target);return record.addedNodes=original.addedNodes.slice(),record.removedNodes=original.removedNodes.slice(),record.previousSibling=original.previousSibling,record.nextSibling=original.nextSibling,record.attributeName=original.attributeName,record.attributeNamespace=original.attributeNamespace,record.oldValue=original.oldValue,record}function getRecord(type,target){return currentRecord=new MutationRecord(type,target)}function getRecordWithOldValue(oldValue){return recordWithOldValue?recordWithOldValue:(recordWithOldValue=copyMutationRecord(currentRecord),recordWithOldValue.oldValue=oldValue,recordWithOldValue)}function clearRecords(){currentRecord=recordWithOldValue=void 0}function recordRepresentsCurrentMutation(record){return record===recordWithOldValue||record===currentRecord}function selectRecord(lastRecord,newRecord){return lastRecord===newRecord?lastRecord:recordWithOldValue&&recordRepresentsCurrentMutation(lastRecord)?recordWithOldValue:null}function Registration(observer,target,options){this.observer=observer,this.target=target,this.options=options,this.transientObservedNodes=[]}if(!global.JsMutationObserver){var setImmediate,registrationsTable=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))setImmediate=setTimeout;else if(window.setImmediate)setImmediate=window.setImmediate;else{var setImmediateQueue=[],sentinel=String(Math.random());window.addEventListener("message",function(e){if(e.data===sentinel){var queue=setImmediateQueue;setImmediateQueue=[],queue.forEach(function(func){func()})}}),setImmediate=function(func){setImmediateQueue.push(func),window.postMessage(sentinel,"*")}}var isScheduled=!1,scheduledObservers=[],uidCounter=0;JsMutationObserver.prototype={observe:function(target,options){if(target=wrapIfNeeded(target),!options.childList&&!options.attributes&&!options.characterData||options.attributeOldValue&&!options.attributes||options.attributeFilter&&options.attributeFilter.length&&!options.attributes||options.characterDataOldValue&&!options.characterData)throw new SyntaxError;var registrations=registrationsTable.get(target);registrations||registrationsTable.set(target,registrations=[]);for(var registration,i=0;i<registrations.length;i++)if(registrations[i].observer===this){registration=registrations[i],registration.removeListeners(),registration.options=options;break}registration||(registration=new Registration(this,target,options),registrations.push(registration),this.nodes_.push(target)),registration.addListeners()},disconnect:function(){this.nodes_.forEach(function(node){for(var registrations=registrationsTable.get(node),i=0;i<registrations.length;i++){var registration=registrations[i];if(registration.observer===this){registration.removeListeners(),registrations.splice(i,1);break}}},this),this.records_=[]},takeRecords:function(){var copyOfRecords=this.records_;return this.records_=[],copyOfRecords}};var currentRecord,recordWithOldValue;Registration.prototype={enqueue:function(record){var records=this.observer.records_,length=records.length;if(records.length>0){var lastRecord=records[length-1],recordToReplaceLast=selectRecord(lastRecord,record);if(recordToReplaceLast)return void(records[length-1]=recordToReplaceLast)}else scheduleCallback(this.observer);records[length]=record},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(node){var options=this.options;options.attributes&&node.addEventListener("DOMAttrModified",this,!0),options.characterData&&node.addEventListener("DOMCharacterDataModified",this,!0),options.childList&&node.addEventListener("DOMNodeInserted",this,!0),(options.childList||options.subtree)&&node.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(node){var options=this.options;options.attributes&&node.removeEventListener("DOMAttrModified",this,!0),options.characterData&&node.removeEventListener("DOMCharacterDataModified",this,!0),options.childList&&node.removeEventListener("DOMNodeInserted",this,!0),(options.childList||options.subtree)&&node.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(node){if(node!==this.target){this.addListeners_(node),this.transientObservedNodes.push(node);var registrations=registrationsTable.get(node);registrations||registrationsTable.set(node,registrations=[]),registrations.push(this)}},removeTransientObservers:function(){var transientObservedNodes=this.transientObservedNodes;this.transientObservedNodes=[],transientObservedNodes.forEach(function(node){this.removeListeners_(node);for(var registrations=registrationsTable.get(node),i=0;i<registrations.length;i++)if(registrations[i]===this){registrations.splice(i,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var name=e.attrName,namespace=e.relatedNode.namespaceURI,target=e.target,record=new getRecord("attributes",target);record.attributeName=name,record.attributeNamespace=namespace;var oldValue=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;forEachAncestorAndObserverEnqueueRecord(target,function(options){return!options.attributes||options.attributeFilter&&options.attributeFilter.length&&-1===options.attributeFilter.indexOf(name)&&-1===options.attributeFilter.indexOf(namespace)?void 0:options.attributeOldValue?getRecordWithOldValue(oldValue):record});break;case"DOMCharacterDataModified":var target=e.target,record=getRecord("characterData",target),oldValue=e.prevValue;forEachAncestorAndObserverEnqueueRecord(target,function(options){return options.characterData?options.characterDataOldValue?getRecordWithOldValue(oldValue):record:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var addedNodes,removedNodes,changedNode=e.target;"DOMNodeInserted"===e.type?(addedNodes=[changedNode],removedNodes=[]):(addedNodes=[],removedNodes=[changedNode]);var previousSibling=changedNode.previousSibling,nextSibling=changedNode.nextSibling,record=getRecord("childList",e.target.parentNode);record.addedNodes=addedNodes,record.removedNodes=removedNodes,record.previousSibling=previousSibling,record.nextSibling=nextSibling,forEachAncestorAndObserverEnqueueRecord(e.relatedNode,function(options){return options.childList?record:void 0})}clearRecords()}},global.JsMutationObserver=JsMutationObserver,global.MutationObserver||(global.MutationObserver=JsMutationObserver,JsMutationObserver._isPolyfilled=!0);
}}(self),window.animit=function(){"use strict";var TIMEOUT_RATIO=1.4,util={};util.capitalize=function(str){return str.charAt(0).toUpperCase()+str.slice(1)},util.buildTransitionValue=function(params){params.property=params.property||"all",params.duration=params.duration||.4,params.timing=params.timing||"linear";var props=params.property.split(/ +/);return props.map(function(prop){return prop+" "+params.duration+"s "+params.timing}).join(", ")},util.onceOnTransitionEnd=function(element,callback){if(!element)return function(){};var fn=function(event){element==event.target&&(event.stopPropagation(),removeListeners(),callback())},removeListeners=function(){util._transitionEndEvents.forEach(function(eventName){element.removeEventListener(eventName,fn,!1)})};return util._transitionEndEvents.forEach(function(eventName){element.addEventListener(eventName,fn,!1)}),removeListeners},util._transitionEndEvents=function(){return"ontransitionend"in window?["transitionend"]:"onwebkittransitionend"in window?["webkitTransitionEnd"]:"webkit"===util.vendorPrefix||"o"===util.vendorPrefix||"moz"===util.vendorPrefix||"ms"===util.vendorPrefix?[util.vendorPrefix+"TransitionEnd","transitionend"]:[]}(),util._cssPropertyDict=function(){for(var styles=window.getComputedStyle(document.documentElement,""),dict={},a="A".charCodeAt(0),z="z".charCodeAt(0),upper=function(s){return s.substr(1).toUpperCase()},i=0;i<styles.length;i++){var key=styles[i].replace(/^[\-]+/,"").replace(/[\-][a-z]/g,upper).replace(/^moz/,"Moz");a<=key.charCodeAt(0)&&z>=key.charCodeAt(0)&&"cssText"!==key&&"parentText"!==key&&(dict[key]=!0)}return dict}(),util.hasCssProperty=function(name){return name in util._cssPropertyDict},util.vendorPrefix=function(){var styles=window.getComputedStyle(document.documentElement,""),pre=(Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/)||""===styles.OLink&&["","o"])[1];return pre}(),util.forceLayoutAtOnce=function(elements,callback){this.batchImmediate(function(){elements.forEach(function(element){element.offsetHeight}),callback()})},util.batchImmediate=function(){var callbacks=[];return function(callback){0===callbacks.length&&setImmediate(function(){var concreateCallbacks=callbacks.slice(0);callbacks=[],concreateCallbacks.forEach(function(callback){callback()})}),callbacks.push(callback)}}(),util.batchAnimationFrame=function(){var callbacks=[],raf=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){setTimeout(callback,1e3/60)};return function(callback){0===callbacks.length&&raf(function(){var concreateCallbacks=callbacks.slice(0);callbacks=[],concreateCallbacks.forEach(function(callback){callback()})}),callbacks.push(callback)}}(),util.transitionPropertyName=function(){if(util.hasCssProperty("transitionDuration"))return"transition";if(util.hasCssProperty(util.vendorPrefix+"TransitionDuration"))return util.vendorPrefix+"Transition";throw new Error("Invalid state")}();var Animit=function(element){if(!(this instanceof Animit))return new Animit(element);if(element instanceof HTMLElement)this.elements=[element];else{if("[object Array]"!==Object.prototype.toString.call(element))throw new Error("First argument must be an array or an instance of HTMLElement.");this.elements=element}this.transitionQueue=[],this.lastStyleAttributeDict=[]};return Animit.prototype={transitionQueue:void 0,elements:void 0,play:function(callback){return"function"==typeof callback&&this.transitionQueue.push(function(done){callback(),done()}),this.startAnimation(),this},queue:function(transition,options){var queue=this.transitionQueue;if(transition&&options&&(options.css=transition,transition=new Animit.Transition(options)),transition instanceof Function||transition instanceof Animit.Transition||(transition=transition.css?new Animit.Transition(transition):new Animit.Transition({css:transition})),transition instanceof Function)queue.push(transition);else{if(!(transition instanceof Animit.Transition))throw new Error("Invalid arguments");queue.push(transition.build())}return this},wait:function(seconds){return seconds>0&&this.transitionQueue.push(function(done){setTimeout(done,1e3*seconds)}),this},saveStyle:function(){return this.transitionQueue.push(function(done){this.elements.forEach(function(element,index){for(var css=this.lastStyleAttributeDict[index]={},i=0;i<element.style.length;i++)css[element.style[i]]=element.style[element.style[i]]}.bind(this)),done()}.bind(this)),this},restoreStyle:function(options){function reset(){self.elements.forEach(function(element,index){element.style[transitionName]="none";var css=self.lastStyleAttributeDict[index];if(!css)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");self.lastStyleAttributeDict[index]=void 0;for(var i=0,name="";i<element.style.length;i++)name=element.style[i],"undefined"==typeof css[element.style[i]]&&(css[element.style[i]]="");Object.keys(css).forEach(function(key){element.style[key]=css[key]})})}options=options||{};var self=this;if(options.transition&&!options.duration)throw new Error('"options.duration" is required when "options.transition" is enabled.');var transitionName=util.transitionPropertyName;if(options.transition||options.duration&&options.duration>0){var transitionValue=options.transition||"all "+options.duration+"s "+(options.timing||"linear");this.transitionQueue.push(function(done){var timeoutId,elements=this.elements,clearTransition=function(){elements.forEach(function(element){element.style[transitionName]=""})},removeListeners=util.onceOnTransitionEnd(elements[0],function(){clearTimeout(timeoutId),clearTransition(),done()});timeoutId=setTimeout(function(){removeListeners(),clearTransition(),done()},1e3*options.duration*TIMEOUT_RATIO),elements.forEach(function(element,index){var css=self.lastStyleAttributeDict[index];if(!css)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");self.lastStyleAttributeDict[index]=void 0;for(var name,i=0,len=element.style.length;len>i;i++)name=element.style[i],void 0===css[name]&&(css[name]="");element.style[transitionName]=transitionValue,Object.keys(css).forEach(function(key){key!==transitionName&&(element.style[key]=css[key])}),element.style[transitionName]=transitionValue})})}else this.transitionQueue.push(function(done){reset(),done()});return this},startAnimation:function(){return this._dequeueTransition(),this},_dequeueTransition:function(){var transition=this.transitionQueue.shift();if(this._currentTransition)throw new Error("Current transition exists.");this._currentTransition=transition;var self=this,called=!1,done=function(){if(called)throw new Error("Invalid state: This callback is called twice.");called=!0,self._currentTransition=void 0,self._dequeueTransition()};transition&&transition.call(this,done)}},Animit.runAll=function(){for(var i=0;i<arguments.length;i++)arguments[i].play()},Animit.Transition=function(options){this.options=options||{},this.options.duration=this.options.duration||0,this.options.timing=this.options.timing||"linear",this.options.css=this.options.css||{},this.options.property=this.options.property||"all"},Animit.Transition.prototype={build:function(){function createActualCssProps(css){var result={};return Object.keys(css).forEach(function(name){var value=css[name];if(util.hasCssProperty(name))return void(result[name]=value);var prefixed=util.vendorPrefix+util.capitalize(name);util.hasCssProperty(prefixed)?result[prefixed]=value:(result[prefixed]=value,result[name]=value)}),result}if(0===Object.keys(this.options.css).length)throw new Error("options.css is required.");var css=createActualCssProps(this.options.css);if(this.options.duration>0){var transitionValue=util.buildTransitionValue(this.options),self=this;return function(callback){var timeoutId,elements=this.elements,timeout=1e3*self.options.duration*TIMEOUT_RATIO,removeListeners=util.onceOnTransitionEnd(elements[0],function(){clearTimeout(timeoutId),callback()});timeoutId=setTimeout(function(){removeListeners(),callback()},timeout),elements.forEach(function(element){element.style[util.transitionPropertyName]=transitionValue,Object.keys(css).forEach(function(name){element.style[name]=css[name]})})}}return this.options.duration<=0?function(callback){var elements=this.elements;elements.forEach(function(element){element.style[util.transitionPropertyName]="",Object.keys(css).forEach(function(name){element.style[name]=css[name]})}),elements.length>0?util.forceLayoutAtOnce(elements,function(){util.batchAnimationFrame(callback)}):util.batchAnimationFrame(callback)}:void 0}},Animit}(),function(){"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}(),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))?!function(){"use strict";var testElement=document.createElement("_");if(testElement.classList.add("c1","c2"),!testElement.classList.contains("c2")){var createMethod=function(method){var original=DOMTokenList.prototype[method];DOMTokenList.prototype[method]=function(token){var i,len=arguments.length;for(i=0;len>i;i++)token=arguments[i],original.call(this,token)}};createMethod("add"),createMethod("remove")}if(testElement.classList.toggle("c3",!1),testElement.classList.contains("c3")){var _toggle=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(token,force){return 1 in arguments&&!this.contains(token)==!force?force:_toggle.call(this,token)}}testElement=null}():!function(view){"use strict";if("Element"in view){var classListProp="classList",protoProp="prototype",elemCtrProto=view.Element[protoProp],objCtr=Object,strTrim=String[protoProp].trim||function(){return this.replace(/^\s+|\s+$/g,"")},arrIndexOf=Array[protoProp].indexOf||function(item){for(var i=0,len=this.length;len>i;i++)if(i in this&&this[i]===item)return i;return-1},DOMEx=function(type,message){this.name=type,this.code=DOMException[type],this.message=message},checkTokenAndGetIndex=function(classList,token){if(""===token)throw new DOMEx("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(token))throw new DOMEx("INVALID_CHARACTER_ERR","String contains an invalid character");return arrIndexOf.call(classList,token)},ClassList=function(elem){for(var trimmedClasses=strTrim.call(elem.getAttribute("class")||""),classes=trimmedClasses?trimmedClasses.split(/\s+/):[],i=0,len=classes.length;len>i;i++)this.push(classes[i]);this._updateClassName=function(){elem.setAttribute("class",this.toString())}},classListProto=ClassList[protoProp]=[],classListGetter=function(){return new ClassList(this)};if(DOMEx[protoProp]=Error[protoProp],classListProto.item=function(i){return this[i]||null},classListProto.contains=function(token){return token+="",-1!==checkTokenAndGetIndex(this,token)},classListProto.add=function(){var token,tokens=arguments,i=0,l=tokens.length,updated=!1;do token=tokens[i]+"",-1===checkTokenAndGetIndex(this,token)&&(this.push(token),updated=!0);while(++i<l);updated&&this._updateClassName()},classListProto.remove=function(){var token,index,tokens=arguments,i=0,l=tokens.length,updated=!1;do for(token=tokens[i]+"",index=checkTokenAndGetIndex(this,token);-1!==index;)this.splice(index,1),updated=!0,index=checkTokenAndGetIndex(this,token);while(++i<l);updated&&this._updateClassName()},classListProto.toggle=function(token,force){token+="";var result=this.contains(token),method=result?force!==!0&&"remove":force!==!1&&"add";return method&&this[method](token),force===!0||force===!1?force:!result},classListProto.toString=function(){return this.join(" ")},objCtr.defineProperty){var classListPropDesc={get:classListGetter,enumerable:!0,configurable:!0};try{objCtr.defineProperty(elemCtrProto,classListProp,classListPropDesc)}catch(ex){-2146823252===ex.number&&(classListPropDesc.enumerable=!1,objCtr.defineProperty(elemCtrProto,classListProp,classListPropDesc))}}else objCtr[protoProp].__defineGetter__&&elemCtrProto.__defineGetter__(classListProp,classListGetter)}}(self)),function(){"use strict";function FastClick(layer,options){function bind(method,context){return function(){return method.apply(context,arguments)}}var oldOnClick;if(options=options||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=options.touchBoundary||10,this.layer=layer,this.tapDelay=options.tapDelay||200,this.tapTimeout=options.tapTimeout||700,!FastClick.notNeeded(layer)){for(var methods=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],context=this,i=0,l=methods.length;l>i;i++)context[methods[i]]=bind(context[methods[i]],context);deviceIsAndroid&&(layer.addEventListener("mouseover",this.onMouse,!0),layer.addEventListener("mousedown",this.onMouse,!0),layer.addEventListener("mouseup",this.onMouse,!0)),layer.addEventListener("click",this.onClick,!0),layer.addEventListener("touchstart",this.onTouchStart,!1),layer.addEventListener("touchmove",this.onTouchMove,!1),layer.addEventListener("touchend",this.onTouchEnd,!1),layer.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(layer.removeEventListener=function(type,callback,capture){var rmv=Node.prototype.removeEventListener;"click"===type?rmv.call(layer,type,callback.hijacked||callback,capture):rmv.call(layer,type,callback,capture)},layer.addEventListener=function(type,callback,capture){var adv=Node.prototype.addEventListener;"click"===type?adv.call(layer,type,callback.hijacked||(callback.hijacked=function(event){event.propagationStopped||callback(event)}),capture):adv.call(layer,type,callback,capture)}),"function"==typeof layer.onclick&&(oldOnClick=layer.onclick,layer.addEventListener("click",function(event){oldOnClick(event)},!1),layer.onclick=null)}}var deviceIsWindowsPhone=navigator.userAgent.indexOf("Windows Phone")>=0,deviceIsAndroid=navigator.userAgent.indexOf("Android")>0&&!deviceIsWindowsPhone,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent)&&!deviceIsWindowsPhone,deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS [6-7]_\d/.test(navigator.userAgent),deviceIsBlackBerry10=navigator.userAgent.indexOf("BB10")>0;FastClick.prototype.needsClick=function(target){switch(target.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(target.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===target.type||target.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(target.className)},FastClick.prototype.needsFocus=function(target){switch(target.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(target.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!target.disabled&&!target.readOnly;default:return/\bneedsfocus\b/.test(target.className)}},FastClick.prototype.sendClick=function(targetElement,event){var clickEvent,touch;document.activeElement&&document.activeElement!==targetElement&&document.activeElement.blur(),touch=event.changedTouches[0],clickEvent=document.createEvent("MouseEvents"),clickEvent.initMouseEvent(this.determineEventType(targetElement),!0,!0,window,1,touch.screenX,touch.screenY,touch.clientX,touch.clientY,!1,!1,!1,!1,0,null),clickEvent.forwardedTouchEvent=!0,targetElement.dispatchEvent(clickEvent)},FastClick.prototype.determineEventType=function(targetElement){return deviceIsAndroid&&"select"===targetElement.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(targetElement){var length;deviceIsIOS&&targetElement.setSelectionRange&&0!==targetElement.type.indexOf("date")&&"time"!==targetElement.type&&"month"!==targetElement.type?(length=targetElement.value.length,targetElement.setSelectionRange(length,length)):targetElement.focus()},FastClick.prototype.updateScrollParent=function(targetElement){var scrollParent,parentElement;if(scrollParent=targetElement.fastClickScrollParent,!scrollParent||!scrollParent.contains(targetElement)){parentElement=targetElement;do{if(parentElement.scrollHeight>parentElement.offsetHeight){scrollParent=parentElement,targetElement.fastClickScrollParent=parentElement;break}parentElement=parentElement.parentElement}while(parentElement)}scrollParent&&(scrollParent.fastClickLastScrollTop=scrollParent.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(eventTarget){return eventTarget.nodeType===Node.TEXT_NODE?eventTarget.parentNode:eventTarget},FastClick.prototype.onTouchStart=function(event){var targetElement,touch,selection;if(event.targetTouches.length>1)return!0;if(targetElement=this.getTargetElementFromEventTarget(event.target),touch=event.targetTouches[0],deviceIsIOS){if(selection=window.getSelection(),selection.rangeCount&&!selection.isCollapsed)return!0;if(!deviceIsIOS4){if(touch.identifier&&touch.identifier===this.lastTouchIdentifier)return event.preventDefault(),!1;this.lastTouchIdentifier=touch.identifier,this.updateScrollParent(targetElement)}}return this.trackingClick=!0,this.trackingClickStart=event.timeStamp,this.targetElement=targetElement,this.touchStartX=touch.pageX,this.touchStartY=touch.pageY,event.timeStamp-this.lastClickTime<this.tapDelay&&event.timeStamp-this.lastClickTime>-1&&event.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(event){var touch=event.changedTouches[0],boundary=this.touchBoundary;return Math.abs(touch.pageX-this.touchStartX)>boundary||Math.abs(touch.pageY-this.touchStartY)>boundary},FastClick.prototype.onTouchMove=function(event){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(event.target)||this.touchHasMoved(event))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(labelElement){return void 0!==labelElement.control?labelElement.control:labelElement.htmlFor?document.getElementById(labelElement.htmlFor):labelElement.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(event){var forElement,trackingClickStart,targetTagName,scrollParent,touch,targetElement=this.targetElement;if(!this.trackingClick)return!0;if(event.timeStamp-this.lastClickTime<this.tapDelay&&event.timeStamp-this.lastClickTime>-1)return this.cancelNextClick=!0,!0;if(event.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=event.timeStamp,trackingClickStart=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,deviceIsIOSWithBadTarget&&(touch=event.changedTouches[0],targetElement=document.elementFromPoint(touch.pageX-window.pageXOffset,touch.pageY-window.pageYOffset)||targetElement,targetElement.fastClickScrollParent=this.targetElement.fastClickScrollParent),targetTagName=targetElement.tagName.toLowerCase(),"label"===targetTagName){if(forElement=this.findControl(targetElement)){if(this.focus(targetElement),deviceIsAndroid)return!1;targetElement=forElement}}else if(this.needsFocus(targetElement))return event.timeStamp-trackingClickStart>100||deviceIsIOS&&window.top!==window&&"input"===targetTagName?(this.targetElement=null,!1):(this.focus(targetElement),this.sendClick(targetElement,event),deviceIsIOS&&"select"===targetTagName||(this.targetElement=null,event.preventDefault()),!1);return deviceIsIOS&&!deviceIsIOS4&&(scrollParent=targetElement.fastClickScrollParent,scrollParent&&scrollParent.fastClickLastScrollTop!==scrollParent.scrollTop)?!0:(this.needsClick(targetElement)||(event.preventDefault(),this.sendClick(targetElement,event)),!1)},FastClick.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(event){return this.targetElement?event.forwardedTouchEvent?!0:event.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(event.stopImmediatePropagation?event.stopImmediatePropagation():event.propagationStopped=!0,event.stopPropagation(),event.preventDefault(),!1):!0:!0},FastClick.prototype.onClick=function(event){var permitted;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===event.target.type&&0===event.detail?!0:(permitted=this.onMouse(event),permitted||(this.targetElement=null),permitted)},FastClick.prototype.destroy=function(){var layer=this.layer;deviceIsAndroid&&(layer.removeEventListener("mouseover",this.onMouse,!0),layer.removeEventListener("mousedown",this.onMouse,!0),layer.removeEventListener("mouseup",this.onMouse,!0)),layer.removeEventListener("click",this.onClick,!0),layer.removeEventListener("touchstart",this.onTouchStart,!1),layer.removeEventListener("touchmove",this.onTouchMove,!1),layer.removeEventListener("touchend",this.onTouchEnd,!1),layer.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(layer){var metaViewport,chromeVersion,blackberryVersion,firefoxVersion;if("undefined"==typeof window.ontouchstart)return!0;if(chromeVersion=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(metaViewport=document.querySelector("meta[name=viewport]")){if(-1!==metaViewport.content.indexOf("user-scalable=no"))return!0;if(chromeVersion>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(deviceIsBlackBerry10&&(blackberryVersion=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),blackberryVersion[1]>=10&&blackberryVersion[2]>=3&&(metaViewport=document.querySelector("meta[name=viewport]")))){if(-1!==metaViewport.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===layer.style.msTouchAction||"manipulation"===layer.style.touchAction?!0:(firefoxVersion=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],firefoxVersion>=27&&(metaViewport=document.querySelector("meta[name=viewport]"),metaViewport&&(-1!==metaViewport.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===layer.style.touchAction||"manipulation"===layer.style.touchAction)},FastClick.attach=function(layer,options){return new FastClick(layer,options)},window.FastClick=FastClick}();var MicroEvent=function(){};MicroEvent.prototype={on:function(event,fct){this._events=this._events||{},this._events[event]=this._events[event]||[],this._events[event].push(fct)},once:function(event,fct){var self=this,wrapper=function(){return self.off(event,wrapper),fct.apply(null,arguments)};this.on(event,wrapper)},off:function(event,fct){this._events=this._events||{},event in this._events!=!1&&this._events[event].splice(this._events[event].indexOf(fct),1)},emit:function(event){if(this._events=this._events||{},event in this._events!=!1)for(var i=0;i<this._events[event].length;i++)this._events[event][i].apply(this,Array.prototype.slice.call(arguments,1))}},MicroEvent.mixin=function(destObject){for(var props=["on","once","off","emit"],i=0;i<props.length;i++)"function"==typeof destObject?destObject.prototype[props[i]]=MicroEvent.prototype[props[i]]:destObject[props[i]]=MicroEvent.prototype[props[i]]},"undefined"!=typeof module&&"exports"in module&&(module.exports=MicroEvent),window.MicroEvent=MicroEvent,!function n(t,e,r){function o(u,f){if(!e[u]){if(!t[u]){var c="function"==typeof require&&require;if(!f&&c)return c(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var l=e[u]={exports:{}};t[u][0].call(l.exports,function(n){var e=t[u][1][n];return o(e?e:n)},l,l.exports,n,t,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,t,e){"use strict";function r(){}function o(n){try{return n.then}catch(t){return d=t,w}}function i(n,t){try{return n(t)}catch(e){return d=e,w}}function u(n,t,e){try{n(t,e)}catch(r){return d=r,w}}function f(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._37=0,this._12=null,this._59=[],n!==r&&v(n,this)}function c(n,t,e){return new n.constructor(function(o,i){var u=new f(r);u.then(o,i),s(n,new p(t,e,u))})}function s(n,t){for(;3===n._37;)n=n._12;return 0===n._37?void n._59.push(t):void y(function(){var e=1===n._37?t.onFulfilled:t.onRejected;if(null===e)return void(1===n._37?l(t.promise,n._12):a(t.promise,n._12));var r=i(e,n._12);r===w?a(t.promise,d):l(t.promise,r)})}function l(n,t){if(t===n)return a(n,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var e=o(t);if(e===w)return a(n,d);if(e===n.then&&t instanceof f)return n._37=3,n._12=t,void h(n);if("function"==typeof e)return void v(e.bind(t),n)}n._37=1,n._12=t,h(n)}function a(n,t){n._37=2,n._12=t,h(n)}function h(n){for(var t=0;t<n._59.length;t++)s(n,n._59[t]);n._59=null}function p(n,t,e){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=e}function v(n,t){var e=!1,r=u(n,function(n){e||(e=!0,l(t,n))},function(n){e||(e=!0,a(t,n))});e||r!==w||(e=!0,a(t,d))}var y=n("asap/raw"),d=null,w={};t.exports=f,f._99=r,f.prototype.then=function(n,t){if(this.constructor!==f)return c(this,n,t);var e=new f(r);return s(this,new p(n,t,e)),e}},{"asap/raw":4}],2:[function(n,t,e){"use strict";function r(n){var t=new o(o._99);return t._37=1,t._12=n,t}var o=n("./core.js");t.exports=o;var i=r(!0),u=r(!1),f=r(null),c=r(void 0),s=r(0),l=r("");o.resolve=function(n){if(n instanceof o)return n;if(null===n)return f;if(void 0===n)return c;if(n===!0)return i;if(n===!1)return u;if(0===n)return s;if(""===n)return l;if("object"==typeof n||"function"==typeof n)try{var t=n.then;if("function"==typeof t)return new o(t.bind(n))}catch(e){return new o(function(n,t){t(e)})}return r(n)},o.all=function(n){var t=Array.prototype.slice.call(n);return new o(function(n,e){function r(u,f){if(f&&("object"==typeof f||"function"==typeof f)){if(f instanceof o&&f.then===o.prototype.then){for(;3===f._37;)f=f._12;return 1===f._37?r(u,f._12):(2===f._37&&e(f._12),void f.then(function(n){r(u,n)},e))}var c=f.then;if("function"==typeof c){var s=new o(c.bind(f));return void s.then(function(n){r(u,n)},e)}}t[u]=f,0===--i&&n(t)}if(0===t.length)return n([]);for(var i=t.length,u=0;u<t.length;u++)r(u,t[u])})},o.reject=function(n){return new o(function(t,e){e(n)})},o.race=function(n){return new o(function(t,e){n.forEach(function(n){o.resolve(n).then(t,e)})})},o.prototype["catch"]=function(n){return this.then(null,n)}},{"./core.js":1}],3:[function(n,t,e){"use strict";function r(){if(c.length)throw c.shift()}function o(n){var t;t=f.length?f.pop():new i,t.task=n,u(t)}function i(){this.task=null}var u=n("./raw"),f=[],c=[],s=u.makeRequestCallFromTimer(r);t.exports=o,i.prototype.call=function(){try{this.task.call()}catch(n){o.onerror?o.onerror(n):(c.push(n),s())}finally{this.task=null,f[f.length]=this}}},{"./raw":4}],4:[function(n,t,e){(function(n){"use strict";function e(n){f.length||(u(),c=!0),f[f.length]=n}function r(){for(;s<f.length;){var n=s;if(s+=1,f[n].call(),s>l){for(var t=0,e=f.length-s;e>t;t++)f[t]=f[t+s];f.length-=s,s=0}}f.length=0,s=0,c=!1}function o(n){var t=1,e=new a(n),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function i(n){return function(){function t(){clearTimeout(e),clearInterval(r),n()}var e=setTimeout(t,0),r=setInterval(t,50)}}t.exports=e;var u,f=[],c=!1,s=0,l=1024,a=n.MutationObserver||n.WebKitMutationObserver;u="function"==typeof a?o(r):i(r),e.requestFlush=u,e.makeRequestCallFromTimer=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(n,t,e){"function"!=typeof Promise.prototype.done&&(Promise.prototype.done=function(n,t){var e=arguments.length?this.then.apply(this,arguments):this;e.then(null,function(n){setTimeout(function(){throw n},0)})})},{}],6:[function(n,t,e){n("asap"),"undefined"==typeof Promise&&(Promise=n("./lib/core.js"),n("./lib/es6-extensions.js")),n("./polyfill-done.js")},{"./lib/core.js":1,"./lib/es6-extensions.js":2,"./polyfill-done.js":5,asap:3}]},{},[6]),function(global,undefined){"use strict";function addFromSetImmediateArguments(args){return tasksByHandle[nextHandle]=partiallyApplied.apply(undefined,args),nextHandle++}function partiallyApplied(handler){var args=[].slice.call(arguments,1);return function(){"function"==typeof handler?handler.apply(undefined,args):new Function(""+handler)()}}function runIfPresent(handle){if(currentlyRunningATask)setTimeout(partiallyApplied(runIfPresent,handle),0);else{var task=tasksByHandle[handle];if(task){currentlyRunningATask=!0;try{task()}finally{clearImmediate(handle),currentlyRunningATask=!1}}}}function clearImmediate(handle){delete tasksByHandle[handle]}function installNextTickImplementation(){setImmediate=function(){var handle=addFromSetImmediateArguments(arguments);return process.nextTick(partiallyApplied(runIfPresent,handle)),handle}}function canUsePostMessage(){if(global.postMessage&&!global.importScripts){var postMessageIsAsynchronous=!0,oldOnMessage=global.onmessage;return global.onmessage=function(){postMessageIsAsynchronous=!1},global.postMessage("","*"),global.onmessage=oldOnMessage,postMessageIsAsynchronous}}function installPostMessageImplementation(){var messagePrefix="setImmediate$"+Math.random()+"$",onGlobalMessage=function(event){event.source===global&&"string"==typeof event.data&&0===event.data.indexOf(messagePrefix)&&runIfPresent(+event.data.slice(messagePrefix.length))};global.addEventListener?global.addEventListener("message",onGlobalMessage,!1):global.attachEvent("onmessage",onGlobalMessage),setImmediate=function(){var handle=addFromSetImmediateArguments(arguments);return global.postMessage(messagePrefix+handle,"*"),handle}}function installMessageChannelImplementation(){var channel=new MessageChannel;channel.port1.onmessage=function(event){var handle=event.data;runIfPresent(handle)},setImmediate=function(){var handle=addFromSetImmediateArguments(arguments);return channel.port2.postMessage(handle),handle}}function installReadyStateChangeImplementation(){var html=doc.documentElement;setImmediate=function(){var handle=addFromSetImmediateArguments(arguments),script=doc.createElement("script");return script.onreadystatechange=function(){runIfPresent(handle),script.onreadystatechange=null,html.removeChild(script),script=null},html.appendChild(script),handle}}function installSetTimeoutImplementation(){setImmediate=function(){var handle=addFromSetImmediateArguments(arguments);return setTimeout(partiallyApplied(runIfPresent,handle),0),handle}}if(!global.setImmediate){var setImmediate,nextHandle=1,tasksByHandle={},currentlyRunningATask=!1,doc=global.document,attachTo=Object.getPrototypeOf&&Object.getPrototypeOf(global);attachTo=attachTo&&attachTo.setTimeout?attachTo:global,"[object process]"==={}.toString.call(global.process)?installNextTickImplementation():canUsePostMessage()?installPostMessageImplementation():global.MessageChannel?installMessageChannelImplementation():doc&&"onreadystatechange"in doc.createElement("script")?installReadyStateChangeImplementation():installSetTimeoutImplementation(),attachTo.setImmediate=setImmediate,attachTo.clearImmediate=clearImmediate}}(function(){return this}()),function(){function Viewport(){return this.PRE_IOS7_VIEWPORT="initial-scale=1, maximum-scale=1, user-scalable=no",this.IOS7_VIEWPORT="initial-scale=1, maximum-scale=1, user-scalable=no",this.DEFAULT_VIEWPORT="initial-scale=1, maximum-scale=1, user-scalable=no",this.ensureViewportElement(),this.platform={},this.platform.name=this.getPlatformName(),this.platform.version=this.getPlatformVersion(),this}Viewport.prototype.ensureViewportElement=function(){
this.viewportElement=document.querySelector("meta[name=viewport]"),this.viewportElement||(this.viewportElement=document.createElement("meta"),this.viewportElement.name="viewport",document.head.appendChild(this.viewportElement))},Viewport.prototype.setup=function(){function isWebView(){return!!(window.cordova||window.phonegap||window.PhoneGap)}this.viewportElement&&"true"!=this.viewportElement.getAttribute("data-no-adjust")&&(this.viewportElement.getAttribute("content")||("ios"==this.platform.name?this.platform.version>=7&&isWebView()?this.viewportElement.setAttribute("content",this.IOS7_VIEWPORT):this.viewportElement.setAttribute("content",this.PRE_IOS7_VIEWPORT):this.viewportElement.setAttribute("content",this.DEFAULT_VIEWPORT)))},Viewport.prototype.getPlatformName=function(){return navigator.userAgent.match(/Android/i)?"android":navigator.userAgent.match(/iPhone|iPad|iPod/i)?"ios":void 0},Viewport.prototype.getPlatformVersion=function(){var start=window.navigator.userAgent.indexOf("OS ");return window.Number(window.navigator.userAgent.substr(start+3,3).replace("_","."))},window.Viewport=Viewport}(),function(){function getAttributes(element){return Node_get_attributes.call(element)}function setAttribute(element,attribute,value){try{Element_setAttribute.call(element,attribute,value)}catch(e){}}function removeAttribute(element,attribute){Element_removeAttribute.call(element,attribute)}function childNodes(element){return Node_get_childNodes.call(element)}function empty(element){for(;element.childNodes.length;)element.removeChild(element.lastChild)}function insertAdjacentHTML(element,position,html){HTMLElement_insertAdjacentHTMLPropertyDescriptor.value.call(element,position,html)}function inUnsafeMode(){var isUnsafe=!0;try{detectionDiv.innerHTML="<test/>"}catch(ex){isUnsafe=!1}return isUnsafe}function cleanse(html,targetElement){function cleanseAttributes(element){var attributes=getAttributes(element);if(attributes&&attributes.length){for(var events,i=0,len=attributes.length;len>i;i++){var attribute=attributes[i],name=attribute.name;"o"!==name[0]&&"O"!==name[0]||"n"!==name[1]&&"N"!==name[1]||(events=events||[],events.push({name:attribute.name,value:attribute.value}))}if(events)for(var i=0,len=events.length;len>i;i++){var attribute=events[i];removeAttribute(element,attribute.name),setAttribute(element,"x-"+attribute.name,attribute.value)}}for(var children=childNodes(element),i=0,len=children.length;len>i;i++)cleanseAttributes(children[i])}var cleaner=document.implementation.createHTMLDocument("cleaner");empty(cleaner.documentElement),MSApp.execUnsafeLocalFunction(function(){insertAdjacentHTML(cleaner.documentElement,"afterbegin",html)});var scripts=cleaner.documentElement.querySelectorAll("script");Array.prototype.forEach.call(scripts,function(script){switch(script.type.toLowerCase()){case"":script.type="text/inert";break;case"text/javascript":case"text/ecmascript":case"text/x-javascript":case"text/jscript":case"text/livescript":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":script.type="text/inert-"+script.type.slice("text/".length);break;case"application/javascript":case"application/ecmascript":case"application/x-javascript":script.type="application/inert-"+script.type.slice("application/".length)}}),cleanseAttributes(cleaner.documentElement);var cleanedNodes=[];return"HTML"===targetElement.tagName?cleanedNodes=Array.prototype.slice.call(document.adoptNode(cleaner.documentElement).childNodes):(cleaner.head&&(cleanedNodes=cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.head).childNodes))),cleaner.body&&(cleanedNodes=cleanedNodes.concat(Array.prototype.slice.call(document.adoptNode(cleaner.body).childNodes)))),cleanedNodes}function cleansePropertySetter(property,setter){var propertyDescriptor=Object.getOwnPropertyDescriptor(HTMLElement.prototype,property),originalSetter=propertyDescriptor.set;Object.defineProperty(HTMLElement.prototype,property,{get:propertyDescriptor.get,set:function(value){if(window.WinJS&&window.WinJS._execUnsafe&&inUnsafeMode())originalSetter.call(this,value);else{var that=this,nodes=cleanse(value,that);MSApp.execUnsafeLocalFunction(function(){setter(propertyDescriptor,that,nodes)})}},enumerable:propertyDescriptor.enumerable,configurable:propertyDescriptor.configurable})}if(window.MSApp&&MSApp.execUnsafeLocalFunction){var Element_setAttribute=Object.getOwnPropertyDescriptor(Element.prototype,"setAttribute").value,Element_removeAttribute=Object.getOwnPropertyDescriptor(Element.prototype,"removeAttribute").value,HTMLElement_insertAdjacentHTMLPropertyDescriptor=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"insertAdjacentHTML"),Node_get_attributes=Object.getOwnPropertyDescriptor(Node.prototype,"attributes").get,Node_get_childNodes=Object.getOwnPropertyDescriptor(Node.prototype,"childNodes").get,detectionDiv=document.createElement("div");cleansePropertySetter("innerHTML",function(propertyDescriptor,target,elements){empty(target);for(var i=0,len=elements.length;len>i;i++)target.appendChild(elements[i])}),cleansePropertySetter("outerHTML",function(propertyDescriptor,target,elements){for(var i=0,len=elements.length;len>i;i++)target.insertAdjacentElement("afterend",elements[i]);target.parentNode.removeChild(target)})}}(),function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):global.ons=factory()}(this,function(){"use strict";function setup(){GestureDetector.READY||(Event$1.determineEventTypes(),Utils.each(GestureDetector.gestures,function(gesture){Detection.register(gesture)}),Event$1.onTouch(GestureDetector.DOCUMENT,EVENT_MOVE,Detection.detect),Event$1.onTouch(GestureDetector.DOCUMENT,EVENT_END,Detection.detect),GestureDetector.READY=!0)}function isContentReady(element){return element.childNodes.length>0&&setContentReady(element),readyMap.has(element)}function setContentReady(element){readyMap.set(element,!0)}function addCallback(element,fn){queueMap.has(element)||queueMap.set(element,[]),queueMap.get(element).push(fn)}function consumeQueue(element){var callbacks=queueMap.get(element,[])||[];queueMap["delete"](element),callbacks.forEach(function(callback){return callback()})}function contentReady(element,fn){if(addCallback(element,fn),isContentReady(element))return void consumeQueue(element);var observer=new MutationObserver(function(changes){setContentReady(element),consumeQueue(element)});observer.observe(element,{childList:!0,characterData:!0}),setImmediate(function(){setContentReady(element),consumeQueue(element)})}function waitDeviceReady(){var unlockDeviceReady=ons$1._readyLock.lock();window.addEventListener("WebComponentsReady",function(){ons$1.isWebView()?window.document.addEventListener("deviceready",unlockDeviceReady,!1):unlockDeviceReady()},!1)}function getElementClass(){if("function"!=typeof HTMLElement){var _BaseElement=function(){};return _BaseElement.prototype=document.createElement("div"),_BaseElement}return HTMLElement}var babelHelpers={};babelHelpers["typeof"]=function(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj},babelHelpers.classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")},babelHelpers.createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),babelHelpers.inherits=function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)},babelHelpers.possibleConstructorReturn=function(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call};var unwrap=function(string){return string.slice(1,-1)},isObjectString=function(string){return string.startsWith("{")&&string.endsWith("}")},isArrayString=function(string){return string.startsWith("[")&&string.endsWith("]")},isQuotedString=function(string){return string.startsWith("'")&&string.endsWith("'")||string.startsWith('"')&&string.endsWith('"')},error=function(token,string,originalString){throw new Error("Unexpected token '"+token+"' at position "+(originalString.length-string.length-1)+" in string: '"+originalString+"'")},processToken=function(token,string,originalString){return"true"===token||"false"===token?"true"===token:isQuotedString(token)?unwrap(token):isNaN(token)?isObjectString(token)?parseObject(unwrap(token)):isArrayString(token)?parseArray(unwrap(token)):void error(token,string,originalString):+token},nextToken=function(string){string=string.trimLeft();var limit=string.length;if(":"===string[0]||","===string[0])limit=1;else if("{"===string[0]||"["===string[0]){for(var c=string.charCodeAt(0),nestedObject=1,i=1;i<string.length;i++)if(string.charCodeAt(i)===c)nestedObject++;else if(string.charCodeAt(i)===c+2&&(nestedObject--,0===nestedObject)){limit=i+1;break}}else if("'"===string[0]||'"'===string[0]){for(var i=1;i<string.length;i++)if(string[i]===string[0]){limit=i+1;break}}else for(var i=1;i<string.length;i++)if(-1!==[" ",",",":"].indexOf(string[i])){limit=i;break}return string.slice(0,limit)},parseObject=function(string){var isValidKey=function(key){return/^[A-Z_\$][A-Z0-9_\$]*$/i.test(key)};string=string.trim();for(var originalString=string,object={},readingKey=!0,key=void 0,previousToken=void 0,token=void 0;string.length>0;)if(previousToken=token,token=nextToken(string),string=string.slice(token.length,string.length).trimLeft(),":"===token&&(!readingKey||!previousToken||","===previousToken)||","===token&&readingKey||":"!==token&&","!==token&&previousToken&&","!==previousToken&&":"!==previousToken)error(token,string,originalString);else if(":"===token&&readingKey&&previousToken){if(!isValidKey(previousToken))throw new Error("Invalid key token '"+previousToken+"' at position 0 in string: '"+originalString+"'");key=previousToken,readingKey=!1}else","===token&&!readingKey&&previousToken&&(object[key]=processToken(previousToken,string,originalString),readingKey=!0);return token&&(object[key]=processToken(token,string,originalString)),object},parseArray=function(string){string=string.trim();for(var originalString=string,array=[],previousToken=void 0,token=void 0;string.length>0;)previousToken=token,token=nextToken(string),string=string.slice(token.length,string.length).trimLeft(),","!==token||previousToken&&","!==previousToken?","===token&&array.push(processToken(previousToken,string,originalString)):error(token,string,originalString);return token&&(","!==token?array.push(processToken(token,string,originalString)):error(token,string,originalString)),array},parse=function(string){if(string=string.trim(),isObjectString(string))return parseObject(unwrap(string));if(isArrayString(string))return parseArray(unwrap(string));throw new Error("Provided string must be object or array like: "+string)},util={};util.prepareQuery=function(query){return query instanceof Function?query:function(element){return util.match(element,query)}},util.match=function(element,query){return"."===query[0]?element.classList.contains(query.slice(1)):element.nodeName.toLowerCase()===query},util.findChild=function(element,query){for(var match=util.prepareQuery(query),i=0;i<element.children.length;i++){var node=element.children[i];if(match(node))return node}return null},util.findParent=function(element,query){for(var match=util.prepareQuery(query),parent=element.parentNode;;){if(!parent||parent===document)return null;if(match(parent))return parent;parent=parent.parentNode}},util.isAttached=function(element){for(;document.documentElement!==element;){if(!element)return!1;element=element.parentNode}return!0},util.hasAnyComponentAsParent=function(element){for(;element&&document.documentElement!==element;)if(element=element.parentNode,element&&element.nodeName.toLowerCase().match(/(ons-navigator|ons-tabbar|ons-sliding-menu|ons-split-view)/))return!0;return!1},util.propagateAction=function(element,action){for(var i=0;i<element.childNodes.length;i++){var child=element.childNodes[i];child[action]instanceof Function?child[action]():util.propagateAction(child,action)}},util.create=function(){var selector=arguments.length<=0||void 0===arguments[0]?"":arguments[0],style=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],classList=selector.split("."),element=document.createElement(classList.shift()||"div");return classList.length&&(element.className=classList.join(" ")),util.extend(element.style,style),element},util.createElement=function(html){var wrapper=document.createElement("div");if(wrapper.innerHTML=html,wrapper.children.length>1)throw new Error('"html" must be one wrapper element.');return wrapper.children[0]},util.createFragment=function(html){var wrapper=document.createElement("div");wrapper.innerHTML=html;for(var fragment=document.createDocumentFragment();wrapper.firstChild;)fragment.appendChild(wrapper.firstChild);return fragment},util.extend=function(dst){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_len>_key;_key++)args[_key-1]=arguments[_key];for(var i=0;i<args.length;i++)if(args[i])for(var keys=Object.keys(args[i]),j=0;j<keys.length;j++){var key=keys[j];dst[key]=args[i][key]}return dst},util.arrayFrom=function(arrayLike){return Array.prototype.slice.apply(arrayLike)},util.parseJSONObjectSafely=function(jsonString){var failSafe=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];try{var result=JSON.parse(""+jsonString);if("object"===("undefined"==typeof result?"undefined":babelHelpers["typeof"](result))&&null!==result)return result}catch(e){return failSafe}return failSafe},util.findFromPath=function(path){path=path.split(".");for(var key,el=window;key=path.shift();)el=el[key];return el},util.triggerElementEvent=function(target,eventName){var detail=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],event=new CustomEvent(eventName,{bubbles:!0,cancelable:!0,detail:detail});return Object.keys(detail).forEach(function(key){event[key]=detail[key]}),target.dispatchEvent(event),event},util.hasModifier=function(target,modifierName){return target.hasAttribute("modifier")?target.getAttribute("modifier").split(/\s+/).some(function(e){return e===modifierName}):!1},util.addModifier=function(target,modifierName){if(util.hasModifier(target,modifierName))return!1;modifierName=modifierName.trim();var modifierAttribute=target.getAttribute("modifier")||"";return target.setAttribute("modifier",(modifierAttribute+" "+modifierName).trim()),!0},util.removeModifier=function(target,modifierName){if(!target.getAttribute("modifier"))return!1;var modifiers=target.getAttribute("modifier").split(/\s+/),newModifiers=modifiers.filter(function(item){return item&&item!==modifierName});return target.setAttribute("modifier",newModifiers.join(" ")),modifiers.length!==newModifiers.length},util.updateParentPosition=function(el){!el._parentUpdated&&el.parentElement&&("static"===window.getComputedStyle(el.parentElement).getPropertyValue("position")&&(el.parentElement.style.position="relative"),el._parentUpdated=!0)},util.toggleAttribute=function(element,name,enable){enable?element.setAttribute(name,""):element.removeAttribute(name)},util.bindListeners=function(element,listenerNames){listenerNames.forEach(function(name){var boundName=name.replace(/^_[a-z]/,"_bound"+name[1].toUpperCase());element[boundName]=element[boundName]||element[name].bind(element)})},util.each=function(obj,f){return Object.keys(obj).forEach(function(key){return f(key,obj[key])})};var safe=function(f){return function(){return f instanceof Function?f.apply(this,arguments):void 0}};util.safeCall=function(object,prop){for(var _len2=arguments.length,rest=Array(_len2>2?_len2-2:0),_key2=2;_len2>_key2;_key2++)rest[_key2-2]=arguments[_key2];return safe(object[prop]).apply(object,rest)},util.safeApply=function(object,prop,rest){return safe(object[prop]).apply(object,rest)};var isOfType=function isOfType(object,type){if(Array.isArray(type))return type.some(function(type){return isOfType(object,type)});if(null===object)return"null"===type;try{return object instanceof type}catch(e){return"string"==typeof type&&("undefined"==typeof object?"undefined":babelHelpers["typeof"](object))===type}},_printType=function _printType(type){return Array.isArray(type)?type.map(_printType).join(" or "):type instanceof Function&&"an instance of "+type||"null"===type&&"null"||"string"==typeof type&&"a "+type||JSON.stringify(type)},validated=util.validated=function(name,object,options){var type=options&&options.type||!options.object&&options;if(type&&!isOfType(object,type)&&!options.dynamicCall&&!options.safeCall)throw new Error(name+" must be "+_printType(type)+". You provided "+object);if(options&&options.object){var _ret=function(){name=name?name+".":"";var result={};return Object.keys(options.object).forEach(function(key){var dynamicCall=options.object[key].dynamicCall;dynamicCall&&(dynamicCall.object=dynamicCall.object||object,dynamicCall.key=dynamicCall.key||key),result[key]=validated(name+key,object[key],options.object[key])}),{v:result}}();if("object"===("undefined"==typeof _ret?"undefined":babelHelpers["typeof"](_ret)))return _ret.v}if(type===Function||"function"===type){var _ret2=function(){var _ref=options.dynamicCall||{},obj=_ref.object,key=_ref.key,context=options.context||obj,test=options.safeCall?safe:options.dynamicCall?function(f){return validated(name,f,Function)}:function(f){return f};return object=options.dynamicCall?function(){for(var _len3=arguments.length,rest=Array(_len3),_key3=0;_len3>_key3;_key3++)rest[_key3]=arguments[_key3];return test(obj[key]).apply(context,rest)}:test(object),options.returns?{v:function(){for(var _len4=arguments.length,rest=Array(_len4),_key4=0;_len4>_key4;_key4++)rest[_key4]=arguments[_key4];return validated(name+"'s result",object.apply(context,rest),options.returns)}}:void 0}();if("object"===("undefined"==typeof _ret2?"undefined":babelHelpers["typeof"](_ret2)))return _ret2.v}return object};util.updateRipple=function(target){var rippleElement=util.findChild(target,"ons-ripple");target.hasAttribute("ripple")?rippleElement||target.insertBefore(document.createElement("ons-ripple"),target.firstChild):rippleElement&&rippleElement.remove()},util.animationOptionsParse=parse,util.isInteger=function(value){return"number"==typeof value&&isFinite(value)&&Math.floor(value)===value};var Event$1,Utils,Detection,PointerEvent,GestureDetector=function GestureDetector(element,options){return new GestureDetector.Instance(element,options||{})};GestureDetector.defaults={behavior:{touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},GestureDetector.DOCUMENT=document,GestureDetector.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,GestureDetector.HAS_TOUCHEVENTS="ontouchstart"in window,GestureDetector.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),GestureDetector.NO_MOUSEEVENTS=GestureDetector.HAS_TOUCHEVENTS&&GestureDetector.IS_MOBILE||GestureDetector.HAS_POINTEREVENTS,GestureDetector.CALCULATE_INTERVAL=25;var EVENT_TYPES={},DIRECTION_DOWN=GestureDetector.DIRECTION_DOWN="down",DIRECTION_LEFT=GestureDetector.DIRECTION_LEFT="left",DIRECTION_UP=GestureDetector.DIRECTION_UP="up",DIRECTION_RIGHT=GestureDetector.DIRECTION_RIGHT="right",POINTER_MOUSE=GestureDetector.POINTER_MOUSE="mouse",POINTER_TOUCH=GestureDetector.POINTER_TOUCH="touch",POINTER_PEN=GestureDetector.POINTER_PEN="pen",EVENT_START=GestureDetector.EVENT_START="start",EVENT_MOVE=GestureDetector.EVENT_MOVE="move",EVENT_END=GestureDetector.EVENT_END="end",EVENT_RELEASE=GestureDetector.EVENT_RELEASE="release",EVENT_TOUCH=GestureDetector.EVENT_TOUCH="touch";GestureDetector.READY=!1,GestureDetector.plugins=GestureDetector.plugins||{},GestureDetector.gestures=GestureDetector.gestures||{},Utils=GestureDetector.utils={extend:function(dest,src,merge){for(var key in src)!src.hasOwnProperty(key)||void 0!==dest[key]&&merge||(dest[key]=src[key]);return dest},on:function(element,type,handler){element.addEventListener(type,handler,!1)},off:function(element,type,handler){element.removeEventListener(type,handler,!1)},each:function(obj,iterator,context){var i,len;if("forEach"in obj)obj.forEach(iterator,context);else if(void 0!==obj.length){for(i=0,len=obj.length;len>i;i++)if(iterator.call(context,obj[i],i,obj)===!1)return}else for(i in obj)if(obj.hasOwnProperty(i)&&iterator.call(context,obj[i],i,obj)===!1)return},inStr:function(src,find){return src.indexOf(find)>-1},inArray:function(src,find){if(src.indexOf){var index=src.indexOf(find);return-1===index?!1:index}for(var i=0,len=src.length;len>i;i++)if(src[i]===find)return i;return!1},toArray:function(obj){return Array.prototype.slice.call(obj,0)},hasParent:function(node,parent){for(;node;){if(node==parent)return!0;node=node.parentNode}return!1},getCenter:function(touches){var pageX=[],pageY=[],clientX=[],clientY=[],min=Math.min,max=Math.max;return 1===touches.length?{pageX:touches[0].pageX,pageY:touches[0].pageY,clientX:touches[0].clientX,clientY:touches[0].clientY}:(Utils.each(touches,function(touch){pageX.push(touch.pageX),pageY.push(touch.pageY),clientX.push(touch.clientX),clientY.push(touch.clientY)}),{pageX:(min.apply(Math,pageX)+max.apply(Math,pageX))/2,pageY:(min.apply(Math,pageY)+max.apply(Math,pageY))/2,clientX:(min.apply(Math,clientX)+max.apply(Math,clientX))/2,clientY:(min.apply(Math,clientY)+max.apply(Math,clientY))/2})},getVelocity:function(deltaTime,deltaX,deltaY){return{x:Math.abs(deltaX/deltaTime)||0,y:Math.abs(deltaY/deltaTime)||0}},getAngle:function(touch1,touch2){var x=touch2.clientX-touch1.clientX,y=touch2.clientY-touch1.clientY;return 180*Math.atan2(y,x)/Math.PI},getDirection:function(touch1,touch2){var x=Math.abs(touch1.clientX-touch2.clientX),y=Math.abs(touch1.clientY-touch2.clientY);return x>=y?touch1.clientX-touch2.clientX>0?DIRECTION_LEFT:DIRECTION_RIGHT:touch1.clientY-touch2.clientY>0?DIRECTION_UP:DIRECTION_DOWN},getDistance:function(touch1,touch2){var x=touch2.clientX-touch1.clientX,y=touch2.clientY-touch1.clientY;return Math.sqrt(x*x+y*y)},getScale:function(start,end){return start.length>=2&&end.length>=2?this.getDistance(end[0],end[1])/this.getDistance(start[0],start[1]):1},getRotation:function(start,end){return start.length>=2&&end.length>=2?this.getAngle(end[1],end[0])-this.getAngle(start[1],start[0]):0},isVertical:function(direction){return direction==DIRECTION_UP||direction==DIRECTION_DOWN},setPrefixedCss:function(element,prop,value,toggle){var prefixes=["","Webkit","Moz","O","ms"];prop=Utils.toCamelCase(prop);for(var i=0;i<prefixes.length;i++){var p=prop;if(prefixes[i]&&(p=prefixes[i]+p.slice(0,1).toUpperCase()+p.slice(1)),p in element.style){element.style[p]=(null===toggle||toggle)&&value||"";break}}},toggleBehavior:function(element,props,toggle){if(props&&element&&element.style){Utils.each(props,function(value,prop){Utils.setPrefixedCss(element,prop,value,toggle)});var falseFn=toggle&&function(){return!1};"none"==props.userSelect&&(element.onselectstart=falseFn),"none"==props.userDrag&&(element.ondragstart=falseFn)}},toCamelCase:function(str){return str.replace(/[_-]([a-z])/g,function(s){return s[1].toUpperCase()})}},Event$1=GestureDetector.event={preventMouseEvents:!1,started:!1,shouldDetect:!1,on:function(element,type,handler,hook){var types=type.split(" ");Utils.each(types,function(type){Utils.on(element,type,handler),hook&&hook(type)})},off:function(element,type,handler,hook){var types=type.split(" ");Utils.each(types,function(type){Utils.off(element,type,handler),hook&&hook(type)})},onTouch:function(element,eventType,handler){var self=this,onTouchHandler=function(ev){var triggerType,srcType=ev.type.toLowerCase(),isPointer=GestureDetector.HAS_POINTEREVENTS,isMouse=Utils.inStr(srcType,"mouse");isMouse&&self.preventMouseEvents||(isMouse&&eventType==EVENT_START&&0===ev.button?(self.preventMouseEvents=!1,self.shouldDetect=!0):isPointer&&eventType==EVENT_START?self.shouldDetect=1===ev.buttons||PointerEvent.matchType(POINTER_TOUCH,ev):isMouse||eventType!=EVENT_START||(self.preventMouseEvents=!0,self.shouldDetect=!0),isPointer&&eventType!=EVENT_END&&PointerEvent.updatePointer(eventType,ev),self.shouldDetect&&(triggerType=self.doDetect.call(self,ev,eventType,element,handler)),triggerType==EVENT_END&&(self.preventMouseEvents=!1,self.shouldDetect=!1,PointerEvent.reset()),isPointer&&eventType==EVENT_END&&PointerEvent.updatePointer(eventType,ev))};return this.on(element,EVENT_TYPES[eventType],onTouchHandler),onTouchHandler},doDetect:function(ev,eventType,element,handler){var touchList=this.getTouchList(ev,eventType),touchListLength=touchList.length,triggerType=eventType,triggerChange=touchList.trigger,changedLength=touchListLength;eventType==EVENT_START?triggerChange=EVENT_TOUCH:eventType==EVENT_END&&(triggerChange=EVENT_RELEASE,changedLength=touchList.length-(ev.changedTouches?ev.changedTouches.length:1)),changedLength>0&&this.started&&(triggerType=EVENT_MOVE),this.started=!0;var evData=this.collectEventData(element,triggerType,touchList,ev);return eventType!=EVENT_END&&handler.call(Detection,evData),triggerChange&&(evData.changedLength=changedLength,evData.eventType=triggerChange,handler.call(Detection,evData),evData.eventType=triggerType,delete evData.changedLength),triggerType==EVENT_END&&(handler.call(Detection,evData),this.started=!1),triggerType},determineEventTypes:function(){var types;return types=GestureDetector.HAS_POINTEREVENTS?window.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:GestureDetector.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],EVENT_TYPES[EVENT_START]=types[0],EVENT_TYPES[EVENT_MOVE]=types[1],EVENT_TYPES[EVENT_END]=types[2],EVENT_TYPES},getTouchList:function(ev,eventType){if(GestureDetector.HAS_POINTEREVENTS)return PointerEvent.getTouchList();if(ev.touches){if(eventType==EVENT_MOVE)return ev.touches;var identifiers=[],concat=[].concat(Utils.toArray(ev.touches),Utils.toArray(ev.changedTouches)),touchList=[];return Utils.each(concat,function(touch){Utils.inArray(identifiers,touch.identifier)===!1&&touchList.push(touch),identifiers.push(touch.identifier)}),touchList}return ev.identifier=1,[ev]},collectEventData:function(element,eventType,touches,ev){var pointerType=POINTER_TOUCH;return Utils.inStr(ev.type,"mouse")||PointerEvent.matchType(POINTER_MOUSE,ev)?pointerType=POINTER_MOUSE:PointerEvent.matchType(POINTER_PEN,ev)&&(pointerType=POINTER_PEN),{center:Utils.getCenter(touches),timeStamp:Date.now(),target:ev.target,touches:touches,eventType:eventType,pointerType:pointerType,srcEvent:ev,preventDefault:function(){var srcEvent=this.srcEvent;srcEvent.preventManipulation&&srcEvent.preventManipulation(),srcEvent.preventDefault&&srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return Detection.stopDetect()}}}},PointerEvent=GestureDetector.PointerEvent={pointers:{},getTouchList:function(){var touchlist=[];return Utils.each(this.pointers,function(pointer){touchlist.push(pointer)}),touchlist},updatePointer:function(eventType,pointerEvent){eventType==EVENT_END||eventType!=EVENT_END&&1!==pointerEvent.buttons?delete this.pointers[pointerEvent.pointerId]:(pointerEvent.identifier=pointerEvent.pointerId,this.pointers[pointerEvent.pointerId]=pointerEvent)},matchType:function(pointerType,ev){if(!ev.pointerType)return!1;var pt=ev.pointerType,types={};return types[POINTER_MOUSE]=pt===(ev.MSPOINTER_TYPE_MOUSE||POINTER_MOUSE),types[POINTER_TOUCH]=pt===(ev.MSPOINTER_TYPE_TOUCH||POINTER_TOUCH),types[POINTER_PEN]=pt===(ev.MSPOINTER_TYPE_PEN||POINTER_PEN),types[pointerType]},reset:function(){this.pointers={}}},Detection=GestureDetector.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(inst,eventData){this.current||(this.stopped=!1,this.current={inst:inst,startEvent:Utils.extend({},eventData),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(eventData))},detect:function(eventData){if(this.current&&!this.stopped){eventData=this.extendEventData(eventData);var inst=this.current.inst,instOptions=inst.options;return Utils.each(this.gestures,function(gesture){!this.stopped&&inst.enabled&&instOptions[gesture.name]&&gesture.handler.call(gesture,eventData,inst)},this),this.current&&(this.current.lastEvent=eventData),eventData.eventType==EVENT_END&&this.stopDetect(),eventData}},stopDetect:function(){this.previous=Utils.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(ev,center,deltaTime,deltaX,deltaY){var cur=this.current,recalc=!1,calcEv=cur.lastCalcEvent,calcData=cur.lastCalcData;calcEv&&ev.timeStamp-calcEv.timeStamp>GestureDetector.CALCULATE_INTERVAL&&(center=calcEv.center,deltaTime=ev.timeStamp-calcEv.timeStamp,deltaX=ev.center.clientX-calcEv.center.clientX,deltaY=ev.center.clientY-calcEv.center.clientY,recalc=!0),ev.eventType!=EVENT_TOUCH&&ev.eventType!=EVENT_RELEASE||(cur.futureCalcEvent=ev),cur.lastCalcEvent&&!recalc||(calcData.velocity=Utils.getVelocity(deltaTime,deltaX,deltaY),calcData.angle=Utils.getAngle(center,ev.center),calcData.direction=Utils.getDirection(center,ev.center),cur.lastCalcEvent=cur.futureCalcEvent||ev,cur.futureCalcEvent=ev),ev.velocityX=calcData.velocity.x,ev.velocityY=calcData.velocity.y,ev.interimAngle=calcData.angle,ev.interimDirection=calcData.direction},extendEventData:function(ev){var cur=this.current,startEv=cur.startEvent,lastEv=cur.lastEvent||startEv;ev.eventType!=EVENT_TOUCH&&ev.eventType!=EVENT_RELEASE||(startEv.touches=[],Utils.each(ev.touches,function(touch){startEv.touches.push({clientX:touch.clientX,clientY:touch.clientY})}));var deltaTime=ev.timeStamp-startEv.timeStamp,deltaX=ev.center.clientX-startEv.center.clientX,deltaY=ev.center.clientY-startEv.center.clientY;return this.getCalculatedData(ev,lastEv.center,deltaTime,deltaX,deltaY),Utils.extend(ev,{startEvent:startEv,deltaTime:deltaTime,deltaX:deltaX,deltaY:deltaY,distance:Utils.getDistance(startEv.center,ev.center),angle:Utils.getAngle(startEv.center,ev.center),direction:Utils.getDirection(startEv.center,ev.center),scale:Utils.getScale(startEv.touches,ev.touches),rotation:Utils.getRotation(startEv.touches,ev.touches)}),ev},register:function(gesture){var options=gesture.defaults||{};return void 0===options[gesture.name]&&(options[gesture.name]=!0),Utils.extend(GestureDetector.defaults,options,!0),gesture.index=gesture.index||1e3,this.gestures.push(gesture),this.gestures.sort(function(a,b){return a.index<b.index?-1:a.index>b.index?1:0}),this.gestures}},GestureDetector.Instance=function(element,options){var self=this;setup(),this.element=element,this.enabled=!0,Utils.each(options,function(value,name){delete options[name],options[Utils.toCamelCase(name)]=value}),this.options=Utils.extend(Utils.extend({},GestureDetector.defaults),options||{}),this.options.behavior&&Utils.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=Event$1.onTouch(element,EVENT_START,function(ev){
self.enabled&&ev.eventType==EVENT_START?Detection.startDetect(self,ev):ev.eventType==EVENT_TOUCH&&Detection.detect(ev)}),this.eventHandlers=[]},GestureDetector.Instance.prototype={on:function(gestures,handler){var self=this;return Event$1.on(self.element,gestures,handler,function(type){self.eventHandlers.push({gesture:type,handler:handler})}),self},off:function(gestures,handler){var self=this;return Event$1.off(self.element,gestures,handler,function(type){var index=Utils.inArray({gesture:type,handler:handler});index!==!1&&self.eventHandlers.splice(index,1)}),self},trigger:function(gesture,eventData){eventData||(eventData={});var event=GestureDetector.DOCUMENT.createEvent("Event");event.initEvent(gesture,!0,!0),event.gesture=eventData;var element=this.element;return Utils.hasParent(eventData.target,element)&&(element=eventData.target),element.dispatchEvent(event),this},enable:function(state){return this.enabled=state,this},dispose:function(){var i,eh;for(Utils.toggleBehavior(this.element,this.options.behavior,!1),i=-1;eh=this.eventHandlers[++i];)Utils.off(this.element,eh.gesture,eh.handler);return this.eventHandlers=[],Event$1.off(this.element,EVENT_TYPES[EVENT_START],this.eventStartHandler),null}},function(name){function dragGesture(ev,inst){var cur=Detection.current;if(!(inst.options.dragMaxTouches>0&&ev.touches.length>inst.options.dragMaxTouches))switch(ev.eventType){case EVENT_START:triggered=!1;break;case EVENT_MOVE:if(ev.distance<inst.options.dragMinDistance&&cur.name!=name)return;var startCenter=cur.startEvent.center;if(cur.name!=name&&(cur.name=name,inst.options.dragDistanceCorrection&&ev.distance>0)){var factor=Math.abs(inst.options.dragMinDistance/ev.distance);startCenter.pageX+=ev.deltaX*factor,startCenter.pageY+=ev.deltaY*factor,startCenter.clientX+=ev.deltaX*factor,startCenter.clientY+=ev.deltaY*factor,ev=Detection.extendEventData(ev)}(cur.lastEvent.dragLockToAxis||inst.options.dragLockToAxis&&inst.options.dragLockMinDistance<=ev.distance)&&(ev.dragLockToAxis=!0);var lastDirection=cur.lastEvent.direction;ev.dragLockToAxis&&lastDirection!==ev.direction&&(Utils.isVertical(lastDirection)?ev.direction=ev.deltaY<0?DIRECTION_UP:DIRECTION_DOWN:ev.direction=ev.deltaX<0?DIRECTION_LEFT:DIRECTION_RIGHT),triggered||(inst.trigger(name+"start",ev),triggered=!0),inst.trigger(name,ev),inst.trigger(name+ev.direction,ev);var isVertical=Utils.isVertical(ev.direction);(inst.options.dragBlockVertical&&isVertical||inst.options.dragBlockHorizontal&&!isVertical)&&ev.preventDefault();break;case EVENT_RELEASE:triggered&&ev.changedLength<=inst.options.dragMaxTouches&&(inst.trigger(name+"end",ev),triggered=!1);break;case EVENT_END:triggered=!1}}var triggered=!1;GestureDetector.gestures.Drag={name:name,index:50,handler:dragGesture,defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}}}("drag"),GestureDetector.gestures.Gesture={name:"gesture",index:1337,handler:function(ev,inst){inst.trigger(this.name,ev)}},function(name){function holdGesture(ev,inst){var options=inst.options,current=Detection.current;switch(ev.eventType){case EVENT_START:clearTimeout(timer),current.name=name,timer=setTimeout(function(){current&&current.name==name&&inst.trigger(name,ev)},options.holdTimeout);break;case EVENT_MOVE:ev.distance>options.holdThreshold&&clearTimeout(timer);break;case EVENT_RELEASE:clearTimeout(timer)}}var timer;GestureDetector.gestures.Hold={name:name,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:holdGesture}}("hold"),GestureDetector.gestures.Release={name:"release",index:1/0,handler:function(ev,inst){ev.eventType==EVENT_RELEASE&&inst.trigger(this.name,ev)}},GestureDetector.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(ev,inst){if(ev.eventType==EVENT_RELEASE){var touches=ev.touches.length,options=inst.options;if(touches<options.swipeMinTouches||touches>options.swipeMaxTouches)return;(ev.velocityX>options.swipeVelocityX||ev.velocityY>options.swipeVelocityY)&&(inst.trigger(this.name,ev),inst.trigger(this.name+ev.direction,ev))}}},function(name){function tapGesture(ev,inst){var sincePrev,didDoubleTap,options=inst.options,current=Detection.current,prev=Detection.previous;switch(ev.eventType){case EVENT_START:hasMoved=!1;break;case EVENT_MOVE:hasMoved=hasMoved||ev.distance>options.tapMaxDistance;break;case EVENT_END:!Utils.inStr(ev.srcEvent.type,"cancel")&&ev.deltaTime<options.tapMaxTime&&!hasMoved&&(sincePrev=prev&&prev.lastEvent&&ev.timeStamp-prev.lastEvent.timeStamp,didDoubleTap=!1,prev&&prev.name==name&&sincePrev&&sincePrev<options.doubleTapInterval&&ev.distance<options.doubleTapDistance&&(inst.trigger("doubletap",ev),didDoubleTap=!0),didDoubleTap&&!options.tapAlways||(current.name=name,inst.trigger(current.name,ev)))}}var hasMoved=!1;GestureDetector.gestures.Tap={name:name,index:100,handler:tapGesture,defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!0,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),GestureDetector.gestures.Touch={name:"touch",index:-(1/0),defaults:{preventDefault:!1,preventMouse:!1},handler:function(ev,inst){return inst.options.preventMouse&&ev.pointerType==POINTER_MOUSE?void ev.stopDetect():(inst.options.preventDefault&&ev.preventDefault(),void(ev.eventType==EVENT_TOUCH&&inst.trigger("touch",ev)))}},function(name){function transformGesture(ev,inst){switch(ev.eventType){case EVENT_START:triggered=!1;break;case EVENT_MOVE:if(ev.touches.length<2)return;var scaleThreshold=Math.abs(1-ev.scale),rotationThreshold=Math.abs(ev.rotation);if(scaleThreshold<inst.options.transformMinScale&&rotationThreshold<inst.options.transformMinRotation)return;Detection.current.name=name,triggered||(inst.trigger(name+"start",ev),triggered=!0),inst.trigger(name,ev),rotationThreshold>inst.options.transformMinRotation&&inst.trigger("rotate",ev),scaleThreshold>inst.options.transformMinScale&&(inst.trigger("pinch",ev),inst.trigger("pinch"+(ev.scale<1?"in":"out"),ev));break;case EVENT_RELEASE:triggered&&ev.changedLength<2&&(inst.trigger(name+"end",ev),triggered=!1)}}var triggered=!1;GestureDetector.gestures.Transform={name:name,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:transformGesture}}("transform");var Platform=function(){function Platform(){babelHelpers.classCallCheck(this,Platform),this._renderPlatform=null}return babelHelpers.createClass(Platform,[{key:"select",value:function(platform){"string"==typeof platform&&(this._renderPlatform=platform.trim().toLowerCase())}},{key:"isWebView",value:function(){if("loading"===document.readyState||"uninitialized"==document.readyState)throw new Error("isWebView() method is available after dom contents loaded.");return!!(window.cordova||window.phonegap||window.PhoneGap)}},{key:"isIOS",value:function(){return this._renderPlatform?"ios"===this._renderPlatform:"object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device))?/iOS/i.test(device.platform):/iPhone|iPad|iPod/i.test(navigator.userAgent)}},{key:"isAndroid",value:function(){return this._renderPlatform?"android"===this._renderPlatform:"object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device))?/Android/i.test(device.platform):/Android/i.test(navigator.userAgent)}},{key:"isAndroidPhone",value:function(){return/Android/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)}},{key:"isAndroidTablet",value:function(){return/Android/i.test(navigator.userAgent)&&!/Mobile/i.test(navigator.userAgent)}},{key:"isWP",value:function(){return this._renderPlatform?"wp"===this._renderPlatform:"object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device))?/Win32NT|WinCE/i.test(device.platform):/Windows Phone|IEMobile|WPDesktop/i.test(navigator.userAgent)}},{key:"isIPhone",value:function(){return/iPhone/i.test(navigator.userAgent)}},{key:"isIPad",value:function(){return/iPad/i.test(navigator.userAgent)}},{key:"isIPod",value:function(){return/iPod/i.test(navigator.userAgent)}},{key:"isBlackBerry",value:function(){return this._renderPlatform?"blackberry"===this._renderPlatform:"object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device))?/BlackBerry/i.test(device.platform):/BlackBerry|RIM Tablet OS|BB10/i.test(navigator.userAgent)}},{key:"isOpera",value:function(){return this._renderPlatform?"opera"===this._renderPlatform:!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0}},{key:"isFirefox",value:function(){return this._renderPlatform?"firefox"===this._renderPlatform:"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(){return this._renderPlatform?"safari"===this._renderPlatform:Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0}},{key:"isChrome",value:function(){return this._renderPlatform?"chrome"===this._renderPlatform:!(!window.chrome||window.opera||navigator.userAgent.indexOf(" OPR/")>=0||navigator.userAgent.indexOf(" Edge/")>=0)}},{key:"isIE",value:function(){return this._renderPlatform?"ie"===this._renderPlatform:!!document.documentMode}},{key:"isEdge",value:function(){return this._renderPlatform?"edge"===this._renderPlatform:navigator.userAgent.indexOf(" Edge/")>=0}},{key:"isIOS7above",value:function(){if("object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device)))return/iOS/i.test(device.platform)&&parseInt(device.version.split(".")[0])>=7;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){var ver=(navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/)||[""])[0].replace(/_/g,".");return parseInt(ver.split(".")[0])>=7}return!1}},{key:"getMobileOS",value:function(){return this.isAndroid()?"android":this.isIOS()?"ios":this.isWP()?"wp":"other"}},{key:"getIOSDevice",value:function(){return this.isIPhone()?"iphone":this.isIPad()?"ipad":this.isIPod()?"ipod":"na"}}]),Platform}(),platform=new Platform,notification={};notification._createAlertDialog=function(title,message,buttonLabels,primaryButtonIndex,modifier,animation,id,_callback,messageIsHTML,cancelable,promptDialog,autofocus,placeholder,defaultValue,submitOnEnter,compile){compile=compile||function(object){return object};var titleElementHTML="string"==typeof title?'<div class="alert-dialog-title"></div>':"",dialogElement=util.createElement("\n  <ons-alert-dialog>\n    "+titleElementHTML+'\n    <div class="alert-dialog-content"></div>\n    <div class="alert-dialog-footer"></div>\n  </ons-alert-dialog>');CustomElements.upgrade(dialogElement),id&&dialogElement.setAttribute("id",id);var titleElement=dialogElement.querySelector(".alert-dialog-title"),messageElement=dialogElement.querySelector(".alert-dialog-content"),footerElement=dialogElement.querySelector(".alert-dialog-footer"),inputElement=void 0,result={};result.promise=new Promise(function(resolve,reject){result.resolve=resolve,result.reject=reject}),modifier=modifier||dialogElement.getAttribute("modifier"),"string"==typeof title&&(titleElement.textContent=title),titleElement=null,dialogElement.setAttribute("animation",animation),messageIsHTML?messageElement.innerHTML=message:messageElement.textContent=message,promptDialog&&(inputElement=util.createElement('<input class="text-input text-input--underbar" type="text"></input>'),modifier&&inputElement.classList.add("text-input--"+modifier),inputElement.setAttribute("placeholder",placeholder),inputElement.value=defaultValue,inputElement.style.width="100%",inputElement.style.marginTop="10px",messageElement.appendChild(inputElement),submitOnEnter&&inputElement.addEventListener("keypress",function(event){13===event.keyCode&&dialogElement.hide({callback:function(){_callback(inputElement.value),result.resolve(inputElement.value),dialogElement.remove(),dialogElement=null}})},!1)),document.body.appendChild(dialogElement),compile(dialogElement),buttonLabels.length<=2&&footerElement.classList.add("alert-dialog-footer--one");for(var createButton=function(i){var buttonElement=util.createElement('<button class="alert-dialog-button"></button>');buttonElement.appendChild(document.createTextNode(buttonLabels[i])),i==primaryButtonIndex&&buttonElement.classList.add("alert-dialog-button--primal"),buttonLabels.length<=2&&buttonElement.classList.add("alert-dialog-button--one");var onClick=function onClick(){buttonElement.removeEventListener("click",onClick,!1),dialogElement.hide({callback:function(){promptDialog?(_callback(inputElement.value),result.resolve(inputElement.value)):(_callback(i),result.resolve(i)),dialogElement.remove(),dialogElement=inputElement=buttonElement=null}})};buttonElement.addEventListener("click",onClick,!1),footerElement.appendChild(buttonElement)},i=0;i<buttonLabels.length;i++)createButton(i);return cancelable&&(dialogElement.cancelable=!0,dialogElement.addEventListener("cancel",function(){promptDialog?(_callback(null),result.reject(null)):(_callback(-1),result.reject(-1)),setTimeout(function(){dialogElement.remove(),dialogElement=null,inputElement=null})},!1)),dialogElement.show({callback:function(){inputElement&&promptDialog&&autofocus&&inputElement.focus()}}),messageElement=footerElement=null,modifier&&(dialogElement.setAttribute("modifier",""),dialogElement.setAttribute("modifier",modifier)),result.promise},notification._alertOriginal=function(message){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];"string"==typeof message?options.message=message:options=message;var defaults={buttonLabel:"OK",animation:"default",title:"Alert",callback:function(){}};if(options=util.extend({},defaults,options),!options.message&&!options.messageHTML)throw new Error("Alert dialog must contain a message.");return notification._createAlertDialog(options.title,options.message||options.messageHTML,[options.buttonLabel],0,options.modifier,options.animation,options.id,options.callback,!options.message,!1,!1,!1,"","",!1,options.compile)},notification.alert=notification._alertOriginal,notification._confirmOriginal=function(message){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];"string"==typeof message?options.message=message:options=message;var defaults={buttonLabels:["Cancel","OK"],primaryButtonIndex:1,animation:"default",title:"Confirm",callback:function(){},cancelable:!1};if(options=util.extend({},defaults,options),!options.message&&!options.messageHTML)throw new Error("Confirm dialog must contain a message.");return notification._createAlertDialog(options.title,options.message||options.messageHTML,options.buttonLabels,options.primaryButtonIndex,options.modifier,options.animation,options.id,options.callback,!options.message,options.cancelable,!1,!1,"","",!1,options.compile)},notification.confirm=notification._confirmOriginal,notification._promptOriginal=function(message){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];"string"==typeof message?options.message=message:options=message;var defaults={buttonLabel:"OK",animation:"default",title:"Alert",defaultValue:"",placeholder:"",callback:function(){},cancelable:!1,autofocus:!0,submitOnEnter:!0};if(options=util.extend({},defaults,options),!options.message&&!options.messageHTML)throw new Error("Prompt dialog must contain a message.");return notification._createAlertDialog(options.title,options.message||options.messageHTML,[options.buttonLabel],0,options.modifier,options.animation,options.id,options.callback,!options.message,options.cancelable,!0,options.autofocus,options.placeholder,options.defaultValue,options.submitOnEnter,options.compile)},notification.prompt=notification._promptOriginal;var pageAttributeExpression={_variables:{},defineVariable:function(name,value){var overwrite=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"!=typeof name)throw new Error("Variable name must be a string.");if("string"!=typeof value&&"function"!=typeof value)throw new Error("Variable value must be a string or a function.");if(this._variables.hasOwnProperty(name)&&!overwrite)throw new Error('"'+name+'" is already defined.');this._variables[name]=value},getVariable:function(name){return this._variables.hasOwnProperty(name)?this._variables[name]:null},removeVariable:function(name){delete this._variables[name]},getAllVariables:function(){return this._variables},_parsePart:function(part){var c=void 0,inInterpolation=!1,currentIndex=0,tokens=[];if(0===part.length)throw new Error("Unable to parse empty string.");for(var i=0;i<part.length;i++)if(c=part.charAt(i),"$"===c&&"{"===part.charAt(i+1)){if(inInterpolation)throw new Error("Nested interpolation not supported.");var token=part.substring(currentIndex,i);token.length>0&&tokens.push(part.substring(currentIndex,i)),currentIndex=i,inInterpolation=!0}else if("}"===c){if(!inInterpolation)throw new Error("} must be preceeded by ${");var token=part.substring(currentIndex,i+1);token.length>0&&tokens.push(part.substring(currentIndex,i+1)),currentIndex=i+1,inInterpolation=!1}if(inInterpolation)throw new Error("Unterminated interpolation.");return tokens.push(part.substring(currentIndex,part.length)),tokens},_replaceToken:function(token){var re=/^\${(.*?)}$/,match=token.match(re);if(match){var name=match[1].trim(),variable=this.getVariable(name);if(null===variable)throw new Error('Variable "'+name+'" does not exist.');if("string"==typeof variable)return variable;var rv=variable();if("string"!=typeof rv)throw new Error("Must return a string.");return rv}return token},_replaceTokens:function(tokens){return tokens.map(this._replaceToken.bind(this))},_parseExpression:function(expression){return expression.split(",").map(function(part){return part.trim()}).map(this._parsePart.bind(this)).map(this._replaceTokens.bind(this)).map(function(part){return part.join("")})},evaluate:function(expression){return expression?this._parseExpression(expression):[]}};pageAttributeExpression.defineVariable("mobileOS",platform.getMobileOS()),pageAttributeExpression.defineVariable("iOSDevice",platform.getIOSDevice()),pageAttributeExpression.defineVariable("runtime",function(){return platform.isWebView()?"cordova":"browser"});var internal={};internal.config={autoStatusBarFill:!0,animationsDisabled:!1},internal.nullElement=window.document.createElement("div"),internal.isEnabledAutoStatusBarFill=function(){return!!internal.config.autoStatusBarFill},internal.normalizePageHTML=function(html){return html=(""+html).trim(),html.match(/^<ons-page/)||(html="<ons-page _muted>"+html+"</ons-page>"),html},internal.waitDOMContentLoaded=function(callback){"loading"===window.document.readyState||"uninitialized"==window.document.readyState?window.document.addEventListener("DOMContentLoaded",callback):setImmediate(callback)},internal.autoStatusBarFill=function(action){var onReady=function onReady(){internal.shouldFillStatusBar()&&action(),document.removeEventListener("deviceready",onReady),document.removeEventListener("DOMContentLoaded",onReady)};"object"===("undefined"==typeof device?"undefined":babelHelpers["typeof"](device))?document.addEventListener("deviceready",onReady):-1===["complete","interactive"].indexOf(document.readyState)?document.addEventListener("DOMContentLoaded",function(){onReady()}):onReady()},internal.shouldFillStatusBar=function(){return internal.isEnabledAutoStatusBarFill()&&platform.isWebView()&&platform.isIOS7above()},internal.templateStore={_storage:{},get:function(key){return internal.templateStore._storage[key]||null},set:function(key,template){internal.templateStore._storage[key]=template}},window.document.addEventListener("_templateloaded",function(e){"ons-template"===e.target.nodeName.toLowerCase()&&internal.templateStore.set(e.templateId,e.template)},!1),window.document.addEventListener("DOMContentLoaded",function(){function register(query){for(var templates=window.document.querySelectorAll(query),i=0;i<templates.length;i++)internal.templateStore.set(templates[i].getAttribute("id"),templates[i].textContent)}register('script[type="text/ons-template"]'),register('script[type="text/template"]'),register('script[type="text/ng-template"]')},!1),internal.getTemplateHTMLAsync=function(page){return new Promise(function(resolve,reject){setImmediate(function(){var cache=internal.templateStore.get(page);if(cache){var html="string"==typeof cache?cache:cache[1];resolve(html)}else!function(){var xhr=new XMLHttpRequest;xhr.open("GET",page,!0),xhr.onload=function(response){var html=xhr.responseText;xhr.status>=400&&xhr.status<600?reject(html):resolve(html)},xhr.onerror=function(){throw new Error("The page is not found: "+page)},xhr.send(null)}()})})},internal.getPageHTMLAsync=function(page){var pages=pageAttributeExpression.evaluate(page),getPage=function getPage(page){return"string"!=typeof page?Promise.reject("Must specify a page."):internal.getTemplateHTMLAsync(page).then(function(html){return internal.normalizePageHTML(html)},function(error){return 0===pages.length?Promise.reject(error):getPage(pages.shift())}).then(function(html){return internal.normalizePageHTML(html)})};return getPage(pages.shift())};var AnimatorFactory=function(){function AnimatorFactory(opts){if(babelHelpers.classCallCheck(this,AnimatorFactory),this._animators=opts.animators,this._baseClass=opts.baseClass,this._baseClassName=opts.baseClassName||opts.baseClass.name,this._animation=opts.defaultAnimation||"default",this._animationOptions=opts.defaultAnimationOptions||{},!this._animators[this._animation])throw new Error("No such animation: "+this._animation)}return babelHelpers.createClass(AnimatorFactory,[{key:"setAnimationOptions",value:function(options){this._animationOptions=options}},{key:"newAnimator",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],defaultAnimator=arguments[1],animator=null;if(options.animation instanceof this._baseClass)return options.animation;var Animator=null;if("string"==typeof options.animation&&(Animator=this._animators[options.animation]),!Animator&&defaultAnimator)animator=defaultAnimator;else{Animator=Animator||this._animators[this._animation];var animationOpts=util.extend({},this._animationOptions,options.animationOptions||{},internal.config.animationsDisabled?{duration:0,delay:0}:{});animator=new Animator(animationOpts),"function"==typeof animator&&(animator=new animator(animationOpts))}if(!(animator instanceof this._baseClass))throw new Error('"animator" is not an instance of '+this._baseClassName+".");return animator}}],[{key:"parseAnimationOptionsString",value:function(jsonString){try{if("string"==typeof jsonString){var result=util.animationOptionsParse(jsonString);if("object"===("undefined"==typeof result?"undefined":babelHelpers["typeof"](result))&&null!==result)return result;console.error('"animation-options" attribute must be a JSON object string: '+jsonString)}return{}}catch(e){return console.error('"animation-options" attribute must be a JSON object string: '+jsonString),{}}}}]),AnimatorFactory}(),ModifierUtil=function(){function ModifierUtil(){babelHelpers.classCallCheck(this,ModifierUtil)}return babelHelpers.createClass(ModifierUtil,null,[{key:"diff",value:function(last,current){function makeDict(modifier){var dict={};return ModifierUtil.split(modifier).forEach(function(token){return dict[token]=token}),dict}last=makeDict((""+last).trim()),current=makeDict((""+current).trim());var removed=Object.keys(last).reduce(function(result,token){return current[token]||result.push(token),result},[]),added=Object.keys(current).reduce(function(result,token){return last[token]||result.push(token),result},[]);return{added:added,removed:removed}}},{key:"applyDiffToClassList",value:function(diff,classList,template){diff.added.map(function(modifier){return template.replace(/\*/g,modifier)}).forEach(function(klass){return classList.add(klass)}),diff.removed.map(function(modifier){return template.replace(/\*/g,modifier)}).forEach(function(klass){return classList.remove(klass)})}},{key:"applyDiffToElement",value:function(diff,element,scheme){var matches=function(e,s){return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector).call(e,s)};for(var selector in scheme)if(scheme.hasOwnProperty(selector))for(var targetElements=!selector||matches(element,selector)?[element]:element.querySelectorAll(selector),i=0;i<targetElements.length;i++)ModifierUtil.applyDiffToClassList(diff,targetElements[i].classList,scheme[selector])}},{key:"onModifierChanged",value:function(last,current,element,scheme){return ModifierUtil.applyDiffToElement(ModifierUtil.diff(last,current),element,scheme)}},{key:"initModifier",value:function(element,scheme){var modifier=element.getAttribute("modifier");"string"==typeof modifier&&ModifierUtil.applyDiffToElement({removed:[],added:ModifierUtil.split(modifier)},element,scheme)}},{key:"split",value:function(modifier){return"string"!=typeof modifier?[]:modifier.trim().split(/ +/).filter(function(token){return""!==token})}}]),ModifierUtil}(),scheme={createItemContent:{type:"function",returns:Element},countItems:{type:"function",returns:"number"},calculateItemHeight:{type:"function",returns:"number"},updateItemContent:{type:"function",safeCall:!0},destroy:{type:"function",safeCall:!0},destroyItem:{type:"function",safeCall:!0},_render:{type:"function",safeCall:!0}},LazyRepeatDelegate=function(){function LazyRepeatDelegate(userDelegate){var templateElement=arguments.length<=1||void 0===arguments[1]?null:arguments[1];babelHelpers.classCallCheck(this,LazyRepeatDelegate),this._userDelegate=util.validated("delegate",userDelegate,"object"),this._templateElement=util.validated("templateElement",templateElement,[Element,"null"])}return babelHelpers.createClass(LazyRepeatDelegate,[{key:"_validated",value:function(key){var _scheme=arguments.length<=1||void 0===arguments[1]?scheme:arguments[1];return util.validated(key,null,util.extend({},_scheme[key],{dynamicCall:{object:this._userDelegate,key:key}}))}},{key:"hasRenderFunction",value:function(){return void 0!==this._userDelegate._render}},{key:"_render",value:function(items,height){this._validated("_render")(items,height)}},{key:"prepareItem",value:function(index,done){return done({element:this._validated("createItemContent")(index,this._templateElement)})}},{key:"countItems",value:function(){return this._validated("countItems")()}},{key:"updateItem",value:function(index,item){return this._validated("updateItemContent")(index,item)}},{key:"calculateItemHeight",value:function(index){return this._validated("calculateItemHeight")(index)}},{key:"destroyItem",value:function(index,item){return this._validated("destroyItem")(index,item)}},{key:"destroy",value:function(){this._validated("destroy")(),this._userDelegate=this._templateElement=null}},{key:"itemHeight",get:function(){return this._userDelegate.itemHeight}}]),LazyRepeatDelegate}(),LazyRepeatProvider=function(){function LazyRepeatProvider(wrapperElement,delegate){if(babelHelpers.classCallCheck(this,LazyRepeatProvider),this._wrapperElement=wrapperElement,this._delegate=util.validated("delegate",delegate,LazyRepeatDelegate),"ons-list"===wrapperElement.tagName.toLowerCase()&&wrapperElement.classList.add("lazy-list"),this._pageContent=util.findParent(wrapperElement,".page__content"),!this._pageContent)throw new Error("ons-lazy-repeat must be a descendant of an <ons-page> or an element.");this._topPositions=[],this._renderedItems={};try{this._delegate.itemHeight||this._delegate.calculateItemHeight(0)}catch(e){if(!/must be (a|an instance of) function/.test(""+e))throw e;this._unknownItemHeight=!0}this._addEventListeners(),this._onChange()}return babelHelpers.createClass(LazyRepeatProvider,[{key:"_checkItemHeight",value:function(callback){var _this=this;this._delegate.prepareItem(0,function(_ref){var element=_ref.element;_this._unknownItemHeight&&(_this._wrapperElement.appendChild(element),_this._itemHeight=element.offsetHeight,_this._wrapperElement.removeChild(element),delete _this._unknownItemHeight,callback())})}},{key:"_countItems",value:function(){return this._delegate.countItems()}},{key:"_getItemHeight",value:function(i){return this.staticItemHeight||this._delegate.calculateItemHeight(i)}},{key:"_onChange",value:function(){this._render()}},{key:"refresh",value:function(){this._removeAllElements(),this._onChange()}},{key:"_render",value:function(){var _this2=this;if(this._unknownItemHeight)return this._checkItemHeight(this._render.bind(this));var items=this._getItemsInView();if(this._delegate.hasRenderFunction&&this._delegate.hasRenderFunction())return this._delegate._render(items,this._listHeight),null;var keep={};items.forEach(function(item){_this2._renderElement(item),keep[item.index]=!0}),Object.keys(this._renderedItems).forEach(function(key){return keep[key]||_this2._removeElement(key)}),this._wrapperElement.style.height=this._listHeight+"px"}},{key:"_renderElement",value:function(_ref2){var _this3=this,index=_ref2.index,top=_ref2.top,item=this._renderedItems[index];return item?(this._delegate.updateItem(index,item),void(item.element.style.top=top+"px")):void this._delegate.prepareItem(index,function(item){util.extend(item.element.style,{position:"absolute",top:top+"px",left:0,right:0}),_this3._wrapperElement.appendChild(item.element),_this3._renderedItems[index]=item})}},{key:"_removeElement",value:function(index){var item=this._renderedItems[index];this._delegate.destroyItem(index,item),item.element.parentElement&&item.element.parentElement.removeChild(item.element),delete this._renderedItems[index]}},{key:"_removeAllElements",value:function(){var _this4=this;Object.keys(this._renderedItems).forEach(function(key){return _this4._removeElement(key)})}},{key:"_calculateStartIndex",value:function(current){var start=0,end=this._itemCount-1;if(this.staticItemHeight)return parseInt(-current/this.staticItemHeight);for(;;){var middle=Math.floor((start+end)/2),value=current+this._topPositions[middle];if(start>end)return 0;if(0>=value&&value+this._getItemHeight(middle)>0)return middle;isNaN(value)||value>=0?end=middle-1:start=middle+1}}},{key:"_recalculateTopPositions",value:function(){Math.min(this._topPositions.length,this._itemCount);this._topPositions[0]=0;for(var _l,i=1;_l>i;i++)this._topPositions[i]=this._topPositions[i-1]+this._getItemHeight(i)}},{key:"_getItemsInView",value:function(){var offset=this._wrapperElement.getBoundingClientRect().top,limit=4*window.innerHeight-offset,count=this._countItems();count!==this._itemCount&&(this._itemCount=count,this._recalculateTopPositions());for(var i=Math.max(0,this._calculateStartIndex(offset)-30),items=[],top=this._topPositions[i];count>i&&limit>top;i++)i>=this._topPositions.length&&(this._topPositions.length+=100),this._topPositions[i]=top,items.push({top:top,index:i}),top+=this._getItemHeight(i);return this._listHeight=top,items}},{key:"_debounce",value:function(func,wait,immediate){var timeout=void 0;return function(){var _this5=this,_arguments=arguments,callNow=immediate&&!timeout;clearTimeout(timeout),callNow?func.apply(this,arguments):timeout=setTimeout(function(){timeout=null,func.apply(_this5,_arguments)},wait)}}},{key:"_doubleFireOnTouchend",value:function(){this._render(),this._debounce(this._render.bind(this),100)}},{key:"_addEventListeners",value:function(){util.bindListeners(this,["_onChange","_doubleFireOnTouchend"]),platform.isIOS()&&(this._boundOnChange=this._debounce(this._boundOnChange,30)),this._pageContent.addEventListener("scroll",this._boundOnChange,!0),platform.isIOS()&&(this._pageContent.addEventListener("touchmove",this._boundOnChange,!0),this._pageContent.addEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.addEventListener("resize",this._boundOnChange,!0)}},{key:"_removeEventListeners",value:function(){this._pageContent.removeEventListener("scroll",this._boundOnChange,!0),platform.isIOS()&&(this._pageContent.removeEventListener("touchmove",this._boundOnChange,!0),this._pageContent.removeEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.removeEventListener("resize",this._boundOnChange,!0);
}},{key:"destroy",value:function(){this._removeAllElements(),this._delegate.destroy(),this._parentElement=this._delegate=this._renderedItems=null,this._removeEventListeners()}},{key:"staticItemHeight",get:function(){return this._delegate.itemHeight||this._itemHeight}}]),LazyRepeatProvider}();internal.AnimatorFactory=AnimatorFactory,internal.ModifierUtil=ModifierUtil,internal.LazyRepeatProvider=LazyRepeatProvider,internal.LazyRepeatDelegate=LazyRepeatDelegate;var create=function(){var obj={_isPortrait:!1,isPortrait:function(){return this._isPortrait()},isLandscape:function(){return!this.isPortrait()},_init:function(){return document.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this),!1),"orientation"in window?window.addEventListener("orientationchange",this._onOrientationChange.bind(this),!1):window.addEventListener("resize",this._onResize.bind(this),!1),this._isPortrait=function(){return window.innerHeight>window.innerWidth},this},_onDOMContentLoaded:function(){this._installIsPortraitImplementation(),this.emit("change",{isPortrait:this.isPortrait()})},_installIsPortraitImplementation:function(){var isPortrait=window.innerWidth<window.innerHeight;"orientation"in window?window.orientation%180===0?this._isPortrait=function(){return 0===Math.abs(window.orientation%180)?isPortrait:!isPortrait}:this._isPortrait=function(){return 90===Math.abs(window.orientation%180)?isPortrait:!isPortrait}:this._isPortrait=function(){return window.innerHeight>window.innerWidth}},_onOrientationChange:function(){var _this=this,isPortrait=this._isPortrait(),nIter=0,interval=setInterval(function(){nIter++;var w=window.innerWidth,h=window.innerHeight;isPortrait&&h>=w||!isPortrait&&w>=h?(_this.emit("change",{isPortrait:isPortrait}),clearInterval(interval)):50===nIter&&(_this.emit("change",{isPortrait:isPortrait}),clearInterval(interval))},20)},_onResize:function(){this.emit("change",{isPortrait:this.isPortrait()})}};return MicroEvent.mixin(obj),obj},orientation=create()._init(),softwareKeyboard=new MicroEvent;softwareKeyboard._visible=!1;var onShow=function(){softwareKeyboard._visible=!0,softwareKeyboard.emit("show")},onHide=function(){softwareKeyboard._visible=!1,softwareKeyboard.emit("hide")},bindEvents=function(){return"undefined"!=typeof Keyboard?(Keyboard.onshow=onShow,Keyboard.onhide=onHide,softwareKeyboard.emit("init",{visible:Keyboard.isVisible}),!0):"undefined"!=typeof cordova.plugins&&"undefined"!=typeof cordova.plugins.Keyboard?(window.addEventListener("native.keyboardshow",onShow),window.addEventListener("native.keyboardhide",onHide),softwareKeyboard.emit("init",{visible:cordova.plugins.Keyboard.isVisible}),!0):!1},noPluginError=function(){console.warn("ons-keyboard: Cordova Keyboard plugin is not present.")};document.addEventListener("deviceready",function(){bindEvents()||((document.querySelector("[ons-keyboard-active]")||document.querySelector("[ons-keyboard-inactive]"))&&noPluginError(),softwareKeyboard.on=noPluginError)});var util$1={_ready:!1,_domContentLoaded:!1,_onDOMContentLoaded:function(){util$1._domContentLoaded=!0,platform.isWebView()?window.document.addEventListener("deviceready",function(){util$1._ready=!0},!1):util$1._ready=!0},addBackButtonListener:function(fn){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.addEventListener("backbutton",fn,!1):window.document.addEventListener("deviceready",function(){window.document.addEventListener("backbutton",fn,!1)})},removeBackButtonListener:function(fn){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.removeEventListener("backbutton",fn,!1):window.document.addEventListener("deviceready",function(){window.document.removeEventListener("backbutton",fn,!1)})}};window.addEventListener("DOMContentLoaded",function(){return util$1._onDOMContentLoaded()},!1);var HandlerRepository={_store:{},_genId:function(){var i=0;return function(){return i++}}(),set:function(element,handler){element.dataset.deviceBackButtonHandlerId&&this.remove(element);var id=element.dataset.deviceBackButtonHandlerId=HandlerRepository._genId();this._store[id]=handler},remove:function(element){element.dataset.deviceBackButtonHandlerId&&(delete this._store[element.dataset.deviceBackButtonHandlerId],delete element.dataset.deviceBackButtonHandlerId)},get:function(element){if(element.dataset.deviceBackButtonHandlerId){var id=element.dataset.deviceBackButtonHandlerId;if(!this._store[id])throw new Error;return this._store[id]}},has:function(element){if(!element.dataset)return!1;var id=element.dataset.deviceBackButtonHandlerId;return!!this._store[id]}},DeviceBackButtonDispatcher=function(){function DeviceBackButtonDispatcher(){babelHelpers.classCallCheck(this,DeviceBackButtonDispatcher),this._isEnabled=!1,this._boundCallback=this._callback.bind(this)}return babelHelpers.createClass(DeviceBackButtonDispatcher,[{key:"enable",value:function(){this._isEnabled||(util$1.addBackButtonListener(this._boundCallback),this._isEnabled=!0)}},{key:"disable",value:function(){this._isEnabled&&(util$1.removeBackButtonListener(this._boundCallback),this._isEnabled=!1)}},{key:"fireDeviceBackButtonEvent",value:function(){var event=document.createEvent("Event");event.initEvent("backbutton",!0,!0),document.dispatchEvent(event)}},{key:"_callback",value:function(){this._dispatchDeviceBackButtonEvent()}},{key:"createHandler",value:function(element,callback){if(!(element instanceof HTMLElement))throw new Error("element must be an instance of HTMLElement");if(!(callback instanceof Function))throw new Error("callback must be an instance of Function");var handler={_callback:callback,_element:element,disable:function(){HandlerRepository.remove(element)},setListener:function(callback){this._callback=callback},enable:function(){HandlerRepository.set(element,this)},isEnabled:function(){return HandlerRepository.get(element)===this},destroy:function(){HandlerRepository.remove(element),this._callback=this._element=null}};return handler.enable(),handler}},{key:"_dispatchDeviceBackButtonEvent",value:function(){function createEvent(element){return{_element:element,callParentHandler:function(){for(var parent=this._element.parentNode;parent;){if(handler=HandlerRepository.get(parent))return handler._callback(createEvent(parent));parent=parent.parentNode}}}}var tree=this._captureTree(),element=this._findHandlerLeafElement(tree),handler=HandlerRepository.get(element);handler._callback(createEvent(element))}},{key:"_captureTree",value:function(){function createTree(element){return{element:element,children:Array.prototype.concat.apply([],arrayOf(element.children).map(function(childElement){if("none"===childElement.style.display)return[];if(0===childElement.children.length&&!HandlerRepository.has(childElement))return[];var result=createTree(childElement);return 0!==result.children.length||HandlerRepository.has(result.element)?[result]:[]}))}}function arrayOf(target){for(var result=[],i=0;i<target.length;i++)result.push(target[i]);return result}return createTree(document.body)}},{key:"_findHandlerLeafElement",value:function(tree){function find(node){return 0===node.children.length?node.element:1===node.children.length?find(node.children[0]):node.children.map(function(childNode){return childNode.element}).reduce(function(left,right){if(!left)return right;var leftZ=parseInt(window.getComputedStyle(left,"").zIndex,10),rightZ=parseInt(window.getComputedStyle(right,"").zIndex,10);if(!isNaN(leftZ)&&!isNaN(rightZ))return leftZ>rightZ?left:right;throw new Error("Capturing backbutton-handler is failure.")},null)}return find(tree)}}]),DeviceBackButtonDispatcher}(),deviceBackButtonDispatcher=new DeviceBackButtonDispatcher,autoStyleEnabled=!0,modifiersMap={quiet:"material--flat",light:"material--flat",outline:"material--flat",cta:"","large--quiet":"material--flat large","large--cta":"large",noborder:"",chevron:"",tappable:""},platforms={};platforms.android=function(element){if(!/ons-fab|ons-speed-dial|ons-progress/.test(element.tagName.toLowerCase())&&!/material/.test(element.getAttribute("modifier"))){var oldModifier=element.getAttribute("modifier")||"",newModifier=oldModifier.trim().split(/\s+/).map(function(e){return modifiersMap.hasOwnProperty(e)?modifiersMap[e]:e});newModifier.unshift("material"),element.setAttribute("modifier",newModifier.join(" ").trim())}!/ons-button|ons-list-item|ons-fab|ons-speed-dial|ons-tab$/.test(element.tagName.toLowerCase())||element.hasAttribute("ripple")||util.findChild(element,"ons-ripple")||("ons-list-item"===element.tagName.toLowerCase()?element.hasAttribute("tappable")&&(element.setAttribute("ripple",""),element.removeAttribute("tappable")):element.setAttribute("ripple",""))},platforms.ios=function(element){/material/.test(element.getAttribute("modifier"))&&(util.removeModifier(element,"material"),util.removeModifier(element,"material--flat")&&util.addModifier(element,util.removeModifier(element,"large")?"large--quiet":"quiet"),element.getAttribute("modifier")||element.removeAttribute("modifier")),element.hasAttribute("ripple")&&("ons-list-item"===element.tagName.toLowerCase()&&element.setAttribute("tappable",""),element.removeAttribute("ripple"))};var unlocked={android:!0},prepareAutoStyle=function(element,force){if(autoStyleEnabled&&!element.hasAttribute("disable-auto-styling")){var mobileOS=platform.getMobileOS();platforms.hasOwnProperty(mobileOS)&&(unlocked.hasOwnProperty(mobileOS)||force)&&platforms[mobileOS](element)}},autoStyle={isEnabled:function(){return autoStyleEnabled},enable:function(){return autoStyleEnabled=!0},disable:function(){return autoStyleEnabled=!1},prepare:prepareAutoStyle},generateId=function(){var i=0;return function(){return i++}}(),DoorLock=function(){function DoorLock(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];babelHelpers.classCallCheck(this,DoorLock),this._lockList=[],this._waitList=[],this._log=options.log||function(){}}return babelHelpers.createClass(DoorLock,[{key:"lock",value:function(){var _this=this,unlock=function unlock(){_this._unlock(unlock)};return unlock.id=generateId(),this._lockList.push(unlock),this._log("lock: "+unlock.id),unlock}},{key:"_unlock",value:function(fn){var index=this._lockList.indexOf(fn);if(-1===index)throw new Error("This function is not registered in the lock list.");this._lockList.splice(index,1),this._log("unlock: "+fn.id),this._tryToFreeWaitList()}},{key:"_tryToFreeWaitList",value:function(){for(;!this.isLocked()&&this._waitList.length>0;)this._waitList.shift()()}},{key:"waitUnlock",value:function(callback){if(!(callback instanceof Function))throw new Error("The callback param must be a function.");this.isLocked()?this._waitList.push(callback):callback()}},{key:"isLocked",value:function(){return this._lockList.length>0}}]),DoorLock}(),readyMap=new WeakMap,queueMap=new WeakMap,ons$1={};ons$1._util=util,ons$1._deviceBackButtonDispatcher=deviceBackButtonDispatcher,ons$1._internal=internal,ons$1.GestureDetector=GestureDetector,ons$1.platform=platform,ons$1.softwareKeyboard=softwareKeyboard,ons$1.pageAttributeExpression=pageAttributeExpression,ons$1.orientation=orientation,ons$1.notification=notification,ons$1._animationOptionsParser=parse,ons$1._autoStyle=autoStyle,ons$1._DoorLock=DoorLock,ons$1._contentReady=contentReady,ons$1._readyLock=new DoorLock,ons$1.platform.select((window.location.search.match(/platform=([\w-]+)/)||[])[1]),waitDeviceReady(),ons$1.isReady=function(){return!ons$1._readyLock.isLocked()},ons$1.isWebView=ons$1.platform.isWebView,ons$1.ready=function(callback){ons$1.isReady()?callback():ons$1._readyLock.waitUnlock(callback)},ons$1.setDefaultDeviceBackButtonListener=function(listener){ons$1._defaultDeviceBackButtonHandler.setListener(listener)},ons$1.disableDeviceBackButtonHandler=function(){ons$1._deviceBackButtonDispatcher.disable()},ons$1.enableDeviceBackButtonHandler=function(){ons$1._deviceBackButtonDispatcher.enable()},ons$1.enableAutoStatusBarFill=function(){if(ons$1.isReady())throw new Error("This method must be called before ons.isReady() is true.");ons$1._internal.config.autoStatusBarFill=!0},ons$1.disableAutoStatusBarFill=function(){if(ons$1.isReady())throw new Error("This method must be called before ons.isReady() is true.");ons$1._internal.config.autoStatusBarFill=!1},ons$1.disableAnimations=function(){ons$1._internal.config.animationsDisabled=!0},ons$1.enableAnimations=function(){ons$1._internal.config.animationsDisabled=!1},ons$1.disableAutoStyling=ons$1._autoStyle.disable,ons$1.enableAutoStyling=ons$1._autoStyle.enable,ons$1.forcePlatformStyling=function(newPlatform){ons$1.enableAutoStyling(),ons$1.platform.select(newPlatform||"ios"),ons$1._util.arrayFrom(document.querySelectorAll("ons-if")).forEach(function(element){return element._platformUpdate()}),ons$1._util.arrayFrom(document.querySelectorAll("*")).filter(function(element){return element.tagName.match(/^ons-/i)}).forEach(function(element){return ons$1._autoStyle.prepare(element,!0)})},ons$1._createPopoverOriginal=function(page){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!page)throw new Error("Page url must be defined.");return ons$1._internal.getPageHTMLAsync(page).then(function(html){html=html.match(/<ons-popover/gi)?"<div>"+html+"</div>":"<ons-popover>"+html+"</ons-popover>";var div=ons$1._util.createElement("<div>"+html+"</div>"),popover=div.querySelector("ons-popover");return CustomElements.upgrade(popover),document.body.appendChild(popover),options.link instanceof Function&&options.link(popover),popover})},ons$1.createPopover=ons$1._createPopoverOriginal,ons$1._createDialogOriginal=function(page){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!page)throw new Error("Page url must be defined.");return ons$1._internal.getPageHTMLAsync(page).then(function(html){html=html.match(/<ons-dialog/gi)?"<div>"+html+"</div>":"<ons-dialog>"+html+"</ons-dialog>";var div=ons$1._util.createElement("<div>"+html+"</div>"),dialog=div.querySelector("ons-dialog");return CustomElements.upgrade(dialog),document.body.appendChild(dialog),options.link instanceof Function&&options.link(dialog),dialog})},ons$1.createDialog=ons$1._createDialogOriginal,ons$1._createAlertDialogOriginal=function(page){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(!page)throw new Error("Page url must be defined.");return ons$1._internal.getPageHTMLAsync(page).then(function(html){html=html.match(/<ons-alert-dialog/gi)?"<div>"+html+"</div>":"<ons-alert-dialog>"+html+"</ons-alert-dialog>";var div=ons$1._util.createElement("<div>"+html+"</div>"),alertDialog=div.querySelector("ons-alert-dialog");return CustomElements.upgrade(alertDialog),document.body.appendChild(alertDialog),options.link instanceof Function&&options.link(alertDialog),alertDialog})},ons$1.createAlertDialog=ons$1._createAlertDialogOriginal,ons$1._resolveLoadingPlaceholderOriginal=function(page,link){var elements=ons$1._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]"));if(!(elements.length>0))throw new Error("No ons-loading-placeholder exists.");elements.filter(function(element){return!element.getAttribute("page")}).forEach(function(element){element.setAttribute("ons-loading-placeholder",page),ons$1._resolveLoadingPlaceholder(element,page,link)})},ons$1.resolveLoadingPlaceholder=ons$1._resolveLoadingPlaceholderOriginal,ons$1._setupLoadingPlaceHolders=function(){ons$1.ready(function(){var elements=ons$1._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]"));elements.forEach(function(element){var page=element.getAttribute("ons-loading-placeholder");"string"==typeof page&&ons$1._resolveLoadingPlaceholder(element,page)})})},ons$1._resolveLoadingPlaceholder=function(element,page,link){link=link||function(element,done){done()},ons$1._internal.getPageHTMLAsync(page).then(function(html){for(;element.firstChild;)element.removeChild(element.firstChild);var contentElement=ons$1._util.createElement("<div>"+html+"</div>");contentElement.style.display="none",element.appendChild(contentElement),link(contentElement,function(){contentElement.style.display=""})})["catch"](function(error){throw new Error("Unabled to resolve placeholder: "+error)})},window._superSecretOns=ons$1;var BaseElement=function(_getElementClass){function BaseElement(){return babelHelpers.classCallCheck(this,BaseElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BaseElement).apply(this,arguments))}return babelHelpers.inherits(BaseElement,_getElementClass),BaseElement}(getElementClass()),TemplateElement=function(_BaseElement){function TemplateElement(){return babelHelpers.classCallCheck(this,TemplateElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TemplateElement).apply(this,arguments))}return babelHelpers.inherits(TemplateElement,_BaseElement),babelHelpers.createClass(TemplateElement,[{key:"createdCallback",value:function(){for(this.template=this.innerHTML;this.firstChild;)this.removeChild(this.firstChild)}},{key:"attachedCallback",value:function(){var event=new CustomEvent("_templateloaded",{bubbles:!0,cancelable:!0});event.template=this.template,event.templateId=this.getAttribute("id"),this.dispatchEvent(event)}}]),TemplateElement}(BaseElement);window.OnsTemplateElement=document.registerElement("ons-template",{prototype:TemplateElement.prototype});var ConditionalElement=function(_BaseElement){function ConditionalElement(){return babelHelpers.classCallCheck(this,ConditionalElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ConditionalElement).apply(this,arguments))}return babelHelpers.inherits(ConditionalElement,_BaseElement),babelHelpers.createClass(ConditionalElement,[{key:"createdCallback",value:function(){null!==platform._renderPlatform?this._platformUpdate():this._isAllowedPlatform()||(this.innerHTML=""),this._onOrientationChange()}},{key:"attachedCallback",value:function(){orientation.on("change",this._onOrientationChange.bind(this))}},{key:"attributeChangedCallback",value:function(name){"orientation"===name&&this._onOrientationChange()}},{key:"detachedCallback",value:function(){orientation.off("change",this._onOrientationChange)}},{key:"_platformUpdate",value:function(){this.style.display=this._isAllowedPlatform()?"":"none"}},{key:"_isAllowedPlatform",value:function(){return!this.getAttribute("platform")||this.getAttribute("platform").split(/\s+/).indexOf(platform.getMobileOS())>=0}},{key:"_onOrientationChange",value:function(){if(this.hasAttribute("orientation")&&this._isAllowedPlatform()){var conditionalOrientation=this.getAttribute("orientation").toLowerCase(),currentOrientation=orientation.isPortrait()?"portrait":"landscape";this.style.display=conditionalOrientation===currentOrientation?"":"none"}}}]),ConditionalElement}(BaseElement);window.OnsConditionalElement=document.registerElement("ons-if",{prototype:ConditionalElement.prototype});var AlertDialogAnimator=function(){function AlertDialogAnimator(){var _ref=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref$timing=_ref.timing,timing=void 0===_ref$timing?"linear":_ref$timing,_ref$delay=_ref.delay,delay=void 0===_ref$delay?0:_ref$delay,_ref$duration=_ref.duration,duration=void 0===_ref$duration?.2:_ref$duration;babelHelpers.classCallCheck(this,AlertDialogAnimator),this.timing=timing,this.delay=delay,this.duration=duration}return babelHelpers.createClass(AlertDialogAnimator,[{key:"show",value:function(dialog,done){done()}},{key:"hide",value:function(dialog,done){done()}}]),AlertDialogAnimator}(),AndroidAlertDialogAnimator=function(_AlertDialogAnimator){function AndroidAlertDialogAnimator(){var _ref2=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref2$timing=_ref2.timing,timing=void 0===_ref2$timing?"cubic-bezier(.1, .7, .4, 1)":_ref2$timing,_ref2$duration=_ref2.duration,duration=void 0===_ref2$duration?.2:_ref2$duration,_ref2$delay=_ref2.delay,delay=void 0===_ref2$delay?0:_ref2$delay;return babelHelpers.classCallCheck(this,AndroidAlertDialogAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(AndroidAlertDialogAnimator).call(this,{duration:duration,timing:timing,delay:delay}))}return babelHelpers.inherits(AndroidAlertDialogAnimator,_AlertDialogAnimator),babelHelpers.createClass(AndroidAlertDialogAnimator,[{key:"show",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(0.9, 0.9, 1.0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1.0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"hide",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1.0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(0.9, 0.9, 1.0)",opacity:0},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}}]),AndroidAlertDialogAnimator}(AlertDialogAnimator),IOSAlertDialogAnimator=function(_AlertDialogAnimator2){function IOSAlertDialogAnimator(){var _ref3=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref3$timing=_ref3.timing,timing=void 0===_ref3$timing?"cubic-bezier(.1, .7, .4, 1)":_ref3$timing,_ref3$duration=_ref3.duration,duration=void 0===_ref3$duration?.2:_ref3$duration,_ref3$delay=_ref3.delay,delay=void 0===_ref3$delay?0:_ref3$delay;return babelHelpers.classCallCheck(this,IOSAlertDialogAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSAlertDialogAnimator).call(this,{duration:duration,timing:timing,delay:delay}))}return babelHelpers.inherits(IOSAlertDialogAnimator,_AlertDialogAnimator2),babelHelpers.createClass(IOSAlertDialogAnimator,[{key:"show",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(1.3, 1.3, 1.0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -50%, 0) scale3d(1.0, 1.0, 1.0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"hide",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{opacity:1},duration:0}).wait(this.delay).queue({css:{opacity:0},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}}]),IOSAlertDialogAnimator}(AlertDialogAnimator),scheme$1={".alert-dialog":"alert-dialog--*",".alert-dialog-container":"alert-dialog-container--*",".alert-dialog-title":"alert-dialog-title--*",".alert-dialog-content":"alert-dialog-content--*",".alert-dialog-footer":"alert-dialog-footer--*",".alert-dialog-button":"alert-dialog-button--*",".alert-dialog-footer--one":"alert-dialog-footer--one--*",".alert-dialog-button--one":"alert-dialog-button--one--*",".alert-dialog-button--primal":"alert-dialog-button--primal--*",".alert-dialog-mask":"alert-dialog-mask--*"},_animatorDict={none:AlertDialogAnimator,"default":function(){return platform.isAndroid()?AndroidAlertDialogAnimator:IOSAlertDialogAnimator},fade:function(){return platform.isAndroid()?AndroidAlertDialogAnimator:IOSAlertDialogAnimator}},AlertDialogElement=function(_BaseElement){function AlertDialogElement(){return babelHelpers.classCallCheck(this,AlertDialogElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(AlertDialogElement).apply(this,arguments))}return babelHelpers.inherits(AlertDialogElement,_BaseElement),babelHelpers.createClass(AlertDialogElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){return _this2._compile()}),this._visible=!1,this._doorLock=new DoorLock,this._boundCancel=this._cancel.bind(this),this._updateAnimatorFactory()}},{key:"_updateAnimatorFactory",value:function(){this._animatorFactory=new AnimatorFactory({animators:_animatorDict,baseClass:AlertDialogAnimator,baseClassName:"AlertDialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){autoStyle.prepare(this),this.style.display="none";var content=document.createDocumentFragment();if(!this._mask&&!this._dialog)for(;this.firstChild;)content.appendChild(this.firstChild);if(!this._mask){var mask=document.createElement("div");mask.classList.add("alert-dialog-mask"),this.insertBefore(mask,this.children[0])}if(!this._dialog){var dialog=document.createElement("div");dialog.classList.add("alert-dialog"),this.insertBefore(dialog,null)}if(!util.findChild(this._dialog,".alert-dialog-container")){var container=document.createElement("div");container.classList.add("alert-dialog-container"),this._dialog.appendChild(container)}this._dialog.children[0].appendChild(content),this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,this.getAttribute("mask-color")&&(this._mask.style.backgroundColor=this.getAttribute("mask-color")),ModifierUtil.initModifier(this,scheme$1)}},{key:"show",value:function(){var _this3=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_cancel2=!1,callback=options.callback||function(){};if(options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"))),util.triggerElementEvent(this,"preshow",{alertDialog:this,cancel:function(){_cancel2=!0}}),_cancel2)return Promise.reject("Canceled in preshow event.");var _ret=function(){var tryShow=function(){var unlock=_this3._doorLock.lock(),animator=_this3._animatorFactory.newAnimator(options);return _this3.style.display="block",_this3._mask.style.opacity="1",new Promise(function(resolve){contentReady(_this3,function(){animator.show(_this3,function(){_this3._visible=!0,unlock(),util.triggerElementEvent(_this3,"postshow",{alertDialog:_this3}),callback(),resolve(_this3)})})})};return{v:new Promise(function(resolve){_this3._doorLock.waitUnlock(function(){return resolve(tryShow())})})}}();return"object"===("undefined"==typeof _ret?"undefined":babelHelpers["typeof"](_ret))?_ret.v:void 0}},{key:"hide",value:function(){var _this4=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_cancel3=!1,callback=options.callback||function(){};if(options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"))),util.triggerElementEvent(this,"prehide",{alertDialog:this,cancel:function(){_cancel3=!0}}),_cancel3)return Promise.reject("Canceled in prehide event.");var _ret2=function(){var tryHide=function(){var unlock=_this4._doorLock.lock(),animator=_this4._animatorFactory.newAnimator(options);return new Promise(function(resolve){contentReady(_this4,function(){animator.hide(_this4,function(){_this4.style.display="none",_this4._visible=!1,unlock(),util.triggerElementEvent(_this4,"posthide",{alertDialog:_this4}),callback(),resolve(_this4)})})})};return{v:new Promise(function(resolve){_this4._doorLock.waitUnlock(function(){return resolve(tryHide())})})}}();return"object"===("undefined"==typeof _ret2?"undefined":babelHelpers["typeof"](_ret2))?_ret2.v:void 0}},{key:"_onDeviceBackButton",value:function(event){this.cancelable?this._cancel():event.callParentHandler()}},{key:"_cancel",value:function(){var _this5=this;this.cancelable&&!this._running&&(this._running=!0,this.hide({callback:function(){_this5._running=!1,util.triggerElementEvent(_this5,"cancel")}}))}},{key:"attachedCallback",value:function(){var _this6=this;this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._onDeviceBackButton.bind(this)),contentReady(this,function(){_this6._mask.addEventListener("click",_this6._boundCancel,!1)})}},{key:"detachedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this._mask.removeEventListener("click",this._boundCancel.bind(this),!1)}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$1):void("animation"===name&&this._updateAnimatorFactory())}},{key:"_mask",get:function(){return util.findChild(this,".alert-dialog-mask")}},{key:"_dialog",get:function(){return util.findChild(this,".alert-dialog")}},{key:"_titleElement",get:function(){return util.findChild(this._dialog.children[0],".alert-dialog-title")}},{key:"_contentElement",get:function(){return util.findChild(this._dialog.children[0],".alert-dialog-content")}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"cancelable",set:function(value){return util.toggleAttribute(this,"cancelable",value)},get:function(){return this.hasAttribute("cancelable")}},{key:"visible",get:function(){return this._visible}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler}}]),AlertDialogElement}(BaseElement),OnsAlertDialogElement=window.OnsAlertDialogElement=document.registerElement("ons-alert-dialog",{prototype:AlertDialogElement.prototype});OnsAlertDialogElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof AlertDialogAnimator))throw new Error('"Animator" param must inherit OnsAlertDialogElement.AlertDialogAnimator');_animatorDict[name]=Animator},OnsAlertDialogElement.AlertDialogAnimator=AlertDialogAnimator;var scheme$2={"":"back-button--*",".back-button__icon":"back-button--*__icon",".back-button__label":"back-button--*__label"},BackButtonElement=function(_BaseElement){function BackButtonElement(){return babelHelpers.classCallCheck(this,BackButtonElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BackButtonElement).apply(this,arguments))}return babelHelpers.inherits(BackButtonElement,_BaseElement),babelHelpers.createClass(BackButtonElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile()}),this._options={},this._boundOnClick=this._onClick.bind(this)}},{key:"_compile",value:function(){if(autoStyle.prepare(this),this.classList.add("back-button"),!util.findChild(this,".back-button__label")){for(var label=util.create("span.back-button__label");this.childNodes[0];)label.appendChild(this.childNodes[0]);this.appendChild(label)}if(!util.findChild(this,".back-button__icon")){var icon=util.create("span.back-button__icon");this.insertBefore(icon,this.children[0])}ModifierUtil.initModifier(this,scheme$2),this.setAttribute("_compiled","")}},{key:"_onClick",value:function(){var navigator=util.findParent(this,"ons-navigator");navigator&&navigator.popPage(this.options)}},{key:"attachedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1)}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$2):void 0}},{key:"detachedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"show",value:function(){this.style.display="inline-block"}},{key:"hide",value:function(){this.style.display="none"}},{key:"options",get:function(){
return this._options},set:function(object){this._options=object}}]),BackButtonElement}(BaseElement);window.OnsBackButtonElement=document.registerElement("ons-back-button",{prototype:BackButtonElement.prototype});var scheme$3={"":"bottom-bar--*"},BottomToolbarElement=function(_BaseElement){function BottomToolbarElement(){return babelHelpers.classCallCheck(this,BottomToolbarElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BottomToolbarElement).apply(this,arguments))}return babelHelpers.inherits(BottomToolbarElement,_BaseElement),babelHelpers.createClass(BottomToolbarElement,[{key:"createdCallback",value:function(){this.classList.add("bottom-bar"),ModifierUtil.initModifier(this,scheme$3)}},{key:"attachedCallback",value:function(){var page=util.findParent(this,"ons-page");this.parentNode!=page&&page._registerBottomToolbar(this)}},{key:"attributeChangedCallback",value:function(name,last,current){"modifier"===name&&ModifierUtil.onModifierChanged(last,current,this,scheme$3)}}]),BottomToolbarElement}(BaseElement);window.OnsBottomToolbarElement=document.registerElement("ons-bottom-toolbar",{prototype:BottomToolbarElement.prototype});var scheme$4={"":"button--*"},ButtonElement=function(_BaseElement){function ButtonElement(){return babelHelpers.classCallCheck(this,ButtonElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ButtonElement).apply(this,arguments))}return babelHelpers.inherits(ButtonElement,_BaseElement),babelHelpers.createClass(ButtonElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":ModifierUtil.onModifierChanged(last,current,this,scheme$4);break;case"ripple":this._updateRipple()}}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("button"),this._updateRipple(),ModifierUtil.initModifier(this,scheme$4),this.setAttribute("_compiled","")}},{key:"_updateRipple",value:function(){util.updateRipple(this)}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}}]),ButtonElement}(BaseElement);window.OnsButtonElement=document.registerElement("ons-button",{prototype:ButtonElement.prototype});var scheme$5={"":"carousel-item--*"},CarouselItemElement=function(_BaseElement){function CarouselItemElement(){return babelHelpers.classCallCheck(this,CarouselItemElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(CarouselItemElement).apply(this,arguments))}return babelHelpers.inherits(CarouselItemElement,_BaseElement),babelHelpers.createClass(CarouselItemElement,[{key:"createdCallback",value:function(){this.style.width="100%",ModifierUtil.initModifier(this,scheme$5)}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$5):void 0}}]),CarouselItemElement}(BaseElement);window.OnsCarouselItemElement=document.registerElement("ons-carousel-item",{prototype:CarouselItemElement.prototype});var VerticalModeTrait={_getScrollDelta:function(event){return event.gesture.deltaY},_getScrollVelocity:function(event){return event.gesture.velocityY},_getElementSize:function(){return this._currentElementSize||(this._currentElementSize=this.getBoundingClientRect().height),this._currentElementSize},_generateScrollTransform:function(scroll){return"translate3d(0px, "+-scroll+"px, 0px)"},_updateDimensionData:function(){this._style=window.getComputedStyle(this),this._dimensions=this.getBoundingClientRect()},_updateOffset:function(){if(this.centered){var height=(this._dimensions.height||0)-parseInt(this._style.paddingTop,10)-parseInt(this._style.paddingBottom,10);this._offset=-(height-this._getCarouselItemSize())/2}},_layoutCarouselItems:function(){for(var children=this._getCarouselItemElements(),sizeAttr=this._getCarouselItemSizeAttr(),sizeInfo=this._decomposeSizeString(sizeAttr),width=(this._dimensions.width||0)-parseInt(this._style.paddingLeft,10)-parseInt(this._style.paddingRight,10),i=0;i<children.length;i++)children[i].style.position="absolute",children[i].style.height=sizeAttr,children[i].style.width=width+"px",children[i].style.visibility="visible",children[i].style.top=i*sizeInfo.number+sizeInfo.unit},_setup:function(){this._updateDimensionData(),this._updateOffset(),this._layoutCarouselItems()}},HorizontalModeTrait={_getScrollDelta:function(event){return event.gesture.deltaX},_getScrollVelocity:function(event){return event.gesture.velocityX},_getElementSize:function(){return this._currentElementSize||(this._currentElementSize=this.getBoundingClientRect().width),this._currentElementSize},_generateScrollTransform:function(scroll){return"translate3d("+-scroll+"px, 0px, 0px)"},_updateDimensionData:function(){this._style=window.getComputedStyle(this),this._dimensions=this.getBoundingClientRect()},_updateOffset:function(){if(this.centered){var width=(this._dimensions.width||0)-parseInt(this._style.paddingLeft,10)-parseInt(this._style.paddingRight,10);this._offset=-(width-this._getCarouselItemSize())/2}},_layoutCarouselItems:function(){for(var children=this._getCarouselItemElements(),sizeAttr=this._getCarouselItemSizeAttr(),sizeInfo=this._decomposeSizeString(sizeAttr),height=(this._dimensions.height||0)-parseInt(this._style.paddingTop,10)-parseInt(this._style.paddingBottom,10),i=0;i<children.length;i++)children[i].style.position="absolute",children[i].style.height=height+"px",children[i].style.width=sizeAttr,children[i].style.visibility="visible",children[i].style.left=i*sizeInfo.number+sizeInfo.unit},_setup:function(){this._updateDimensionData(),this._updateOffset(),this._layoutCarouselItems()}},CarouselElement=function(_BaseElement){function CarouselElement(){return babelHelpers.classCallCheck(this,CarouselElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(CarouselElement).apply(this,arguments))}return babelHelpers.inherits(CarouselElement,_BaseElement),babelHelpers.createClass(CarouselElement,[{key:"createdCallback",value:function(){this._doorLock=new DoorLock,this._scroll=0,this._offset=0,this._lastActiveIndex=0,this._boundOnDrag=this._onDrag.bind(this),this._boundOnDragEnd=this._onDragEnd.bind(this),this._boundOnResize=this._onResize.bind(this),this._mixin(this._isVertical()?VerticalModeTrait:HorizontalModeTrait),this._setup(),this._setupInitialIndex(),this._saveLastState()}},{key:"_onResize",value:function(){this.refresh()}},{key:"_onDirectionChange",value:function(){this._isVertical()?(this.style.overflowX="auto",this.style.overflowY=""):(this.style.overflowX="",this.style.overflowY="auto"),this.refresh()}},{key:"_saveLastState",value:function(){this._lastState={elementSize:this._getCarouselItemSize(),carouselElementCount:this.itemCount,width:this._getCarouselItemSize()*this.itemCount}}},{key:"_getCarouselItemSize",value:function(){var sizeAttr=this._getCarouselItemSizeAttr(),sizeInfo=this._decomposeSizeString(sizeAttr),elementSize=this._getElementSize();if("%"===sizeInfo.unit)return Math.round(sizeInfo.number/100*elementSize);if("px"===sizeInfo.unit)return sizeInfo.number;throw new Error("Invalid state")}},{key:"_getInitialIndex",value:function(){var index=parseInt(this.getAttribute("initial-index"),10);return"number"!=typeof index||isNaN(index)?0:Math.max(Math.min(index,this.itemCount-1),0)}},{key:"_getCarouselItemSizeAttr",value:function(){var attrName="item-"+(this._isVertical()?"height":"width"),itemSizeAttr=(""+this.getAttribute(attrName)).trim();return itemSizeAttr.match(/^\d+(px|%)$/)?itemSizeAttr:"100%"}},{key:"_decomposeSizeString",value:function(size){var matches=size.match(/^(\d+)(px|%)/);return{number:parseInt(matches[1],10),unit:matches[2]}}},{key:"_setupInitialIndex",value:function(){this._scroll=(this._offset||0)+this._getCarouselItemSize()*this._getInitialIndex(),this._lastActiveIndex=this._getInitialIndex(),this._scrollTo(this._scroll)}},{key:"setActiveIndex",value:function(index){var _this2=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(options&&"object"!=("undefined"==typeof options?"undefined":babelHelpers["typeof"](options)))throw new Error("options must be an object. You supplied "+options);options.animationOptions=util.extend({duration:.3,timing:"cubic-bezier(.1, .7, .1, 1)"},options.animationOptions||{},this.hasAttribute("animation-options")?util.animationOptionsParse(this.getAttribute("animation-options")):{}),index=Math.max(0,Math.min(index,this.itemCount-1));var scroll=(this._offset||0)+this._getCarouselItemSize()*index,max=this._calculateMaxScroll();return this._scroll=Math.max(0,Math.min(max,scroll)),this._scrollTo(this._scroll,options).then(function(){return _this2._tryFirePostChangeEvent(),_this2})}},{key:"getActiveIndex",value:function(){var scroll=this._scroll-(this._offset||0),count=this.itemCount,size=this._getCarouselItemSize();if(0>scroll)return 0;var i=void 0;for(i=0;count>i;i++)if(scroll>=size*i&&size*(i+1)>scroll)return i;return i}},{key:"next",value:function(options){return this.setActiveIndex(this.getActiveIndex()+1,options)}},{key:"prev",value:function(options){return this.setActiveIndex(this.getActiveIndex()-1,options)}},{key:"_isEnabledChangeEvent",value:function(){var elementSize=this._getElementSize(),carouselItemSize=this._getCarouselItemSize();return this.autoScroll&&elementSize===carouselItemSize}},{key:"_isVertical",value:function(){return"vertical"===this.getAttribute("direction")}},{key:"_prepareEventListeners",value:function(){var _this3=this;this._gestureDetector=new GestureDetector(this,{dragMinDistance:1}),this._mutationObserver=new MutationObserver(function(){return _this3.refresh()}),this._updateSwipeable(),this._updateAutoRefresh(),window.addEventListener("resize",this._boundOnResize,!0)}},{key:"_removeEventListeners",value:function(){this._gestureDetector.dispose(),this._gestureDetector=null,this._mutationObserver.disconnect(),this._mutationObserver=null,window.removeEventListener("resize",this._boundOnResize,!0)}},{key:"_updateSwipeable",value:function(){this._gestureDetector&&(this.swipeable?(this._gestureDetector.on("drag dragleft dragright dragup dragdown swipe swipeleft swiperight swipeup swipedown",this._boundOnDrag),this._gestureDetector.on("dragend",this._boundOnDragEnd)):(this._gestureDetector.off("drag dragleft dragright dragup dragdown swipe swipeleft swiperight swipeup swipedown",this._boundOnDrag),this._gestureDetector.off("dragend",this._boundOnDragEnd)))}},{key:"_updateAutoRefresh",value:function(){this._mutationObserver&&(this.hasAttribute("auto-refresh")?this._mutationObserver.observe(this,{childList:!0}):this._mutationObserver.disconnect())}},{key:"_tryFirePostChangeEvent",value:function(){var currentIndex=this.getActiveIndex();if(this._lastActiveIndex!==currentIndex){var lastActiveIndex=this._lastActiveIndex;this._lastActiveIndex=currentIndex,util.triggerElementEvent(this,"postchange",{carousel:this,activeIndex:currentIndex,lastActiveIndex:lastActiveIndex})}}},{key:"_onDrag",value:function(event){var direction=event.gesture.direction;if((!this._isVertical()||"left"!==direction&&"right"!==direction)&&(this._isVertical()||"up"!==direction&&"down"!==direction)){event.stopPropagation(),this._lastDragEvent=event;var scroll=this._scroll-this._getScrollDelta(event);this._scrollTo(scroll),event.gesture.preventDefault(),this._tryFirePostChangeEvent()}}},{key:"_onDragEnd",value:function(event){var _this4=this;if(this._currentElementSize=void 0,this._scroll=this._scroll-this._getScrollDelta(event),0!==this._getScrollDelta(event)&&event.stopPropagation(),this._isOverScroll(this._scroll)){var waitForAction=!1;util.triggerElementEvent(this,"overscroll",{carousel:this,activeIndex:this.getActiveIndex(),direction:this._getOverScrollDirection(),waitToReturn:function(promise){waitForAction=!0,promise.then(function(){return _this4._scrollToKillOverScroll()})}}),waitForAction||this._scrollToKillOverScroll()}else this._startMomentumScroll();this._lastDragEvent=null,event.gesture.preventDefault()}},{key:"_mixin",value:function(trait){Object.keys(trait).forEach(function(key){this[key]=trait[key]}.bind(this))}},{key:"_startMomentumScroll",value:function(){if(this._lastDragEvent){var velocity=this._getScrollVelocity(this._lastDragEvent),duration=.3,scrollDelta=100*duration*velocity,scroll=this._normalizeScrollPosition(this._scroll+(this._getScrollDelta(this._lastDragEvent)>0?-scrollDelta:scrollDelta));this._scroll=scroll,animit(this._getCarouselItemElements()).queue({transform:this._generateScrollTransform(this._scroll)},{duration:duration,timing:"cubic-bezier(.1, .7, .1, 1)"}).queue(function(done){done(),this._tryFirePostChangeEvent()}.bind(this)).play()}}},{key:"_normalizeScrollPosition",value:function(scroll){var max=this._calculateMaxScroll();if(!this.autoScroll)return Math.max(0,Math.min(max,scroll));for(var arr=[],size=this._getCarouselItemSize(),nbrOfItems=this.itemCount,i=0;nbrOfItems>i;i++)i*size+this._offset<max&&arr.push(i*size+this._offset);arr.push(max),arr.sort(function(left,right){return left=Math.abs(left-scroll),right=Math.abs(right-scroll),left-right}),arr=arr.filter(function(item,pos){return!pos||item!=arr[pos-1]});var lastScroll=this._lastActiveIndex*size+this._offset,scrollRatio=Math.abs(scroll-lastScroll)/size,result=arr[0];return scrollRatio<=this.autoScrollRatio?result=lastScroll:1>scrollRatio&&arr[0]===lastScroll&&arr.length>1&&(result=arr[1]),Math.max(0,Math.min(max,result))}},{key:"_getCarouselItemElements",value:function(){return util.arrayFrom(this.children).filter(function(child){return"ons-carousel-item"===child.nodeName.toLowerCase()})}},{key:"_scrollTo",value:function(scroll){var _this5=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],isOverscrollable=this.overscrollable,normalizeScroll=function(scroll){var ratio=.35;if(0>scroll)return isOverscrollable?Math.round(scroll*ratio):0;var maxScroll=_this5._calculateMaxScroll();return scroll>maxScroll?isOverscrollable?maxScroll+Math.round((scroll-maxScroll)*ratio):maxScroll:scroll};return new Promise(function(resolve){animit(_this5._getCarouselItemElements()).queue({transform:_this5._generateScrollTransform(normalizeScroll(scroll))},"none"!==options.animation?options.animationOptions:{}).play(function(){options.callback instanceof Function&&options.callback(),resolve()})})}},{key:"_calculateMaxScroll",value:function(){var max=this.itemCount*this._getCarouselItemSize()-this._getElementSize();return Math.ceil(0>max?0:max)}},{key:"_isOverScroll",value:function(scroll){return 0>scroll||scroll>this._calculateMaxScroll()}},{key:"_getOverScrollDirection",value:function(){return this._isVertical()?this._scroll<=0?"up":"down":this._scroll<=0?"left":"right"}},{key:"_scrollToKillOverScroll",value:function(){var duration=.4;if(this._scroll<0)return animit(this._getCarouselItemElements()).queue({transform:this._generateScrollTransform(0)},{duration:duration,timing:"cubic-bezier(.1, .4, .1, 1)"}).queue(function(done){done(),this._tryFirePostChangeEvent()}.bind(this)).play(),void(this._scroll=0);var maxScroll=this._calculateMaxScroll();return maxScroll<this._scroll?(animit(this._getCarouselItemElements()).queue({transform:this._generateScrollTransform(maxScroll)},{duration:duration,timing:"cubic-bezier(.1, .4, .1, 1)"}).queue(function(done){done(),this._tryFirePostChangeEvent()}.bind(this)).play(),void(this._scroll=maxScroll)):void 0}},{key:"refresh",value:function(){if(0!==this._getCarouselItemSize()){if(this._mixin(this._isVertical()?VerticalModeTrait:HorizontalModeTrait),this._setup(),this._lastState&&this._lastState.width>0){var scroll=this._scroll;this._isOverScroll(scroll)?this._scrollToKillOverScroll():(this.autoScroll&&(scroll=this._normalizeScrollPosition(scroll)),this._scrollTo(scroll))}this._saveLastState(),util.triggerElementEvent(this,"refresh",{carousel:this})}}},{key:"first",value:function(options){return this.setActiveIndex(0,options)}},{key:"last",value:function(options){this.setActiveIndex(Math.max(this.itemCount-1,0),options)}},{key:"attachedCallback",value:function(){var _this6=this;this._prepareEventListeners(),this._setup(),this._setupInitialIndex(),this._saveLastState(),0===this.offsetHeight&&setImmediate(function(){return _this6.refresh()})}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"swipeable":this._updateSwipeable();break;case"auto-refresh":this._updateAutoRefresh();break;case"direction":this._onDirectionChange()}}},{key:"detachedCallback",value:function(){this._removeEventListeners()}},{key:"itemCount",get:function(){return this._getCarouselItemElements().length}},{key:"autoScrollRatio",get:function(){var attr=this.getAttribute("auto-scroll-ratio");if(!attr)return.5;var scrollRatio=parseFloat(attr);if(0>scrollRatio||scrollRatio>1)throw new Error("Invalid ratio.");return isNaN(scrollRatio)?.5:scrollRatio},set:function(ratio){if(0>ratio||ratio>1)throw new Error("Invalid ratio.");this.setAttribute("auto-scroll-ratio",ratio)}},{key:"swipeable",get:function(){return this.hasAttribute("swipeable")},set:function(value){return util.toggleAttribute(this,"swipeable",value)}},{key:"autoScroll",get:function(){return this.hasAttribute("auto-scroll")},set:function(value){return util.toggleAttribute(this,"auto-scroll",value)}},{key:"disabled",get:function(){return this.hasAttribute("disabled")},set:function(value){return util.toggleAttribute(this,"disabled",value)}},{key:"overscrollable",get:function(){return this.hasAttribute("overscrollable")},set:function(value){return util.toggleAttribute(this,"overscrollable",value)}},{key:"centered",get:function(){return this.hasAttribute("centered")},set:function(value){return util.toggleAttribute(this,"centered",value)}}]),CarouselElement}(BaseElement);window.OnsCarouselElement=document.registerElement("ons-carousel",{prototype:CarouselElement.prototype});var ColumnElement=function(_BaseElement){function ColumnElement(){return babelHelpers.classCallCheck(this,ColumnElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ColumnElement).apply(this,arguments))}return babelHelpers.inherits(ColumnElement,_BaseElement),babelHelpers.createClass(ColumnElement,[{key:"createdCallback",value:function(){this.getAttribute("width")&&this._updateWidth()}},{key:"attributeChangedCallback",value:function(name,last,current){"width"===name&&this._updateWidth()}},{key:"_updateWidth",value:function(){var width=this.getAttribute("width");"string"==typeof width&&(width=(""+width).trim(),width=width.match(/^\d+$/)?width+"%":width,this.style.webkitBoxFlex="0",this.style.webkitFlex="0 0 "+width,this.style.mozBoxFlex="0",this.style.mozFlex="0 0 "+width,this.style.msFlex="0 0 "+width,this.style.flex="0 0 "+width,this.style.maxWidth=width)}}]),ColumnElement}(BaseElement);window.OnsColElement=document.registerElement("ons-col",{prototype:ColumnElement.prototype});var DialogAnimator=function(){function DialogAnimator(){var _ref=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref$timing=_ref.timing,timing=void 0===_ref$timing?"linear":_ref$timing,_ref$delay=_ref.delay,delay=void 0===_ref$delay?0:_ref$delay,_ref$duration=_ref.duration,duration=void 0===_ref$duration?.2:_ref$duration;babelHelpers.classCallCheck(this,DialogAnimator),this.timing=timing,this.delay=delay,this.duration=duration}return babelHelpers.createClass(DialogAnimator,[{key:"show",value:function(dialog,done){done()}},{key:"hide",value:function(dialog,done){done()}}]),DialogAnimator}(),AndroidDialogAnimator=function(_DialogAnimator){function AndroidDialogAnimator(){var _ref2=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref2$timing=_ref2.timing,timing=void 0===_ref2$timing?"ease-in-out":_ref2$timing,_ref2$delay=_ref2.delay,delay=void 0===_ref2$delay?0:_ref2$delay,_ref2$duration=_ref2.duration,duration=void 0===_ref2$duration?.3:_ref2$duration;return babelHelpers.classCallCheck(this,AndroidDialogAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(AndroidDialogAnimator).call(this,{timing:timing,delay:delay,duration:duration}))}return babelHelpers.inherits(AndroidDialogAnimator,_DialogAnimator),babelHelpers.createClass(AndroidDialogAnimator,[{key:"show",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -60%, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -50%, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"hide",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -50%, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -60%, 0)",opacity:0},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}}]),AndroidDialogAnimator}(DialogAnimator),IOSDialogAnimator=function(_DialogAnimator2){function IOSDialogAnimator(){var _ref3=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref3$timing=_ref3.timing,timing=void 0===_ref3$timing?"ease-in-out":_ref3$timing,_ref3$delay=_ref3.delay,delay=void 0===_ref3$delay?0:_ref3$delay,_ref3$duration=_ref3.duration,duration=void 0===_ref3$duration?.3:_ref3$duration;return babelHelpers.classCallCheck(this,IOSDialogAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSDialogAnimator).call(this,{timing:timing,delay:delay,duration:duration}))}return babelHelpers.inherits(IOSDialogAnimator,_DialogAnimator2),babelHelpers.createClass(IOSDialogAnimator,[{key:"show",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, 300%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, -50%, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"hide",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3d(-50%, -50%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-50%, 300%, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}}]),IOSDialogAnimator}(DialogAnimator),SlideDialogAnimator=function(_DialogAnimator3){function SlideDialogAnimator(){var _ref4=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_ref4$timing=_ref4.timing,timing=void 0===_ref4$timing?"cubic-bezier(.1, .7, .4, 1)":_ref4$timing,_ref4$delay=_ref4.delay,delay=void 0===_ref4$delay?0:_ref4$delay,_ref4$duration=_ref4.duration,duration=void 0===_ref4$duration?.2:_ref4$duration;return babelHelpers.classCallCheck(this,SlideDialogAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SlideDialogAnimator).call(this,{timing:timing,delay:delay,duration:duration}))}return babelHelpers.inherits(SlideDialogAnimator,_DialogAnimator3),babelHelpers.createClass(SlideDialogAnimator,[{key:"show",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3D(-50%, -350%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(-50%, -50%, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"hide",value:function(dialog,callback){callback=callback?callback:function(){},animit.runAll(animit(dialog._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}),animit(dialog._dialog).saveStyle().queue({css:{transform:"translate3D(-50%, -50%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(-50%, -350%, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}}]),SlideDialogAnimator}(DialogAnimator),scheme$6={".dialog":"dialog--*",".dialog-container":"dialog-container--*",".dialog-mask":"dialog-mask--*"},templateSource=util.createElement('\n  <div>\n    <div class="dialog-mask"></div>\n    <div class="dialog">\n      <div class="dialog-container"></div>\n    </div>\n  </div>\n'),_animatorDict$1={"default":function(){return platform.isAndroid()?AndroidDialogAnimator:IOSDialogAnimator},fade:function(){return platform.isAndroid()?AndroidDialogAnimator:IOSDialogAnimator},slide:SlideDialogAnimator,none:DialogAnimator},DialogElement=function(_BaseElement){function DialogElement(){return babelHelpers.classCallCheck(this,DialogElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(DialogElement).apply(this,arguments))}return babelHelpers.inherits(DialogElement,_BaseElement),babelHelpers.createClass(DialogElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){return _this2._compile()}),this._visible=!1,this._doorLock=new DoorLock,this._boundCancel=this._cancel.bind(this),this._updateAnimatorFactory()}},{key:"_updateAnimatorFactory",value:function(){this._animatorFactory=new AnimatorFactory({animators:_animatorDict$1,baseClass:DialogAnimator,baseClassName:"DialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(autoStyle.prepare(this),this.style.display="none",!this._dialog){for(var template=templateSource.cloneNode(!0),dialog=template.children[1];this.firstChild;)dialog.children[0].appendChild(this.firstChild);for(;template.firstChild;)this.appendChild(template.firstChild);this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,this.setAttribute("status-bar-fill",""),ModifierUtil.initModifier(this,scheme$6)}}},{key:"_onDeviceBackButton",value:function(event){this.cancelable?this._cancel():event.callParentHandler()}},{key:"_cancel",value:function(){var _this3=this;this.cancelable&&!this._running&&(this._running=!0,this.hide({callback:function(){_this3._running=!1,util.triggerElementEvent(_this3,"cancel")}}))}},{key:"show",value:function(){var _this4=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_cancel2=!1,callback=options.callback||function(){};if(options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"))),util.triggerElementEvent(this,"preshow",{dialog:this,cancel:function(){_cancel2=!0}}),_cancel2)return Promise.reject("Canceled in preshow event.");var _ret=function(){var tryShow=function(){var unlock=_this4._doorLock.lock(),animator=_this4._animatorFactory.newAnimator(options);return _this4.style.display="block",_this4._mask.style.opacity="1",new Promise(function(resolve){contentReady(_this4,function(){animator.show(_this4,function(){_this4._visible=!0,unlock(),util.triggerElementEvent(_this4,"postshow",{dialog:_this4}),callback(),resolve(_this4)})})})};return{v:new Promise(function(resolve){_this4._doorLock.waitUnlock(function(){return resolve(tryShow())})})}}();return"object"===("undefined"==typeof _ret?"undefined":babelHelpers["typeof"](_ret))?_ret.v:void 0}},{key:"hide",value:function(){var _this5=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],_cancel3=!1,callback=options.callback||function(){};if(options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"))),util.triggerElementEvent(this,"prehide",{dialog:this,cancel:function(){_cancel3=!0}}),_cancel3)return Promise.reject("Canceled in prehide event.");var _ret2=function(){var tryHide=function(){var unlock=_this5._doorLock.lock(),animator=_this5._animatorFactory.newAnimator(options);return new Promise(function(resolve){contentReady(_this5,function(){animator.hide(_this5,function(){_this5.style.display="none",_this5._visible=!1,unlock(),util.triggerElementEvent(_this5,"posthide",{dialog:_this5}),callback(),resolve(_this5)})})})};return{v:new Promise(function(resolve){_this5._doorLock.waitUnlock(function(){return resolve(tryHide())})})}}();return"object"===("undefined"==typeof _ret2?"undefined":babelHelpers["typeof"](_ret2))?_ret2.v:void 0}},{key:"attachedCallback",value:function(){var _this6=this;this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._onDeviceBackButton.bind(this)),contentReady(this,function(){_this6._mask.addEventListener("click",_this6._boundCancel,!1)})}},{key:"detachedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this._mask.removeEventListener("click",this._boundCancel.bind(this),!1)}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$6):void("animation"===name&&this._updateAnimatorFactory())}},{key:"_mask",get:function(){return util.findChild(this,".dialog-mask")}},{key:"_dialog",get:function(){return util.findChild(this,".dialog")}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler}},{key:"visible",get:function(){return this._visible}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"cancelable",set:function(value){return util.toggleAttribute(this,"cancelable",value)},get:function(){return this.hasAttribute("cancelable")}}]),DialogElement}(BaseElement),OnsDialogElement=window.OnsDialogElement=document.registerElement("ons-dialog",{prototype:DialogElement.prototype});OnsDialogElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof DialogAnimator))throw new Error('"Animator" param must inherit OnsDialogElement.DialogAnimator');_animatorDict$1[name]=Animator},OnsDialogElement.DialogAnimator=DialogAnimator;var scheme$7={"":"fab--*"},FabElement=function(_BaseElement){function FabElement(){return babelHelpers.classCallCheck(this,FabElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(FabElement).apply(this,arguments))}return babelHelpers.inherits(FabElement,_BaseElement),babelHelpers.createClass(FabElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2._compile()})}},{key:"_compile",value:function(){if(autoStyle.prepare(this),!this.classList.contains("fab")){this.classList.add("fab");var content=document.createElement("span");content.classList.add("fab__icon"),util.arrayFrom(this.childNodes).forEach(function(element){element.tagName&&"ons-ripple"===element.tagName.toLowerCase()||content.appendChild(element)}),this.appendChild(content),this._updateRipple(),ModifierUtil.initModifier(this,scheme$7),this._updatePosition(),this.hide()}}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":ModifierUtil.onModifierChanged(last,current,this,scheme$7);break;case"ripple":this._updateRipple();break;case"position":this._updatePosition()}}},{key:"_show",value:function(){this.show()}},{key:"_hide",value:function(){this.hide()}},{key:"_updateRipple",value:function(){util.updateRipple(this)}},{key:"_updatePosition",value:function(){var position=this.getAttribute("position");switch(this.classList.remove("fab--top__left","fab--bottom__right","fab--bottom__left","fab--top__right","fab--top__center","fab--bottom__center"),
position){case"top right":case"right top":this.classList.add("fab--top__right");break;case"top left":case"left top":this.classList.add("fab--top__left");break;case"bottom right":case"right bottom":this.classList.add("fab--bottom__right");break;case"bottom left":case"left bottom":this.classList.add("fab--bottom__left");break;case"center top":case"top center":this.classList.add("fab--top__center");break;case"center bottom":case"bottom center":this.classList.add("fab--bottom__center")}}},{key:"show",value:function(){arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.style.transform="scale(1)",this.style.webkitTransform="scale(1)"}},{key:"hide",value:function(){arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.style.transform="scale(0)",this.style.webkitTransform="scale(0)"}},{key:"toggle",value:function(){this.visible?this.hide():this.show()}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"visible",get:function(){return"scale(1)"===this.style.transform&&"none"!==this.style.display}}]),FabElement}(BaseElement);window.OnsFabElement=document.registerElement("ons-fab",{prototype:FabElement.prototype});var GestureDetectorElement=function(_BaseElement){function GestureDetectorElement(){return babelHelpers.classCallCheck(this,GestureDetectorElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(GestureDetectorElement).apply(this,arguments))}return babelHelpers.inherits(GestureDetectorElement,_BaseElement),babelHelpers.createClass(GestureDetectorElement,[{key:"createdCallback",value:function(){this._gestureDetector=new GestureDetector(this)}}]),GestureDetectorElement}(BaseElement);window.OnsGestureDetectorElement=document.registerElement("ons-gesture-detector",{prototype:GestureDetectorElement.prototype});var IconElement=function(_BaseElement){function IconElement(){return babelHelpers.classCallCheck(this,IconElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IconElement).apply(this,arguments))}return babelHelpers.inherits(IconElement,_BaseElement),babelHelpers.createClass(IconElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"attributeChangedCallback",value:function(name,last,current){-1!==["icon","size","modifier"].indexOf(name)&&this._update()}},{key:"_compile",value:function(){autoStyle.prepare(this),this._update(),this.setAttribute("_compiled","")}},{key:"_update",value:function(){var _this2=this;this._cleanClassAttribute();var _buildClassAndStyle2=this._buildClassAndStyle(this._getAttribute("icon"),this._getAttribute("size")),classList=_buildClassAndStyle2.classList,style=_buildClassAndStyle2.style;util.extend(this.style,style),classList.forEach(function(className){return _this2.classList.add(className)})}},{key:"_getAttribute",value:function(attr){var parts=(this.getAttribute(attr)||"").split(/\s*,\s*/),def=parts[0],md=parts[1];return md=(md||"").split(/\s*:\s*/),(util.hasModifier(this,md[0])?md[1]:def)||""}},{key:"_cleanClassAttribute",value:function(){var _this3=this;util.arrayFrom(this.classList).filter(function(className){return/^(fa$|fa-|ion-|zmdi-)/.test(className)}).forEach(function(className){return _this3.classList.remove(className)}),this.classList.remove("zmdi"),this.classList.remove("ons-icon--ion")}},{key:"_buildClassAndStyle",value:function(iconName,size){var classList=["ons-icon"],style={};return 0===iconName.indexOf("ion-")?(classList.push(iconName),classList.push("ons-icon--ion")):0===iconName.indexOf("fa-")?(classList.push(iconName),classList.push("fa")):0===iconName.indexOf("md-")?(classList.push("zmdi"),classList.push("zmdi-"+iconName.split(/\-(.+)?/)[1])):(classList.push("fa"),classList.push("fa-"+iconName)),size.match(/^[1-5]x|lg$/)?(classList.push("fa-"+size),this.style.removeProperty("font-size")):style.fontSize=size,{classList:classList,style:style}}}]),IconElement}(BaseElement);window.OnsIconElement=document.registerElement("ons-icon",{prototype:IconElement.prototype});var LazyRepeatElement=function(_BaseElement){function LazyRepeatElement(){return babelHelpers.classCallCheck(this,LazyRepeatElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(LazyRepeatElement).apply(this,arguments))}return babelHelpers.inherits(LazyRepeatElement,_BaseElement),babelHelpers.createClass(LazyRepeatElement,[{key:"createdCallback",value:function(){this.style.display="none"}},{key:"attachedCallback",value:function(){util.updateParentPosition(this),this.hasAttribute("delegate")&&(this.delegate=window[this.getAttribute("delegate")])}},{key:"refresh",value:function(){this._lazyRepeatProvider&&this._lazyRepeatProvider.refresh()}},{key:"attributeChangedCallback",value:function(name,last,current){}},{key:"detachedCallback",value:function(){this._lazyRepeatProvider&&(this._lazyRepeatProvider.destroy(),this._lazyRepeatProvider=null)}},{key:"delegate",set:function(userDelegate){this._lazyRepeatProvider&&this._lazyRepeatProvider.destroy(),!this._templateElement&&this.children[0]&&(this._templateElement=this.removeChild(this.children[0]));var delegate=new LazyRepeatDelegate(userDelegate,this._templateElement||null);this._lazyRepeatProvider=new LazyRepeatProvider(this.parentElement,delegate)},get:function(){throw new Error("This property can only be used to set the delegate object.")}}]),LazyRepeatElement}(BaseElement);window.OnsLazyRepeatElement=document.registerElement("ons-lazy-repeat",{prototype:LazyRepeatElement.prototype});var scheme$8={"":"list__header--*"},ListHeaderElement=function(_BaseElement){function ListHeaderElement(){return babelHelpers.classCallCheck(this,ListHeaderElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ListHeaderElement).apply(this,arguments))}return babelHelpers.inherits(ListHeaderElement,_BaseElement),babelHelpers.createClass(ListHeaderElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("list__header"),ModifierUtil.initModifier(this,scheme$8),this.setAttribute("_compiled","")}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$8):void 0}}]),ListHeaderElement}(BaseElement);window.OnsListHeaderElement=document.registerElement("ons-list-header",{prototype:ListHeaderElement.prototype});var scheme$9={".list__item":"list__item--*",".list__item__left":"list__item--*__left",".list__item__center":"list__item--*__center",".list__item__right":"list__item--*__right",".list__item__label":"list__item--*__label",".list__item__title":"list__item--*__title",".list__item__subtitle":"list__item--*__subtitle",".list__item__thumbnail":"list__item--*__thumbnail",".list__item__icon":"list__item--*__icon"},ListItemElement=function(_BaseElement){function ListItemElement(){return babelHelpers.classCallCheck(this,ListItemElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ListItemElement).apply(this,arguments))}return babelHelpers.inherits(ListItemElement,_BaseElement),babelHelpers.createClass(ListItemElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2._compile()})}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("list__item");for(var left=void 0,center=void 0,right=void 0,i=0;i<this.children.length;i++){var el=this.children[i];el.classList.contains("left")?(el.classList.add("list__item__left"),left=el):el.classList.contains("center")?center=el:el.classList.contains("right")&&(el.classList.add("list__item__right"),right=el)}if(!center){if(center=document.createElement("div"),left||right)for(var i=this.childNodes.length-1;i>=0;i--){var el=this.childNodes[i];el!==left&&el!==right&&center.insertBefore(el,center.firstChild)}else for(;this.childNodes[0];)center.appendChild(this.childNodes[0]);this.insertBefore(center,right||null)}center.classList.add("center"),center.classList.add("list__item__center"),this._updateRipple(),ModifierUtil.initModifier(this,scheme$9)}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":ModifierUtil.onModifierChanged(last,current,this,scheme$9);break;case"ripple":this._updateRipple()}}},{key:"attachedCallback",value:function(){this.addEventListener("drag",this._onDrag),this.addEventListener("touchstart",this._onTouch),this.addEventListener("mousedown",this._onTouch),this.addEventListener("touchend",this._onRelease),this.addEventListener("touchmove",this._onRelease),this.addEventListener("touchcancel",this._onRelease),this.addEventListener("mouseup",this._onRelease),this.addEventListener("mouseout",this._onRelease),this.addEventListener("touchleave",this._onRelease),this._originalBackgroundColor=this.style.backgroundColor,this.tapped=!1}},{key:"detachedCallback",value:function(){this.removeEventListener("drag",this._onDrag),this.removeEventListener("touchstart",this._onTouch),this.removeEventListener("mousedown",this._onTouch),this.removeEventListener("touchend",this._onRelease),this.removeEventListener("touchmove",this._onRelease),this.removeEventListener("touchcancel",this._onRelease),this.removeEventListener("mouseup",this._onRelease),this.removeEventListener("mouseout",this._onRelease),this.removeEventListener("touchleave",this._onRelease)}},{key:"_updateRipple",value:function(){util.updateRipple(this)}},{key:"_onDrag",value:function(event){var gesture=event.gesture;this._shouldLockOnDrag()&&["left","right"].indexOf(gesture.direction)>-1&&gesture.preventDefault()}},{key:"_onTouch",value:function(){this.tapped||(this.tapped=!0,this.style.transition=this._transition,this.style.webkitTransition=this._transition,this.style.MozTransition=this._transition,this._tappable&&(this.style.backgroundColor&&(this._originalBackgroundColor=this.style.backgroundColor),this.style.backgroundColor=this._tapBackgroundColor,this.style.boxShadow="0px -1px 0px 0px "+this._tapBackgroundColor))}},{key:"_onRelease",value:function(){this.tapped=!1,this.style.transition="",this.style.webkitTransition="",this.style.MozTransition="",this.style.backgroundColor=this._originalBackgroundColor||"",this.style.boxShadow=""}},{key:"_shouldLockOnDrag",value:function(){return this.hasAttribute("lock-on-drag")}},{key:"_transition",get:function(){return"background-color 0.0s linear 0.02s, box-shadow 0.0s linear 0.02s"}},{key:"_tappable",get:function(){return this.hasAttribute("tappable")}},{key:"_tapBackgroundColor",get:function(){return this.getAttribute("tap-background-color")||"#d9d9d9"}}]),ListItemElement}(BaseElement);window.OnsListItemElement=document.registerElement("ons-list-item",{prototype:ListItemElement.prototype});var scheme$10={"":"list--*"},ListElement=function(_BaseElement){function ListElement(){return babelHelpers.classCallCheck(this,ListElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ListElement).apply(this,arguments))}return babelHelpers.inherits(ListElement,_BaseElement),babelHelpers.createClass(ListElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("list"),ModifierUtil.initModifier(this,scheme$10),this.setAttribute("_compiled","")}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$10):void 0}}]),ListElement}(BaseElement);window.OnsListElement=document.registerElement("ons-list",{prototype:ListElement.prototype});var scheme$11={".text-input":"text-input--*",".text-input__label":"text-input--*__label",".radio-button":"radio-button--*",".radio-button__input":"radio-button--*__input",".radio-button__checkmark":"radio-button--*__checkmark",".checkbox":"checkbox--*",".checkbox__input":"checkbox--*__input",".checkbox__checkmark":"checkbox--*__checkmark"},INPUT_ATTRIBUTES=["autocapitalize","autocomplete","autocorrect","autofocus","disabled","inputmode","max","maxlength","min","minlength","name","pattern","placeholder","readonly","size","step","type","validator","value"],InputElement=function(_BaseElement){function InputElement(){return babelHelpers.classCallCheck(this,InputElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(InputElement).apply(this,arguments))}return babelHelpers.inherits(InputElement,_BaseElement),babelHelpers.createClass(InputElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2._compile(),_this2.attributeChangedCallback("checked",null,_this2.getAttribute("checked"))}),this._boundOnInput=this._onInput.bind(this),this._boundOnFocusin=this._onFocusin.bind(this),this._boundOnFocusout=this._onFocusout.bind(this),this._boundDelegateEvent=this._delegateEvent.bind(this)}},{key:"_compile",value:function(){if(autoStyle.prepare(this),0===this.children.length){var helper=document.createElement("span");helper.classList.add("_helper");var container=document.createElement("label");container.appendChild(document.createElement("input")),container.appendChild(helper);var label=document.createElement("span");switch(label.classList.add("input-label"),util.arrayFrom(this.childNodes).forEach(function(element){return label.appendChild(element)}),this.hasAttribute("content-left")?container.insertBefore(label,container.firstChild):container.appendChild(label),this.appendChild(container),this.getAttribute("type")){case"checkbox":this.classList.add("checkbox"),this._input.classList.add("checkbox__input"),this._helper.classList.add("checkbox__checkmark"),this._updateBoundAttributes();break;case"radio":this.classList.add("radio-button"),this._input.classList.add("radio-button__input"),this._helper.classList.add("radio-button__checkmark"),this._updateBoundAttributes();break;default:this._input.classList.add("text-input"),this._helper.classList.add("text-input__label"),this._input.parentElement.classList.add("text-input__container"),this._updateLabel(),this._updateLabelColor(),this._updateBoundAttributes(),this._updateLabelClass()}this.hasAttribute("input-id")&&(this._input.id=this.getAttribute("input-id")),ModifierUtil.initModifier(this,scheme$11)}}},{key:"attributeChangedCallback",value:function(name,last,current){var _this3=this;if("modifier"===name)return ModifierUtil.onModifierChanged(last,current,this,scheme$11);if("placeholder"===name)return contentReady(this,function(){return _this3._updateLabel()});if("input-id"===name&&contentReady(this,function(){return _this3._input.id=current}),"checked"===name)this.checked=null!==current;else if(INPUT_ATTRIBUTES.indexOf(name)>=0)return contentReady(this,function(){return _this3._updateBoundAttributes()})}},{key:"attachedCallback",value:function(){"checkbox"!==this.type&&"radio"!==this.type&&(this.addEventListener("input",this._boundOnInput),this.addEventListener("focusin",this._boundOnFocusin),this.addEventListener("focusout",this._boundOnFocusout)),this.addEventListener("focus",this._boundDelegateEvent),this.addEventListener("blur",this._boundDelegateEvent)}},{key:"detachedCallback",value:function(){this.removeEventListener("input",this._boundOnInput),this.removeEventListener("focusin",this._boundOnFocusin),this.removeEventListener("focusout",this._boundOnFocusout),this.removeEventListener("focus",this._boundDelegateEvent),this.removeEventListener("blur",this._boundDelegateEvent)}},{key:"_setLabel",value:function(value){"undefined"!=typeof this._helper.textContent?this._helper.textContent=value:this._helper.innerText=value}},{key:"_updateLabel",value:function(){this._setLabel(this.hasAttribute("placeholder")?this.getAttribute("placeholder"):"")}},{key:"_updateBoundAttributes",value:function(){var _this4=this;INPUT_ATTRIBUTES.forEach(function(attr){_this4.hasAttribute(attr)?_this4._input.setAttribute(attr,_this4.getAttribute(attr)):_this4._input.removeAttribute(attr)})}},{key:"_updateLabelColor",value:function(){this.value.length>0&&this._input===document.activeElement?this._helper.style.color="":this._helper.style.color="rgba(0, 0, 0, 0.5)"}},{key:"_updateLabelClass",value:function(){""===this.value?this._helper.classList.remove("text-input__label--active"):this._helper.classList.add("text-input__label--active")}},{key:"_delegateEvent",value:function(event){var e=new CustomEvent(event.type,{bubbles:!1,cancelable:!0});return this.dispatchEvent(e)}},{key:"_onInput",value:function(event){this._updateLabelClass(),this._updateLabelColor()}},{key:"_onFocusin",value:function(event){this._updateLabelClass(),this._updateLabelColor()}},{key:"_onFocusout",value:function(event){this._updateLabelColor()}},{key:"_input",get:function(){return this.querySelector("input")}},{key:"_helper",get:function(){return this.querySelector("._helper")}},{key:"value",get:function(){return null===this._input?this.getAttribute("value"):this._input.value},set:function(val){var _this5=this;return this.setAttribute("value",val),contentReady(this,function(){_this5._input.value=val,_this5._onInput()}),val}},{key:"checked",get:function(){return this._input.checked},set:function(val){var _this6=this;contentReady(this,function(){_this6._input.checked=val})}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"_isTextInput",get:function(){return"radio"!==this.type&&"checkbox"!==this.type}},{key:"type",get:function(){return this.getAttribute("type")}}]),InputElement}(BaseElement);window.OnsInputElement=document.registerElement("ons-input",{prototype:InputElement.prototype});var ModalAnimator=function(){function ModalAnimator(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];babelHelpers.classCallCheck(this,ModalAnimator),this.delay=0,this.duration=.2,this.timing=options.timing||this.timing,this.duration=void 0!==options.duration?options.duration:this.duration,this.delay=void 0!==options.delay?options.delay:this.delay}return babelHelpers.createClass(ModalAnimator,[{key:"show",value:function(modal,callback){callback()}},{key:"hide",value:function(modal,callback){callback()}}]),ModalAnimator}(),FadeModalAnimator=function(_ModalAnimator){function FadeModalAnimator(options){return babelHelpers.classCallCheck(this,FadeModalAnimator),options.timing=options.timing||"linear",options.duration=options.duration||"0.3",options.delay=options.delay||0,babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(FadeModalAnimator).call(this,options))}return babelHelpers.inherits(FadeModalAnimator,_ModalAnimator),babelHelpers.createClass(FadeModalAnimator,[{key:"show",value:function(modal,callback){callback=callback?callback:function(){},animit(modal).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}).play()}},{key:"hide",value:function(modal,callback){callback=callback?callback:function(){},animit(modal).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}).play()}}]),FadeModalAnimator}(ModalAnimator),scheme$12={"":"modal--*",modal__content:"modal--*__content"},_animatorDict$2={"default":ModalAnimator,fade:FadeModalAnimator,none:ModalAnimator},ModalElement=function(_BaseElement){function ModalElement(){return babelHelpers.classCallCheck(this,ModalElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ModalElement).apply(this,arguments))}return babelHelpers.inherits(ModalElement,_BaseElement),babelHelpers.createClass(ModalElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile(),this._doorLock=new DoorLock,this._animatorFactory=new AnimatorFactory({animators:_animatorDict$2,baseClass:ModalAnimator,baseClassName:"ModalAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_onDeviceBackButton",value:function(){}},{key:"_compile",value:function(){this.style.display="none",this.classList.add("modal");var wrapper=document.createElement("div");for(wrapper.classList.add("modal__content");this.childNodes[0];){var node=this.childNodes[0];this.removeChild(node),wrapper.insertBefore(node,null)}this.appendChild(wrapper),ModifierUtil.initModifier(this,scheme$12),this.setAttribute("_compiled","")}},{key:"detachedCallback",value:function(){this._backButtonHandler&&this._backButtonHandler.destroy()}},{key:"attachedCallback",value:function(){setImmediate(this._ensureNodePosition.bind(this)),this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._onDeviceBackButton.bind(this))}},{key:"_ensureNodePosition",value:function(){if(this.parentNode&&!this.hasAttribute("inline")&&"ons-page"!==this.parentNode.nodeName.toLowerCase()){for(var page=this;;){if(page=page.parentNode,!page)return;if("ons-page"===page.nodeName.toLowerCase())break}page._registerExtraElement(this)}}},{key:"show",value:function(){var _this2=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options")));var callback=options.callback||function(){},tryShow=function(){var unlock=_this2._doorLock.lock(),animator=_this2._animatorFactory.newAnimator(options);return _this2.style.display="table",new Promise(function(resolve){animator.show(_this2,function(){unlock(),callback(),resolve(_this2)})})};return new Promise(function(resolve){_this2._doorLock.waitUnlock(function(){return resolve(tryShow())})})}},{key:"toggle",value:function(){return this.visible?this.hide.apply(this,arguments):this.show.apply(this,arguments)}},{key:"hide",value:function(){var _this3=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options")));var callback=options.callback||function(){},tryHide=function(){var unlock=_this3._doorLock.lock(),animator=_this3._animatorFactory.newAnimator(options);return new Promise(function(resolve){animator.hide(_this3,function(){_this3.style.display="none",unlock(),callback(),resolve(_this3)})})};return new Promise(function(resolve){_this3._doorLock.waitUnlock(function(){return resolve(tryHide())})})}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$12):void 0}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(handler){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,handler),this._onDeviceBackButton=handler}},{key:"visible",get:function(){return"none"!==this.style.display}}]),ModalElement}(BaseElement);window.OnsModalElement=document.registerElement("ons-modal",{prototype:ModalElement.prototype}),window.OnsModalElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof ModalAnimator))throw new Error('"Animator" param must inherit OnsModalElement.ModalAnimator');_animatorDict$2[name]=Animator},window.OnsModalElement.ModalAnimator=ModalAnimator;var NavigatorTransitionAnimator=function(){function NavigatorTransitionAnimator(options){babelHelpers.classCallCheck(this,NavigatorTransitionAnimator),options=util.extend({timing:"linear",duration:"0.4",delay:"0"},options||{}),this.timing=options.timing,this.duration=options.duration,this.delay=options.delay}return babelHelpers.createClass(NavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){callback()}},{key:"pop",value:function(enterPage,leavePage,callback){callback()}}]),NavigatorTransitionAnimator}(),IOSSlideNavigatorTransitionAnimator=function(_NavigatorTransitionA){function IOSSlideNavigatorTransitionAnimator(options){babelHelpers.classCallCheck(this,IOSSlideNavigatorTransitionAnimator),options=util.extend({duration:.4,timing:"cubic-bezier(.1, .7, .1, 1)",delay:0},options||{});var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSSlideNavigatorTransitionAnimator).call(this,options));return _this.backgroundMask=util.createElement('\n      <div style="position: absolute; width: 100%; height: 100%;\n        background-color: black; opacity: 0; z-index: 2"></div>\n    '),_this}return babelHelpers.inherits(IOSSlideNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(IOSSlideNavigatorTransitionAnimator,[{key:"_decompose",value:function(page){CustomElements.upgrade(page);var toolbar=page._getToolbarElement();CustomElements.upgrade(toolbar);var left=toolbar._getToolbarLeftItemsElement(),right=toolbar._getToolbarRightItemsElement(),excludeBackButtonLabel=function(elements){for(var result=[],i=0;i<elements.length;i++)if("ons-back-button"===elements[i].nodeName.toLowerCase()){var iconElement=elements[i].querySelector(".back-button__icon");iconElement&&result.push(iconElement)}else result.push(elements[i]);return result},other=[].concat(0===left.children.length?left:excludeBackButtonLabel(left.children)).concat(0===right.children.length?right:excludeBackButtonLabel(right.children)),pageLabels=[toolbar._getToolbarCenterItemsElement(),toolbar._getToolbarBackButtonLabelElement()];return{pageLabels:pageLabels,other:other,content:page._getContentElement(),background:page._getBackgroundElement(),toolbar:toolbar,bottomToolbar:page._getBottomToolbarElement()}}},{key:"_shouldAnimateToolbar",value:function(enterPage,leavePage){var bothPageHasToolbar=enterPage._canAnimateToolbar()&&leavePage._canAnimateToolbar(),noMaterialToolbar=!enterPage._getToolbarElement().classList.contains("navigation-bar--material")&&!leavePage._getToolbarElement().classList.contains("navigation-bar--material");return bothPageHasToolbar&&noMaterialToolbar}},{key:"push",value:function(enterPage,leavePage,callback){var _this2=this;this.backgroundMask.remove(),leavePage.parentNode.insertBefore(this.backgroundMask,leavePage.nextSibling);var enterPageDecomposition=this._decompose(enterPage),leavePageDecomposition=this._decompose(leavePage),delta=function(){var rect=leavePage.getBoundingClientRect();return Math.round((rect.right-rect.left)/2*.6)}(),maskClear=animit(this.backgroundMask).saveStyle().queue({opacity:0,transform:"translate3d(0, 0, 0)"}).wait(this.delay).queue({opacity:.1},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){_this2.backgroundMask.remove(),done()}),shouldAnimateToolbar=this._shouldAnimateToolbar(enterPage,leavePage);shouldAnimateToolbar?animit.runAll(maskClear,animit([enterPageDecomposition.content,enterPageDecomposition.bottomToolbar,enterPageDecomposition.background]).saveStyle().queue({css:{transform:"translate3D(100%, 0px, 0px)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0px, 0px, 0px)"},duration:this.duration,timing:this.timing}).restoreStyle(),animit(enterPageDecomposition.pageLabels).saveStyle().queue({css:{transform:"translate3d("+delta+"px, 0, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(enterPageDecomposition.other).saveStyle().queue({css:{opacity:0},duration:0}).wait(this.delay).queue({css:{opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit([leavePageDecomposition.content,leavePageDecomposition.bottomToolbar,leavePageDecomposition.background]).saveStyle().queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(-25%, 0px, 0px)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}),animit(leavePageDecomposition.pageLabels).saveStyle().queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(-"+delta+"px, 0, 0)",opacity:0},duration:this.duration,timing:this.timing}).restoreStyle(),animit(leavePageDecomposition.other).saveStyle().queue({css:{opacity:1},duration:0}).wait(this.delay).queue({css:{opacity:0},duration:this.duration,timing:this.timing}).restoreStyle()):animit.runAll(maskClear,animit(enterPage).saveStyle().queue({css:{transform:"translate3D(100%, 0px, 0px)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0px, 0px, 0px)"},duration:this.duration,timing:this.timing}).restoreStyle(),animit(leavePage).saveStyle().queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(-25%, 0px, 0px)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"pop",value:function(enterPage,leavePage,done){this.backgroundMask.remove(),enterPage.parentNode.insertBefore(this.backgroundMask,enterPage.nextSibling);var enterPageDecomposition=this._decompose(enterPage),leavePageDecomposition=this._decompose(leavePage),delta=function(){var rect=leavePage.getBoundingClientRect();return Math.round((rect.right-rect.left)/2*.6)}(),maskClear=animit(this.backgroundMask).saveStyle().queue({opacity:.1,transform:"translate3d(0, 0, 0)"}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){done()}),shouldAnimateToolbar=this._shouldAnimateToolbar(enterPage,leavePage);shouldAnimateToolbar?animit.runAll(maskClear,animit([enterPageDecomposition.content,enterPageDecomposition.bottomToolbar,enterPageDecomposition.background]).saveStyle().queue({css:{transform:"translate3D(-25%, 0px, 0px)",opacity:.9},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0px, 0px, 0px)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(enterPageDecomposition.pageLabels).saveStyle().queue({css:{transform:"translate3d(-"+delta+"px, 0, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(enterPageDecomposition.toolbar).saveStyle().queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(enterPageDecomposition.other).saveStyle().queue({css:{opacity:0},duration:0}).wait(this.delay).queue({css:{opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit([leavePageDecomposition.content,leavePageDecomposition.bottomToolbar,leavePageDecomposition.background]).queue({css:{transform:"translate3D(0px, 0px, 0px)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(100%, 0px, 0px)"},duration:this.duration,timing:this.timing}).wait(0).queue(function(finish){this.backgroundMask.remove(),done(),finish()}.bind(this)),animit(leavePageDecomposition.other).queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d(0, 0, 0)",opacity:0},duration:this.duration,timing:this.timing}),animit(leavePageDecomposition.toolbar).queue({css:{background:"none",backgroundColor:"rgba(0, 0, 0, 0)",borderColor:"rgba(0, 0, 0, 0)"},duration:0}),animit(leavePageDecomposition.pageLabels).queue({css:{transform:"translate3d(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3d("+delta+"px, 0, 0)",opacity:0},duration:this.duration,timing:this.timing})):animit.runAll(maskClear,animit(enterPage).saveStyle().queue({css:{transform:"translate3D(-25%, 0px, 0px)",opacity:.9},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0px, 0px, 0px)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(leavePage).queue({css:{transform:"translate3D(0px, 0px, 0px)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(100%, 0px, 0px)"
},duration:this.duration,timing:this.timing}).queue(function(finish){this.backgroundMask.remove(),done(),finish()}.bind(this)))}}]),IOSSlideNavigatorTransitionAnimator}(NavigatorTransitionAnimator),IOSLiftNavigatorTransitionAnimator=function(_NavigatorTransitionA){function IOSLiftNavigatorTransitionAnimator(options){babelHelpers.classCallCheck(this,IOSLiftNavigatorTransitionAnimator),options=util.extend({duration:.4,timing:"cubic-bezier(.1, .7, .1, 1)",delay:0},options||{});var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSLiftNavigatorTransitionAnimator).call(this,options));return _this.backgroundMask=util.createElement('\n      <div style="position: absolute; width: 100%; height: 100%;\n        background: linear-gradient(black, white);"></div>\n    '),_this}return babelHelpers.inherits(IOSLiftNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(IOSLiftNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){var _this2=this;this.backgroundMask.remove(),leavePage.parentNode.insertBefore(this.backgroundMask,leavePage);var maskClear=animit(this.backgroundMask).wait(.6).queue(function(done){_this2.backgroundMask.remove(),done()});animit.runAll(maskClear,animit(enterPage).saveStyle().queue({css:{transform:"translate3D(0, 100%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}),animit(leavePage).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, -10%, 0)",opacity:.9},duration:this.duration,timing:this.timing}))}},{key:"pop",value:function(enterPage,leavePage,callback){var _this3=this;this.backgroundMask.remove(),enterPage.parentNode.insertBefore(this.backgroundMask,enterPage),animit.runAll(animit(this.backgroundMask).wait(.4).queue(function(done){_this3.backgroundMask.remove(),done()}),animit(enterPage).queue({css:{transform:"translate3D(0, -10%, 0)",opacity:.9},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}),animit(leavePage).queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 100%, 0)"},duration:this.duration,timing:this.timing}))}}]),IOSLiftNavigatorTransitionAnimator}(NavigatorTransitionAnimator),IOSFadeNavigatorTransitionAnimator=function(_NavigatorTransitionA){function IOSFadeNavigatorTransitionAnimator(options){return babelHelpers.classCallCheck(this,IOSFadeNavigatorTransitionAnimator),options=util.extend({timing:"linear",duration:"0.4",delay:"0"},options||{}),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSFadeNavigatorTransitionAnimator).call(this,options))}return babelHelpers.inherits(IOSFadeNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(IOSFadeNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){animit.runAll(animit([enterPage._getContentElement(),enterPage._getBackgroundElement()]).saveStyle().queue({css:{transform:"translate3D(0, 0, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}),animit(enterPage._getToolbarElement()).saveStyle().queue({css:{transform:"translate3D(0, 0, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle())}},{key:"pop",value:function(enterPage,leavePage,callback){animit.runAll(animit([leavePage._getContentElement(),leavePage._getBackgroundElement()]).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:0},duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}),animit(leavePage._getToolbarElement()).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:0},duration:this.duration,timing:this.timing}))}}]),IOSFadeNavigatorTransitionAnimator}(NavigatorTransitionAnimator),MDSlideNavigatorTransitionAnimator=function(_NavigatorTransitionA){function MDSlideNavigatorTransitionAnimator(options){babelHelpers.classCallCheck(this,MDSlideNavigatorTransitionAnimator),options=util.extend({duration:.3,timing:"cubic-bezier(.1, .7, .4, 1)",delay:0},options||{});var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(MDSlideNavigatorTransitionAnimator).call(this,options));return _this.backgroundMask=util.createElement('\n      <div style="position: absolute; width: 100%; height: 100%; z-index: 2;\n        background-color: black; opacity: 0;"></div>\n    '),_this.blackMaskOpacity=.4,_this}return babelHelpers.inherits(MDSlideNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(MDSlideNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){var _this2=this;this.backgroundMask.remove(),leavePage.parentElement.insertBefore(this.backgroundMask,leavePage.nextSibling),animit.runAll(animit(this.backgroundMask).saveStyle().queue({opacity:0,transform:"translate3d(0, 0, 0)"}).wait(this.delay).queue({opacity:this.blackMaskOpacity},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){_this2.backgroundMask.remove(),done()}),animit(enterPage).saveStyle().queue({css:{transform:"translate3D(100%, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)"},duration:this.duration,timing:this.timing}).restoreStyle(),animit(leavePage).saveStyle().queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(-45%, 0px, 0px)"},duration:this.duration,timing:this.timing}).restoreStyle().wait(.2).queue(function(done){callback(),done()}))}},{key:"pop",value:function(enterPage,leavePage,done){var _this3=this;this.backgroundMask.remove(),enterPage.parentNode.insertBefore(this.backgroundMask,enterPage.nextSibling),animit.runAll(animit(this.backgroundMask).saveStyle().queue({opacity:this.blackMaskOpacity,transform:"translate3d(0, 0, 0)"}).wait(this.delay).queue({opacity:0},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){_this3.backgroundMask.remove(),done()}),animit(enterPage).saveStyle().queue({css:{transform:"translate3D(-45%, 0px, 0px)",opacity:.9},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0px, 0px, 0px)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle(),animit(leavePage).queue({css:{transform:"translate3D(0px, 0px, 0px)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(100%, 0px, 0px)"},duration:this.duration,timing:this.timing}).wait(.2).queue(function(finish){done(),finish()}))}}]),MDSlideNavigatorTransitionAnimator}(NavigatorTransitionAnimator),MDLiftNavigatorTransitionAnimator=function(_NavigatorTransitionA){function MDLiftNavigatorTransitionAnimator(options){babelHelpers.classCallCheck(this,MDLiftNavigatorTransitionAnimator),options=util.extend({duration:.4,timing:"cubic-bezier(.1, .7, .1, 1)",delay:.05},options||{});var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(MDLiftNavigatorTransitionAnimator).call(this,options));return _this.backgroundMask=util.createElement('\n      <div style="position: absolute; width: 100%; height: 100%;\n        background-color: black;"></div>\n    '),_this}return babelHelpers.inherits(MDLiftNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(MDLiftNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){var _this2=this;this.backgroundMask.remove(),leavePage.parentNode.insertBefore(this.backgroundMask,leavePage);var maskClear=animit(this.backgroundMask).wait(.6).queue(function(done){_this2.backgroundMask.remove(),done()});animit.runAll(maskClear,animit(enterPage).saveStyle().queue({css:{transform:"translate3D(0, 100%, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)"},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}),animit(leavePage).queue({css:{opacity:1},duration:0}).wait(0).queue({css:{opacity:.4},duration:this.duration,timing:this.timing}))}},{key:"pop",value:function(enterPage,leavePage,callback){var _this3=this;this.backgroundMask.remove(),enterPage.parentNode.insertBefore(this.backgroundMask,enterPage),animit.runAll(animit(this.backgroundMask).wait(.4).queue(function(done){_this3.backgroundMask.remove(),done()}),animit(enterPage).queue({css:{transform:"translate3D(0, 0, 0)",opacity:.4},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}),animit(leavePage).queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 100%, 0)"},duration:this.duration,timing:this.timing}))}}]),MDLiftNavigatorTransitionAnimator}(NavigatorTransitionAnimator),MDFadeNavigatorTransitionAnimator=function(_NavigatorTransitionA){function MDFadeNavigatorTransitionAnimator(options){return babelHelpers.classCallCheck(this,MDFadeNavigatorTransitionAnimator),options=util.extend({timing:"ease-out",duration:"0.25",delay:"0.20"},options||{}),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(MDFadeNavigatorTransitionAnimator).call(this,options))}return babelHelpers.inherits(MDFadeNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(MDFadeNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){animit.runAll(animit(enterPage).saveStyle().queue({css:{transform:"translate3D(0, 42px, 0)",opacity:0},duration:0}).wait(this.delay).queue({css:{transform:"translate3D(0, 0, 0)",opacity:1},duration:this.duration,timing:this.timing}).restoreStyle().queue(function(done){callback(),done()}))}},{key:"pop",value:function(enterPage,leavePage,callback){animit.runAll(animit(leavePage).queue({css:{transform:"translate3D(0, 0, 0)"},duration:0}).wait(.15).queue({css:{transform:"translate3D(0, 38px, 0)"},duration:this.duration,timing:this.timing}).queue(function(done){callback(),done()}),animit(leavePage).queue({css:{opacity:1},duration:0}).wait(.04).queue({css:{opacity:0},duration:this.duration,timing:this.timing}))}}]),MDFadeNavigatorTransitionAnimator}(NavigatorTransitionAnimator),NoneNavigatorTransitionAnimator=function(_NavigatorTransitionA){function NoneNavigatorTransitionAnimator(options){return babelHelpers.classCallCheck(this,NoneNavigatorTransitionAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NoneNavigatorTransitionAnimator).call(this,options))}return babelHelpers.inherits(NoneNavigatorTransitionAnimator,_NavigatorTransitionA),babelHelpers.createClass(NoneNavigatorTransitionAnimator,[{key:"push",value:function(enterPage,leavePage,callback){callback()}},{key:"pop",value:function(enterPage,leavePage,callback){callback()}}]),NoneNavigatorTransitionAnimator}(NavigatorTransitionAnimator),_animatorDict$3={"default":function(){return platform.isAndroid()?MDFadeNavigatorTransitionAnimator:IOSSlideNavigatorTransitionAnimator},slide:function(){return platform.isAndroid()?MDSlideNavigatorTransitionAnimator:IOSSlideNavigatorTransitionAnimator},lift:function(){return platform.isAndroid()?MDLiftNavigatorTransitionAnimator:IOSLiftNavigatorTransitionAnimator},fade:function(){return platform.isAndroid()?MDFadeNavigatorTransitionAnimator:IOSFadeNavigatorTransitionAnimator},"slide-ios":IOSSlideNavigatorTransitionAnimator,"slide-md":MDSlideNavigatorTransitionAnimator,"lift-ios":IOSLiftNavigatorTransitionAnimator,"lift-md":MDLiftNavigatorTransitionAnimator,"fade-ios":IOSFadeNavigatorTransitionAnimator,"fade-md":MDFadeNavigatorTransitionAnimator,none:NoneNavigatorTransitionAnimator},rewritables={ready:function(navigatorElement,callback){callback()},link:function(navigatorElement,target,options,callback){callback(target)}},NavigatorElement=function(_BaseElement){function NavigatorElement(){return babelHelpers.classCallCheck(this,NavigatorElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NavigatorElement).apply(this,arguments))}return babelHelpers.inherits(NavigatorElement,_BaseElement),babelHelpers.createClass(NavigatorElement,[{key:"createdCallback",value:function(){this._boundOnDeviceBackButton=this._onDeviceBackButton.bind(this),this._isRunning=!1,this._updateAnimatorFactory()}},{key:"attachedCallback",value:function(){var _this2=this;this._deviceBackButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._boundOnDeviceBackButton),rewritables.ready(this,function(){if(0===_this2.pages.length&&_this2.hasAttribute("page"))_this2.pushPage(_this2.getAttribute("page"),{animation:"none"});else{for(var i=0;i<_this2.pages.length;i++)if("ONS-PAGE"!==_this2.pages[i].nodeName)throw new Error("The children of <ons-navigator> need to be of type <ons-page>");_this2.topPage&&setTimeout(function(){_this2.topPage._show(),_this2._updateLastPageBackButton()},0)}})}},{key:"_updateAnimatorFactory",value:function(){this._animatorFactory=new AnimatorFactory({animators:_animatorDict$3,baseClass:NavigatorTransitionAnimator,baseClassName:"NavigatorTransitionAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"detachedCallback",value:function(){this._deviceBackButtonHandler.destroy(),this._deviceBackButtonHandler=null}},{key:"attributeChangedCallback",value:function(name,last,current){"animation"===name&&this._updateAnimatorFactory()}},{key:"popPage",value:function(){var _this3=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],popUpdate=function(){return new Promise(function(resolve){_this3.pages[_this3.pages.length-1]._destroy(),resolve()})};if(options=this._prepareOptions(options),!options.refresh)return this._popPage(options,popUpdate);var index=this.pages.length-2;if(!this.pages[index].name)throw new Error("Refresh option cannot be used with pages directly inside the Navigator. Use ons-template instead.");return new Promise(function(resolve){internal.getPageHTMLAsync(_this3.pages[index].name).then(function(templateHTML){var element=util.extend(_this3._createPageElement(templateHTML),{name:_this3.name,options:options});rewritables.link(_this3,element,_this3.pages[index].options,function(element){_this3.insertBefore(element,_this3.pages[index]?_this3.pages[index]:null),_this3.pages[index+1]._destroy(),resolve()})})}).then(function(){return _this3._popPage(options,popUpdate)})}},{key:"_popPage",value:function(options){var _this4=this,update=arguments.length<=1||void 0===arguments[1]?function(){return Promise.resolve()}:arguments[1],pages=arguments.length<=2||void 0===arguments[2]?[]:arguments[2];if(this._isRunning)return Promise.reject("popPage is already running.");if(this.pages.length<=1)return Promise.reject("ons-navigator's page stack is empty.");if(this._emitPrePopEvent())return Promise.reject("Canceled in prepop event.");var l=this.pages.length;return this._isRunning=!0,this.pages[l-2].updateBackButton(l-2>0),new Promise(function(resolve){var leavePage=_this4.pages[l-1],enterPage=_this4.pages[l-2];enterPage.style.display="block",options.animation=leavePage.pushedOptions.animation||options.animation,options.animationOptions=util.extend({},leavePage.pushedOptions.animationOptions,options.animationOptions||{});var callback=function(){setImmediate(function(){return enterPage._show()}),leavePage._hide(),pages.pop(),update(pages,_this4).then(function(){_this4._isRunning=!1,util.triggerElementEvent(_this4,"postpop",{leavePage:leavePage,enterPage:enterPage,navigator:_this4}),"function"==typeof options.callback&&options.callback(),resolve(enterPage)})},animator=_this4._animatorFactory.newAnimator(options);animator.pop(_this4.pages[l-2],_this4.pages[l-1],callback)})["catch"](function(){return _this4._isRunning=!1})}},{key:"pushPage",value:function(page){var _this5=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];options=this._prepareOptions(options,page);var run=function(templateHTML){return new Promise(function(resolve){_this5.appendChild(_this5._createPageElement(templateHTML)),resolve()})};return options.pageHTML?this._pushPage(options,function(){return run(options.pageHTML)}):this._pushPage(options,function(){return internal.getPageHTMLAsync(options.page).then(run)})}},{key:"_pushPage",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],update=arguments.length<=1||void 0===arguments[1]?function(){return Promise.resolve()}:arguments[1],_this6=this,pages=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],page=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];if(this._isRunning)return Promise.reject("pushPage is already running.");if(this._emitPrePushEvent())return Promise.reject("Canceled in prepush event.");this._isRunning=!0;var animationOptions=AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"));options=util.extend({},this.options||{},{animationOptions:animationOptions},options);var animator=this._animatorFactory.newAnimator(options);return pages.push(page),update(pages,this).then(function(){var pageLength=_this6.pages.length,enterPage=_this6.pages[pageLength-1],leavePage=_this6.pages[pageLength-2];return enterPage.updateBackButton(pageLength-1),enterPage.data=options.data,enterPage.name=options.page,enterPage.pushedOptions=options,new Promise(function(resolve){var done=function(){_this6._isRunning=!1,leavePage&&(leavePage.style.display="none"),util.triggerElementEvent(_this6,"postpush",{leavePage:leavePage,enterPage:enterPage,navigator:_this6}),"function"==typeof options.callback&&options.callback(),resolve(enterPage)};enterPage.style.display="none";var push=function(){enterPage.style.display="block",leavePage?(leavePage._hide(),setImmediate(function(){return enterPage._show()}),animator.push(enterPage,leavePage,done)):(setImmediate(function(){return enterPage._show()}),done())};options._linked?push():rewritables.link(_this6,enterPage,options,push)})})["catch"](function(){return _this6._isRunning=!1})}},{key:"replacePage",value:function(page){var _this7=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];options=this._prepareOptions(options,page);var callback=options.callback;return options.callback=function(){_this7.pages.length>1&&_this7.pages[_this7.pages.length-2]._destroy(),_this7._updateLastPageBackButton(),callback&&callback()},this.pushPage(options)}},{key:"insertPage",value:function(index,page){var _this8=this,options=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(options=this._prepareOptions(options,page),index=this._normalizeIndex(index),index>=this.pages.length)return this.pushPage(options);var run=function(templateHTML){var element=util.extend(_this8._createPageElement(templateHTML),{name:options.page,data:options.data,pushedOptions:options});return options.animationOptions=util.extend({},AnimatorFactory.parseAnimationOptionsString(_this8.getAttribute("animation-options")),options.animationOptions||{}),new Promise(function(resolve){element.style.display="none",_this8.insertBefore(element,_this8.pages[index]),_this8.topPage.updateBackButton(!0),rewritables.link(_this8,element,options,function(element){setTimeout(function(){element=null,resolve(_this8.pages[index])},1e3/60)})})};return options.pageHTML?run(options.pageHTML):internal.getPageHTMLAsync(options.page).then(run)}},{key:"resetToPage",value:function(page){var _this9=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];options=this._prepareOptions(options,page),options.animator||options.animation||(options.animation="none");var callback=options.callback;return options.callback=function(){for(;_this9.pages.length>1;)_this9.pages[0]._destroy();_this9.pages[0].updateBackButton(!1),callback&&callback()},options.page||options.pageHTML||!this.hasAttribute("page")||(options.page=this.getAttribute("page")),this.pushPage(options)}},{key:"bringPageTop",value:function(item){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(-1===["number","string"].indexOf("undefined"==typeof item?"undefined":babelHelpers["typeof"](item)))throw new Error("First argument must be a page name or the index of an existing page. You supplied "+item);var index="number"==typeof item?this._normalizeIndex(item):this._lastIndexOfPage(item),page=this.pages[index];if(0>index)return this.pushPage(item,options);if(options=this._prepareOptions(options),index===this.pages.length-1)return Promise.resolve(page);if(!page)throw new Error("Failed to find item "+item);return this._isRunning?Promise.reject("pushPage is already running."):this._emitPrePushEvent()?Promise.reject("Canceled in prepush event."):(util.extend(options,{page:page.name,_linked:!0}),page.style.display="block",page.setAttribute("_skipinit",""),page.parentNode.appendChild(page),this._pushPage(options))}},{key:"_prepareOptions",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],page=arguments[1];if("object"===("undefined"==typeof page?"undefined":babelHelpers["typeof"](page))&&null!==page&&(options=page,page=options.page),"object"!=("undefined"==typeof options?"undefined":babelHelpers["typeof"](options)))throw new Error("options must be an object. You supplied "+options);return page=page||options.page,util.extend({},this.options||{},options,{page:page})}},{key:"_updateLastPageBackButton",value:function(){var index=this.pages.length-1;index>=0&&this.pages[index].updateBackButton(index>0)}},{key:"_normalizeIndex",value:function(index){return index>=0?index:Math.abs(this.pages.length+index)%this.pages.length}},{key:"_onDeviceBackButton",value:function(event){this.pages.length>1?this.popPage():event.callParentHandler()}},{key:"_lastIndexOfPage",value:function(pageName){var index=void 0;for(index=this.pages.length-1;index>=0&&this.pages[index].name!==pageName;index--);return index}},{key:"_emitPreEvent",value:function(name){var data=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],isCanceled=!1;return util.triggerElementEvent(this,"pre"+name,util.extend({navigator:this,currentPage:this.pages[this.pages.length-1],cancel:function(){return isCanceled=!0}},data)),isCanceled}},{key:"_emitPrePushEvent",value:function(){return this._emitPreEvent("push")}},{key:"_emitPrePopEvent",value:function(){var l=this.pages.length;return this._emitPreEvent("pop",{leavePage:this.pages[l-1],enterPage:this.pages[l-2]})}},{key:"_createPageElement",value:function(templateHTML){var pageElement=util.createElement(internal.normalizePageHTML(templateHTML));if("ons-page"!==pageElement.nodeName.toLowerCase())throw new Error('You must supply an "ons-page" element to "ons-navigator".');return CustomElements.upgrade(pageElement),pageElement}},{key:"_show",value:function(){this.topPage&&this.topPage._show()}},{key:"_hide",value:function(){this.topPage&&this.topPage._hide()}},{key:"_destroy",value:function(){for(var i=this.pages.length-1;i>=0;i--)this.pages[i]._destroy();this.remove()}},{key:"topPage",get:function(){return this.pages[this.pages.length-1]||null}},{key:"pages",get:function(){return this.children}},{key:"options",get:function(){return this._options},set:function(object){this._options=object}},{key:"_isRunning",set:function(value){this.setAttribute("_is-running",value?"true":"false")},get:function(){return JSON.parse(this.getAttribute("_is-running"))}}]),NavigatorElement}(BaseElement);window.OnsNavigatorElement=document.registerElement("ons-navigator",{prototype:NavigatorElement.prototype}),window.OnsNavigatorElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof NavigatorTransitionAnimator))throw new Error('"Animator" param must inherit OnsNavigatorElement.NavigatorTransitionAnimator');_animatorDict$3[name]=Animator},window.OnsNavigatorElement.rewritables=rewritables,window.OnsNavigatorElement.NavigatorTransitionAnimator=NavigatorTransitionAnimator;var scheme$13={"":"page--*",".page__content":"page--*__content",".page__background":"page--*__background"},nullToolbarElement=document.createElement("ons-toolbar"),PageElement=function(_BaseElement){function PageElement(){return babelHelpers.classCallCheck(this,PageElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(PageElement).apply(this,arguments))}return babelHelpers.inherits(PageElement,_BaseElement),babelHelpers.createClass(PageElement,[{key:"createdCallback",value:function(){var _this2=this;this.classList.add("page"),contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile(),_this2._isShown=!1,_this2._contentElement=_this2._getContentElement(),_this2._isMuted=_this2.hasAttribute("_muted"),_this2._skipInit=_this2.hasAttribute("_skipinit"),_this2.pushedOptions={}})}},{key:"attachedCallback",value:function(){var _this3=this;contentReady(this,function(){_this3._isMuted||(_this3._skipInit?_this3.removeAttribute("_skipinit"):setImmediate(function(){return util.triggerElementEvent(_this3,"init")})),util.hasAnyComponentAsParent(_this3)||setImmediate(function(){return _this3._show()}),_this3._tryToFillStatusBar(),_this3.hasAttribute("on-infinite-scroll")&&_this3.attributeChangedCallback("on-infinite-scroll",null,_this3.getAttribute("on-infinite-scroll"))})}},{key:"updateBackButton",value:function(show){this.backButton&&(show?this.backButton.show():this.backButton.hide())}},{key:"_tryToFillStatusBar",value:function(){var _this4=this;internal.autoStatusBarFill(function(){var filled=util.findParent(_this4,function(e){return e.hasAttribute("status-bar-fill")});util.toggleAttribute(_this4,"status-bar-fill",!filled&&(_this4._canAnimateToolbar()||!_this4._hasAPageControlChild()))})}},{key:"_hasAPageControlChild",value:function(){return util.findChild(this._contentElement,function(e){return e.nodeName.match(/ons-(splitter|sliding-menu|navigator|tabbar)/i)})}},{key:"_onScroll",value:function(){var _this5=this,c=this._contentElement,overLimit=(c.scrollTop+c.clientHeight)/c.scrollHeight>=this._infiniteScrollLimit;this._onInfiniteScroll&&!this._loadingContent&&overLimit&&(this._loadingContent=!0,this._onInfiniteScroll(function(){return _this5._loadingContent=!1}))}},{key:"_getContentElement",value:function(){var result=util.findChild(this,".page__content");if(result)return result;throw Error('fail to get ".page__content" element.')}},{key:"_canAnimateToolbar",value:function(){return util.findChild(this,"ons-toolbar")?!0:!!util.findChild(this._contentElement,function(el){return util.match(el,"ons-toolbar")&&!el.hasAttribute("inline")})}},{key:"_getBackgroundElement",value:function(){var result=util.findChild(this,".page__background");if(result)return result;throw Error('fail to get ".page__background" element.')}},{key:"_getBottomToolbarElement",value:function(){return util.findChild(this,"ons-bottom-toolbar")||internal.nullElement}},{key:"_getToolbarElement",value:function(){return util.findChild(this,"ons-toolbar")||nullToolbarElement}},{key:"_registerToolbar",value:function(element){this.insertBefore(element,this.children[0])}},{key:"_registerBottomToolbar",value:function(element){this.classList.add("page-with-bottom-toolbar"),this.appendChild(element)}},{key:"attributeChangedCallback",value:function(name,last,current){var _this6=this;return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$13):void("_muted"===name?this._isMuted=this.hasAttribute("_muted"):"_skipinit"===name?this._skipInit=this.hasAttribute("_skipinit"):"on-infinite-scroll"===name&&(null===current?this.onInfiniteScroll=null:this.onInfiniteScroll=function(done){var f=util.findFromPath(current);_this6.onInfiniteScroll=f,f(done)}))}},{key:"_compile",value:function(){if(autoStyle.prepare(this),!util.findChild(this,".page__background")||!util.findChild(this,".page__content")){for(var background=util.create(".page__background"),content=util.create(".page__content");this.firstChild;)content.appendChild(this.firstChild);this.appendChild(background),this.appendChild(content)}ModifierUtil.initModifier(this,scheme$13),this.setAttribute("_compiled","")}},{key:"_registerExtraElement",value:function(element){var extra=util.findChild(this,".page__extra");extra||(extra=util.create(".page__extra",{zIndex:10001}),this.appendChild(extra)),extra.appendChild(element)}},{key:"_show",value:function(){!this._isShown&&util.isAttached(this)&&(this._isShown=!0,this._isMuted||util.triggerElementEvent(this,"show"),util.propagateAction(this._contentElement,"_show"))}},{key:"_hide",value:function(){this._isShown&&(this._isShown=!1,this._isMuted||util.triggerElementEvent(this,"hide"),util.propagateAction(this._contentElement,"_hide"))}},{key:"_destroy",value:function(){this._hide(),this._isMuted||util.triggerElementEvent(this,"destroy"),this.onDeviceBackButton&&this.onDeviceBackButton.destroy(),util.propagateAction(this._contentElement,"_destroy"),this.remove()}},{key:"name",set:function(str){this.setAttribute("name",str)},get:function(){return this.getAttribute("name")}},{key:"backButton",get:function(){return this.querySelector("ons-back-button")}},{key:"onInfiniteScroll",set:function(value){if(null===value)return this._onInfiniteScroll=null,void this._contentElement.removeEventListener("scroll",this._boundOnScroll);if(!(value instanceof Function))throw new Error("onInfiniteScroll must be a function or null");this._onInfiniteScroll||(this._infiniteScrollLimit=.9,this._boundOnScroll=this._onScroll.bind(this),this._contentElement.addEventListener("scroll",this._boundOnScroll)),this._onInfiniteScroll=value},get:function(){return this._onInfiniteScroll}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(callback){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,callback)}}]),PageElement}(BaseElement);window.OnsPageElement=document.registerElement("ons-page",{prototype:PageElement.prototype});var PopoverAnimator=function(){function PopoverAnimator(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];babelHelpers.classCallCheck(this,PopoverAnimator),this.options=util.extend({timing:"cubic-bezier(.1, .7, .4, 1)",duration:.2,delay:0},options)}return babelHelpers.createClass(PopoverAnimator,[{key:"show",value:function(popover,callback){callback()}},{key:"hide",value:function(popover,callback){callback()}},{key:"_animate",value:function(element,_ref){var from=_ref.from,to=_ref.to,options=_ref.options,callback=_ref.callback,_ref$restore=_ref.restore,restore=void 0===_ref$restore?!1:_ref$restore,animation=_ref.animation;return options=util.extend({},this.options,options),animation&&(from=animation.from,to=animation.to),animation=animit(element),restore&&(animation=animation.saveStyle()),animation=animation.queue(from).wait(options.delay).queue({css:to,duration:options.duration,timing:options.timing}),restore&&(animation=animation.restoreStyle()),callback&&(animation=animation.queue(function(done){callback(),done()})),animation}},{key:"_animateAll",value:function(element,animations){var _this=this;Object.keys(animations).forEach(function(key){return _this._animate(element[key],animations[key]).play()})}}]),PopoverAnimator}(),fade={out:{from:{opacity:1},to:{opacity:0}},"in":{from:{opacity:0},to:{opacity:1}}},MDFadePopoverAnimator=function(_PopoverAnimator){function MDFadePopoverAnimator(){return babelHelpers.classCallCheck(this,MDFadePopoverAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(MDFadePopoverAnimator).apply(this,arguments))}return babelHelpers.inherits(MDFadePopoverAnimator,_PopoverAnimator),babelHelpers.createClass(MDFadePopoverAnimator,[{
key:"show",value:function(popover,callback){this._animateAll(popover,{_mask:fade["in"],_popover:{animation:fade["in"],restore:!0,callback:callback}})}},{key:"hide",value:function(popover,callback){this._animateAll(popover,{_mask:fade.out,_popover:{animation:fade.out,restore:!0,callback:callback}})}}]),MDFadePopoverAnimator}(PopoverAnimator),IOSFadePopoverAnimator=function(_MDFadePopoverAnimato){function IOSFadePopoverAnimator(){return babelHelpers.classCallCheck(this,IOSFadePopoverAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(IOSFadePopoverAnimator).apply(this,arguments))}return babelHelpers.inherits(IOSFadePopoverAnimator,_MDFadePopoverAnimato),babelHelpers.createClass(IOSFadePopoverAnimator,[{key:"show",value:function(popover,callback){this._animateAll(popover,{_mask:fade["in"],_popover:{from:{transform:"scale3d(1.3, 1.3, 1.0)",opacity:0},to:{transform:"scale3d(1.0, 1.0,  1.0)",opacity:1},restore:!0,callback:callback}})}}]),IOSFadePopoverAnimator}(MDFadePopoverAnimator),animators={PopoverAnimator:PopoverAnimator,IOSFadePopoverAnimator:IOSFadePopoverAnimator,MDFadePopoverAnimator:MDFadePopoverAnimator},scheme$14={".popover":"popover--*",".popover-mask":"popover-mask--*",".popover__container":"popover__container--*",".popover__content":"popover__content--*",".popover__arrow":"popover__arrow--*"},_animatorDict$4={"default":function(){return platform.isAndroid()?animators.MDFadePopoverAnimator:animators.IOSFadePopoverAnimator},none:animators.PopoverAnimator,"fade-ios":animators.IOSFadePopoverAnimator,"fade-md":animators.MDFadePopoverAnimator},templateSource$1=util.createFragment('\n  <div class="popover-mask"></div>\n  <div class="popover__container">\n    <div class="popover__content"></div>\n    <div class="popover__arrow"></div>\n  </div>\n'),positions={up:"bottom",left:"right",down:"top",right:"left"},PopoverElement=(Object.keys(positions),function(_BaseElement){function PopoverElement(){return babelHelpers.classCallCheck(this,PopoverElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(PopoverElement).apply(this,arguments))}return babelHelpers.inherits(PopoverElement,_BaseElement),babelHelpers.createClass(PopoverElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){return _this2._compile()}),this._doorLock=new DoorLock,this._boundOnChange=this._onChange.bind(this),this._boundCancel=this._cancel.bind(this),this._initAnimatorFactory()}},{key:"_initAnimatorFactory",value:function(){var factory=new AnimatorFactory({animators:_animatorDict$4,baseClass:animators.PopoverAnimator,baseClassName:"PopoverAnimator",defaultAnimation:this.getAttribute("animation")||"default"});this._animator=function(options){return factory.newAnimator(options)}}},{key:"_onDeviceBackButton",value:function(event){this.cancelable?this._cancel():event.callParentHandler()}},{key:"_positionPopover",value:function(target){var radius=this._radius,el=this._content,margin=this._margin,pos=target.getBoundingClientRect(),isMD=util.hasModifier(this,"material"),cover=isMD&&this.hasAttribute("cover-target"),distance={top:pos.top-margin,left:pos.left-margin,right:window.innerWidth-pos.right-margin,bottom:window.innerHeight-pos.bottom-margin},_calculateDirections2=this._calculateDirections(distance),vertical=_calculateDirections2.vertical,primary=_calculateDirections2.primary,secondary=_calculateDirections2.secondary;this._popover.classList.add("popover--"+primary);var offset=cover?0:(vertical?pos.height:pos.width)+(isMD?0:14);this.style[primary]=Math.max(0,distance[primary]+offset)+margin+"px",el.style[primary]=0;var l=vertical?"width":"height",sizes=function(style){return{width:parseInt(style.getPropertyValue("width")),height:parseInt(style.getPropertyValue("height"))}}(window.getComputedStyle(el));el.style[secondary]=Math.max(0,distance[secondary]-(sizes[l]-pos[l])/2)+"px",this._arrow.style[secondary]=Math.max(radius,distance[secondary]+pos[l]/2)+"px",this._setTransformOrigin(distance,sizes,pos,primary),el.removeAttribute("data-animit-orig-style")}},{key:"_setTransformOrigin",value:function(distance,sizes,pos,primary){var calc=function(a,o,l){return primary===a?sizes[l]/2:distance[a]+(primary===o?-sizes[l]:sizes[l]-pos[l])/2},x=calc("left","right","width")+"px",y=calc("top","bottom","height")+"px";util.extend(this._popover.style,{transformOrigin:x+" "+y,webkitTransformOriginX:x,webkitTransformOriginY:y})}},{key:"_calculateDirections",value:function(distance){var options=(this.getAttribute("direction")||"up down left right").split(/\s+/).map(function(e){return positions[e]}),primary=options.sort(function(a,b){return distance[a]-distance[b]})[0],vertical=-1!==["top","bottom"].indexOf(primary),secondary=void 0;return secondary=vertical?distance.left<distance.right?"left":"right":distance.top<distance.bottom?"top":"bottom",{vertical:vertical,primary:primary,secondary:secondary}}},{key:"_clearStyles",value:function(){var _this3=this;["top","bottom","left","right"].forEach(function(e){_this3._arrow.style[e]=_this3._content.style[e]=_this3.style[e]="",_this3._popover.classList.remove("popover--"+e)})}},{key:"_onChange",value:function(){var _this4=this;setImmediate(function(){_this4._currentTarget&&_this4._positionPopover(_this4._currentTarget)})}},{key:"_compile",value:function(){if(autoStyle.prepare(this),!this.classList.contains("popover")){this.classList.add("popover");for(var template=templateSource$1.cloneNode(!0),content=template.querySelector(".popover__content");this.childNodes[0];)content.appendChild(this.childNodes[0]);this.appendChild(template),this.hasAttribute("style")&&(this._popover.setAttribute("style",this.getAttribute("style")),this.removeAttribute("style")),this.hasAttribute("mask-color")&&(this._mask.style.backgroundColor=this.getAttribute("mask-color")),ModifierUtil.initModifier(this,scheme$14)}}},{key:"_prepareAnimationOptions",value:function(options){if(options.animation&&!(options.animation in _animatorDict$4))throw new Error("Animator "+options.animation+" is not registered.");options.animationOptions=util.extend(AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options")),options.animationOptions||{})}},{key:"_executeAction",value:function(actions){var _this5=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],callback=options.callback,action=actions.action,before=actions.before,after=actions.after;this._prepareAnimationOptions(options);var canceled=!1;return util.triggerElementEvent(this,"pre"+action,{popover:this,cancel:function(){return canceled=!0}}),canceled?Promise.reject("Canceled in pre"+action+" event."):new Promise(function(resolve){_this5._doorLock.waitUnlock(function(){var unlock=_this5._doorLock.lock();before&&before(),contentReady(_this5,function(){_this5._animator(options)[action](_this5,function(){after&&after(),unlock(),util.triggerElementEvent(_this5,"post"+action,{popover:_this5}),callback&&callback(),resolve(_this5)})})})})}},{key:"show",value:function(target){var _this6=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("string"==typeof target?target=document.querySelector(target):target instanceof Event&&(target=target.target),!(target instanceof HTMLElement))throw new Error("Invalid target");return this._executeAction({action:"show",before:function(){_this6.style.display="block",_this6._currentTarget=target,_this6._positionPopover(target)}},options)}},{key:"hide",value:function(){var _this7=this,options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._executeAction({action:"hide",after:function(){_this7.style.display="none",_this7._clearStyles()}},options)}},{key:"attachedCallback",value:function(){var _this8=this;this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._onDeviceBackButton.bind(this)),contentReady(this,function(){_this8._margin=_this8._margin||parseInt(window.getComputedStyle(_this8).getPropertyValue("top")),_this8._radius=parseInt(window.getComputedStyle(_this8._content).getPropertyValue("border-radius")),_this8._mask.addEventListener("click",_this8._boundCancel,!1),_this8._popover.addEventListener("DOMNodeInserted",_this8._boundOnChange,!1),_this8._popover.addEventListener("DOMNodeRemoved",_this8._boundOnChange,!1),window.addEventListener("resize",_this8._boundOnChange,!1)})}},{key:"detachedCallback",value:function(){this.mask&&this._mask.removeEventListener("click",this._boundCancel,!1),this._backButtonHandler.destroy(),this._backButtonHandler=null,this._popover&&(this._popover.removeEventListener("DOMNodeInserted",this._boundOnChange,!1),this._popover.removeEventListener("DOMNodeRemoved",this._boundOnChange,!1)),window.removeEventListener("resize",this._boundOnChange,!1)}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$14):"direction"===name?this._boundOnChange():void("animation"===name&&this._initAnimatorFactory())}},{key:"_cancel",value:function(){var _this9=this;this.cancelable&&this.hide({callback:function(){util.triggerElementEvent(_this9,"cancel")}})}},{key:"_mask",get:function(){return this.children[0]}},{key:"_popover",get:function(){return this.children[1]}},{key:"_content",get:function(){return this._popover.children[0]}},{key:"_arrow",get:function(){return this._popover.children[1]}},{key:"visible",get:function(){return"none"!==window.getComputedStyle(this).getPropertyValue("display")}},{key:"cancelable",set:function(value){return util.toggleAttribute(this,"cancelable",value)},get:function(){return this.hasAttribute("cancelable")}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler}}]),PopoverElement}(BaseElement));window.OnsPopoverElement=document.registerElement("ons-popover",{prototype:PopoverElement.prototype}),window.OnsPopoverElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof animators.PopoverAnimator))throw new Error('"Animator" param must inherit PopoverAnimator');_animatorDict$4[name]=Animator},window.OnsPopoverElement.PopoverAnimator=animators.PopoverAnimator;var scheme$15={".progress-bar":"progress-bar--*",".progress-bar__primary":"progress-bar__primary--*",".progress-bar__secondary":"progress-bar__secondary--*"},template=util.createElement('\n  <div class="progress-bar">\n    <div class="progress-bar__secondary"></div>\n    <div class="progress-bar__primary"></div>\n  </div>\n'),ProgressBarElement=function(_BaseElement){function ProgressBarElement(){return babelHelpers.classCallCheck(this,ProgressBarElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ProgressBarElement).apply(this,arguments))}return babelHelpers.inherits(ProgressBarElement,_BaseElement),babelHelpers.createClass(ProgressBarElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$15):void("value"===name||"secondary-value"===name?this._updateValue():"indeterminate"===name&&this._updateDeterminate())}},{key:"_updateDeterminate",value:function(){this.hasAttribute("indeterminate")?(this._template.classList.add("progress-bar--indeterminate"),this._template.classList.remove("progress-bar--determinate")):(this._template.classList.add("progress-bar--determinate"),this._template.classList.remove("progress-bar--indeterminate"))}},{key:"_updateValue",value:function(){this._primary.style.width=this.hasAttribute("value")?this.getAttribute("value")+"%":"0%",this._secondary.style.width=this.hasAttribute("secondary-value")?this.getAttribute("secondary-value")+"%":"0%"}},{key:"_compile",value:function(){this._template=template.cloneNode(!0),this._primary=this._template.childNodes[3],this._secondary=this._template.childNodes[1],this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),ModifierUtil.initModifier(this,scheme$15),this.setAttribute("_compiled","")}},{key:"value",set:function(value){if("number"!=typeof value||0>value||value>100)throw new Error("Invalid value");this.setAttribute("value",Math.floor(value))},get:function(){return parseInt(this.getAttribute("value")||"0")}},{key:"secondaryValue",set:function(value){if("number"!=typeof value||0>value||value>100)throw new Error("Invalid value");this.setAttribute("secondary-value",Math.floor(value))},get:function(){return parseInt(this.getAttribute("secondary-value")||"0")}},{key:"indeterminate",set:function(value){value?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},get:function(){return this.hasAttribute("indeterminate")}}]),ProgressBarElement}(BaseElement);window.OnsProgressBarElement=document.registerElement("ons-progress-bar",{prototype:ProgressBarElement.prototype});var scheme$16={".progress-circular":"progress-circular--*",".progress-circular__primary":"progress-circular__primary--*",".progress-circular__secondary":"progress-circular__secondary--*"},template$1=util.createElement('\n  <svg class="progress-circular">\n    <circle class="progress-circular__secondary" cx="50%" cy="50%" r="40%" fill="none" stroke-width="10%" stroke-miterlimit="10"/>\n    <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" fill="none" stroke-width="10%" stroke-miterlimit="10"/>\n  </svg>\n'),ProgressCircularElement=function(_BaseElement){function ProgressCircularElement(){return babelHelpers.classCallCheck(this,ProgressCircularElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ProgressCircularElement).apply(this,arguments))}return babelHelpers.inherits(ProgressCircularElement,_BaseElement),babelHelpers.createClass(ProgressCircularElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$16):void("value"===name||"secondary-value"===name?this._updateValue():"indeterminate"===name&&this._updateDeterminate())}},{key:"_updateDeterminate",value:function(){this.hasAttribute("indeterminate")?(this._template.classList.add("progress-circular--indeterminate"),this._template.classList.remove("progress-circular--determinate")):(this._template.classList.add("progress-circular--determinate"),this._template.classList.remove("progress-circular--indeterminate"))}},{key:"_updateValue",value:function(){if(this.hasAttribute("value")){var per=Math.ceil(251.32*this.getAttribute("value")*.01);this._primary.style["stroke-dasharray"]=per+"%, 251.32%"}if(this.hasAttribute("secondary-value")){var per=Math.ceil(251.32*this.getAttribute("secondary-value")*.01);this._secondary.style["stroke-dasharray"]=per+"%, 251.32%"}}},{key:"_compile",value:function(){this._template=template$1.cloneNode(!0),this._primary=this._template.childNodes[3],this._secondary=this._template.childNodes[1],this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),ModifierUtil.initModifier(this,scheme$16),this.setAttribute("_compiled","")}},{key:"value",set:function(value){if("number"!=typeof value||0>value||value>100)throw new Error("Invalid value");this.setAttribute("value",Math.floor(value))},get:function(){return parseInt(this.getAttribute("value")||"0")}},{key:"secondaryValue",set:function(value){if("number"!=typeof value||0>value||value>100)throw new Error("Invalid value");this.setAttribute("secondary-value",Math.floor(value))},get:function(){return parseInt(this.getAttribute("secondary-value")||"0")}},{key:"indeterminate",set:function(value){value?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},get:function(){return this.hasAttribute("indeterminate")}}]),ProgressCircularElement}(BaseElement);window.OnsProgressCircularElement=document.registerElement("ons-progress-circular",{prototype:ProgressCircularElement.prototype});var STATE_INITIAL="initial",STATE_PREACTION="preaction",STATE_ACTION="action",PullHookElement=function(_BaseElement){function PullHookElement(){return babelHelpers.classCallCheck(this,PullHookElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(PullHookElement).apply(this,arguments))}return babelHelpers.inherits(PullHookElement,_BaseElement),babelHelpers.createClass(PullHookElement,[{key:"createdCallback",value:function(){this._boundOnDrag=this._onDrag.bind(this),this._boundOnDragStart=this._onDragStart.bind(this),this._boundOnDragEnd=this._onDragEnd.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._currentTranslation=0,this._setState(STATE_INITIAL,!0),this._setStyle()}},{key:"_createScrollElement",value:function(){if(this.parentElement.classList.contains("scroll"))return this.parentElement;var scrollElement=util.createElement('<div class="scroll"><div>'),pageElement=this.parentElement;for(scrollElement.appendChild(this);pageElement.firstChild;)scrollElement.appendChild(pageElement.firstChild);return pageElement.appendChild(scrollElement),scrollElement}},{key:"_setStyle",value:function(){var height=this.height;this.style.top="-"+height+"px",this.style.height=height+"px",this.style.lineHeight=height+"px"}},{key:"_onScroll",value:function(event){var element=this._pageElement;element.scrollTop<0&&(element.scrollTop=0)}},{key:"_generateTranslationTransform",value:function(scroll){return"translate3d(0px, "+scroll+"px, 0px)"}},{key:"_onDrag",value:function(event){var _this2=this;if(!this.disabled&&"left"!==event.gesture.direction&&"right"!==event.gesture.direction){var element=this._pageElement;if(element.scrollTop=this._startScroll-event.gesture.deltaY,element.scrollTop<window.innerHeight&&"up"!==event.gesture.direction&&event.gesture.preventDefault(),0===this._currentTranslation&&0===this._getCurrentScroll()){this._transitionDragLength=event.gesture.deltaY;var direction=event.gesture.interimDirection;"down"===direction?this._transitionDragLength-=1:this._transitionDragLength+=1}var scroll=Math.max(event.gesture.deltaY-this._startScroll,0);this._thresholdHeightEnabled()&&scroll>=this.thresholdHeight?(event.gesture.stopDetect(),setImmediate(function(){return _this2._finish()})):scroll>=this.height?this._setState(STATE_PREACTION):this._setState(STATE_INITIAL),event.stopPropagation(),this._translateTo(scroll)}}},{key:"_onDragStart",value:function(event){this.disabled||(this._startScroll=this._getCurrentScroll())}},{key:"_onDragEnd",value:function(event){if(!this.disabled&&this._currentTranslation>0){var scroll=this._currentTranslation;scroll>this.height?this._finish():this._translateTo(0,{animate:!0})}}},{key:"_finish",value:function(){var _this3=this;this._setState(STATE_ACTION),this._translateTo(this.height,{animate:!0});var action=this.onAction||function(done){return done()};action(function(){_this3._translateTo(0,{animate:!0}),_this3._setState(STATE_INITIAL)})}},{key:"_thresholdHeightEnabled",value:function(){var th=this.thresholdHeight;return th>0&&th>=this.height}},{key:"_setState",value:function(state,noEvent){var lastState=this._getState();this.setAttribute("state",state),noEvent||lastState===this._getState()||util.triggerElementEvent(this,"changestate",{pullHook:this,state:state,lastState:lastState})}},{key:"_getState",value:function(){return this.getAttribute("state")}},{key:"_getCurrentScroll",value:function(){return this._pageElement.scrollTop}},{key:"_isContentFixed",value:function(){return this.hasAttribute("fixed-content")}},{key:"_getScrollableElement",value:function(){return this._isContentFixed()?this:this._scrollElement}},{key:"_translateTo",value:function(scroll){var _this4=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(0!=this._currentTranslation||0!=scroll){var done=function(){0===scroll&&_this4._getScrollableElement().removeAttribute("style"),options.callback&&options.callback()};this._currentTranslation=scroll,options.animate?animit(this._getScrollableElement()).queue({transform:this._generateTranslationTransform(scroll)},{duration:.3,timing:"cubic-bezier(.1, .7, .1, 1)"}).play(done):animit(this._getScrollableElement()).queue({transform:this._generateTranslationTransform(scroll)}).play(done)}}},{key:"_getMinimumScroll",value:function(){var scrollHeight=this._scrollElement.getBoundingClientRect().height,pageHeight=this._pageElement.getBoundingClientRect().height;return scrollHeight>pageHeight?-(scrollHeight-pageHeight):0}},{key:"_createEventListeners",value:function(){this._gestureDetector=new GestureDetector(this._pageElement,{dragMinDistance:1,dragDistanceCorrection:!1}),this._gestureDetector.on("drag",this._boundOnDrag),this._gestureDetector.on("dragstart",this._boundOnDragStart),this._gestureDetector.on("dragend",this._boundOnDragEnd),this._scrollElement.parentElement.addEventListener("scroll",this._boundOnScroll,!1)}},{key:"_destroyEventListeners",value:function(){this._gestureDetector&&(this._gestureDetector.off("drag",this._boundOnDrag),this._gestureDetector.off("dragstart",this._boundOnDragStart),this._gestureDetector.off("dragend",this._boundOnDragEnd),this._gestureDetector.dispose(),this._gestureDetector=null),this._scrollElement&&this._scrollElement.parentElement&&this._scrollElement.parentElement.removeEventListener("scroll",this._boundOnScroll,!1)}},{key:"attachedCallback",value:function(){if(this._scrollElement=this._createScrollElement(),this._pageElement=this._scrollElement.parentElement,!this._pageElement.classList.contains("page__content"))throw new Error("<ons-pull-hook> must be a direct descendant of an <ons-page> element.");this._createEventListeners()}},{key:"detachedCallback",value:function(){this._destroyEventListeners()}},{key:"attributeChangedCallback",value:function(name,last,current){}},{key:"height",set:function(value){if(!util.isInteger(value))throw new Error("The height must be an integer");this.setAttribute("height",value+"px")},get:function(){return parseInt(this.getAttribute("height")||"64",10)}},{key:"thresholdHeight",set:function(value){if(!util.isInteger(value))throw new Error("The threshold height must be an integer");this.setAttribute("threshold-height",value+"px")},get:function(){return parseInt(this.getAttribute("threshold-height")||"96",10)}},{key:"state",get:function(){return this._getState()}},{key:"pullDistance",get:function(){return this._currentTranslation}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}}]),PullHookElement}(BaseElement);window.OnsPullHookElement=document.registerElement("ons-pull-hook",{prototype:PullHookElement.prototype}),window.OnsPullHookElement.STATE_ACTION=STATE_ACTION,window.OnsPullHookElement.STATE_INITIAL=STATE_INITIAL,window.OnsPullHookElement.STATE_PREACTION=STATE_PREACTION;var AnimatorCSS=function(){function AnimatorCSS(){babelHelpers.classCallCheck(this,AnimatorCSS),this._queue=[],this._index=0}return babelHelpers.createClass(AnimatorCSS,[{key:"animate",value:function(el,final){var duration=arguments.length<=2||void 0===arguments[2]?200:arguments[2],start=(new Date).getTime(),initial={},stopped=!1,next=!1,timeout=!1,properties=Object.keys(final),updateStyles=function(){var s=window.getComputedStyle(el);properties.forEach(s.getPropertyValue.bind(s)),s=el.offsetHeight},result={stop:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];timeout&&clearTimeout(timeout);var k=Math.min(1,((new Date).getTime()-start)/duration);return properties.forEach(function(i){el.style[i]=(1-k)*initial[i]+k*final[i]+("opacity"==i?"":"px")}),el.style.transitionDuration="0s",options.stopNext?next=!1:stopped||(stopped=!0,next&&next()),result},then:function(cb){return next=cb,stopped&&next&&next(),result},speed:function(newDuration){return internal.config.animationsDisabled&&(newDuration=0),stopped||!function(){timeout&&clearTimeout(timeout);var passed=(new Date).getTime()-start,k=passed/duration,remaining=newDuration*(1-k);properties.forEach(function(i){el.style[i]=(1-k)*initial[i]+k*final[i]+("opacity"==i?"":"px")}),updateStyles(),start=el.speedUpTime,duration=remaining,el.style.transitionDuration=duration/1e3+"s",properties.forEach(function(i){el.style[i]=final[i]+("opacity"==i?"":"px")}),timeout=setTimeout(result.stop,remaining)}(),result},finish:function(){var milliseconds=arguments.length<=0||void 0===arguments[0]?50:arguments[0],k=((new Date).getTime()-start)/duration;return result.speed(milliseconds/(1-k)),result}};if(el.hasAttribute("disabled")||stopped||internal.config.animationsDisabled)return result;var style=window.getComputedStyle(el);return properties.forEach(function(e){var v=parseFloat(style.getPropertyValue(e));initial[e]=isNaN(v)?0:v}),stopped||(el.style.transitionProperty=properties.join(","),el.style.transitionDuration=duration/1e3+"s",properties.forEach(function(e){el.style[e]=final[e]+("opacity"==e?"":"px")})),timeout=setTimeout(result.stop,duration),this._onStopAnimations(el,result.stop),result}}]),babelHelpers.createClass(AnimatorCSS,[{key:"_onStopAnimations",value:function(el,listener){var queue=this._queue,i=this._index++;queue[el]=queue[el]||[],queue[el][i]=function(options){return delete queue[el][i],queue[el]&&0==queue[el].length&&delete queue[el],listener(options)}}},{key:"stopAnimations",value:function(el){var _this=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Array.isArray(el)?el.forEach(function(el){_this.stopAnimations(el,options)}):void(this._queue[el]||[]).forEach(function(e){e(options||{})})}},{key:"stopAll",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.stopAnimations(Object.keys(this._queue),options)}},{key:"fade",value:function(el){var duration=arguments.length<=1||void 0===arguments[1]?200:arguments[1];return this.animate(el,{opacity:0},duration)}}]),AnimatorCSS}(),RippleElement=function(_BaseElement){function RippleElement(){return babelHelpers.classCallCheck(this,RippleElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(RippleElement).apply(this,arguments))}return babelHelpers.inherits(RippleElement,_BaseElement),babelHelpers.createClass(RippleElement,[{key:"createdCallback",value:function(){var _this2=this;this.classList.add("ripple"),this.hasAttribute("_compiled")?(this._background=this.getElementsByClassName("ripple__background")[0],this._wave=this.getElementsByClassName("ripple__wave")[0]):this._compile(),this._animator=new AnimatorCSS,["color","center","start-radius","background"].forEach(function(e){_this2.attributeChangedCallback(e,null,_this2.getAttribute(e))})}},{key:"_compile",value:function(){var _this3=this;["_wave","_background"].forEach(function(e){_this3[e]=document.createElement("div"),_this3[e].classList.add("ripple_"+e),_this3.appendChild(_this3[e])}),this.setAttribute("_compiled","")}},{key:"_calculateCoords",value:function(e){var x,y,h,w,r,b=this.getBoundingClientRect();return this._center?(x=b.width/2,y=b.height/2,r=Math.sqrt(x*x+y*y)):(x=(e.clientX||e.changedTouches[0].clientX)-b.left,y=(e.clientY||e.changedTouches[0].clientY)-b.top,h=Math.max(y,b.height-y),w=Math.max(x,b.width-x),r=Math.sqrt(h*h+w*w)),{x:x,y:y,r:r}}},{key:"_rippleAnimation",value:function(e){var duration=arguments.length<=1||void 0===arguments[1]?300:arguments[1],_animator=this._animator,_wave=this._wave,_background=this._background,_minR=this._minR,_calculateCoords2=this._calculateCoords(e),x=_calculateCoords2.x,y=_calculateCoords2.y,r=_calculateCoords2.r;return _animator.stopAll({stopNext:1}),_animator.animate(_background,{opacity:1},duration),util.extend(_wave.style,{opacity:1,top:y-_minR+"px",left:x-_minR+"px",width:2*_minR+"px",height:2*_minR+"px"}),_animator.animate(_wave,{top:y-r,left:x-r,height:2*r,width:2*r},duration)}},{key:"_updateParent",value:function(){if(!this._parentUpdated&&this.parentNode){var computedStyle=window.getComputedStyle(this.parentNode);"static"===computedStyle.getPropertyValue("position")&&(this.parentNode.style.position="relative"),this._parentUpdated=!0}}},{key:"_onTap",value:function(e){var _this4=this;this.disabled||(this._updateParent(),this._rippleAnimation(e.gesture.srcEvent).then(function(){_this4._animator.fade(_this4._wave),_this4._animator.fade(_this4._background)}))}},{key:"_onHold",value:function(e){this.disabled||(this._updateParent(),this._holding=this._rippleAnimation(e.gesture.srcEvent,2e3),document.addEventListener("release",this._boundOnRelease))}},{key:"_onRelease",value:function(e){var _this5=this;this._holding&&(this._holding.speed(300).then(function(){_this5._animator.stopAll({stopNext:!0}),_this5._animator.fade(_this5._wave),_this5._animator.fade(_this5._background)}),this._holding=!1),document.removeEventListener("release",this._boundOnRelease)}},{key:"_onDragStart",value:function(e){return this._holding?this._onRelease(e):void(-1!=["left","right"].indexOf(e.gesture.direction)&&this._onTap(e))}},{key:"attachedCallback",value:function(){this._parentNode=this.parentNode,this._boundOnTap=this._onTap.bind(this),this._boundOnHold=this._onHold.bind(this),this._boundOnDragStart=this._onDragStart.bind(this),this._boundOnRelease=this._onRelease.bind(this),internal.config.animationsDisabled?this.disabled=!0:(this._parentNode.addEventListener("tap",this._boundOnTap),this._parentNode.addEventListener("hold",this._boundOnHold),this._parentNode.addEventListener("dragstart",this._boundOnDragStart))}},{key:"detachedCallback",value:function(){this._parentNode.removeEventListener("tap",this._boundOnTap),this._parentNode.removeEventListener("hold",this._boundOnHold),this._parentNode.removeEventListener("dragstart",this._boundOnDragStart)}},{key:"attributeChangedCallback",value:function(name,last,current){"start-radius"===name&&(this._minR=Math.max(0,parseFloat(current)||0)),"color"===name&&current&&(this._wave.style.background=current,this.hasAttribute("background")||(this._background.style.background=current)),"background"===name&&(current||last)&&("none"===current?(this._background.setAttribute("disabled","disabled"),this._background.style.background="transparent"):(this._background.hasAttribute("disabled")&&this._background.removeAttribute("disabled"),this._background.style.background=current)),"center"===name&&(this._center=null!=current&&"false"!=current)}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}}]),RippleElement}(BaseElement);window.OnsRippleElement=document.registerElement("ons-ripple",{prototype:RippleElement.prototype}),window.OnsRowElement=window.OnsRowElement?window.OnsRowElement:document.registerElement("ons-row");var scheme$17={"":"speed-dial__item--*"},SpeedDialItemElement=function(_BaseElement){function SpeedDialItemElement(){return babelHelpers.classCallCheck(this,SpeedDialItemElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SpeedDialItemElement).apply(this,arguments))}return babelHelpers.inherits(SpeedDialItemElement,_BaseElement),babelHelpers.createClass(SpeedDialItemElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile(),this._boundOnClick=this._onClick.bind(this)}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":ModifierUtil.onModifierChanged(last,current,this,scheme$17);break;case"ripple":this._updateRipple()}}},{key:"attachedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1)}},{key:"detachedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"_updateRipple",value:function(){util.updateRipple(this)}},{key:"_onClick",value:function(e){e.stopPropagation()}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("fab"),this.classList.add("fab--mini"),this.classList.add("speed-dial__item"),this._updateRipple(),ModifierUtil.initModifier(this,scheme$17),this.setAttribute("_compiled","");
}}]),SpeedDialItemElement}(BaseElement);window.OnsSpeedDialItemElement=document.registerElement("ons-speed-dial-item",{prototype:SpeedDialItemElement.prototype});var scheme$18={"":"speed-dial--*"},SpeedDialElement=function(_BaseElement){function SpeedDialElement(){return babelHelpers.classCallCheck(this,SpeedDialElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SpeedDialElement).apply(this,arguments))}return babelHelpers.inherits(SpeedDialElement,_BaseElement),babelHelpers.createClass(SpeedDialElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||(this._compile(),this.classList.add("speed__dial"),this.hasAttribute("direction")?this._updateDirection(this.getAttribute("direction")):this._updateDirection("up"),this._updatePosition()),this._shown=!0,this._itemShown=!1,this._boundOnClick=this._onClick.bind(this)}},{key:"_compile",value:function(){autoStyle.prepare(this),this._updateRipple(),ModifierUtil.initModifier(this,scheme$18),this.setAttribute("_compiled","")}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":ModifierUtil.onModifierChanged(last,current,this,scheme$18);break;case"ripple":this._updateRipple();break;case"direction":this._updateDirection(current);break;case"position":this._updatePosition()}}},{key:"attachedCallback",value:function(){this._updateDirection(this.hasAttribute("direction")?this.getAttribute("direction"):"up"),this.addEventListener("click",this._boundOnClick,!1)}},{key:"detachedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"_onClick",value:function(e){this.disabled||this.toggleItems()}},{key:"_show",value:function(){this.inline||this.show()}},{key:"_hide",value:function(){this.inline||this.hide()}},{key:"_updateRipple",value:function(){var fab=util.findChild(this,"ons-fab");fab&&(this.hasAttribute("ripple")?fab.setAttribute("ripple",""):fab.removeAttribute("ripple"))}},{key:"_updateDirection",value:function(direction){for(var children=this.items,i=0;i<children.length;i++)children[i].style.transitionDelay=25*i+"ms",children[i].style.webkitTransitionDelay=25*i+"ms",children[i].style.bottom="auto",children[i].style.right="auto",children[i].style.top="auto",children[i].style.left="auto";switch(direction){case"up":for(var i=0;i<children.length;i++)children[i].style.bottom=72+56*i+"px",children[i].style.right="8px";break;case"down":for(var i=0;i<children.length;i++)children[i].style.top=72+56*i+"px",children[i].style.left="8px";break;case"left":for(var i=0;i<children.length;i++)children[i].style.top="8px",children[i].style.right=72+56*i+"px";break;case"right":for(var i=0;i<children.length;i++)children[i].style.top="8px",children[i].style.left=72+56*i+"px";break;default:throw new Error("Argument must be one of up, down, left or right.")}}},{key:"_updatePosition",value:function(){var position=this.getAttribute("position");switch(this.classList.remove("fab--top__left","fab--bottom__right","fab--bottom__left","fab--top__right","fab--top__center","fab--bottom__center"),position){case"top right":case"right top":this.classList.add("fab--top__right");break;case"top left":case"left top":this.classList.add("fab--top__left");break;case"bottom right":case"right bottom":this.classList.add("fab--bottom__right");break;case"bottom left":case"left bottom":this.classList.add("fab--bottom__left");break;case"center top":case"top center":this.classList.add("fab--top__center");break;case"center bottom":case"bottom center":this.classList.add("fab--bottom__center")}}},{key:"show",value:function(){arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.querySelector("ons-fab").show(),this._shown=!0}},{key:"hide",value:function(){var _this2=this;arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.hideItems(),setTimeout(function(){_this2.querySelector("ons-fab").hide()},200),this._shown=!1}},{key:"showItems",value:function(){if(!this._itemShown)for(var children=this.items,i=0;i<children.length;i++)children[i].style.transform="scale(1)",children[i].style.webkitTransform="scale(1)",children[i].style.transitionDelay=25*i+"ms",children[i].style.webkitTransitionDelay=25*i+"ms";this._itemShown=!0}},{key:"hideItems",value:function(){if(this._itemShown)for(var children=this.items,i=0;i<children.length;i++)children[i].style.transform="scale(0)",children[i].style.webkitTransform="scale(0)",children[i].style.transitionDelay=25*(children.length-i)+"ms",children[i].style.webkitTransitionDelay=25*(children.length-i)+"ms";this._itemShown=!1}},{key:"isItemShown",value:function(){return this._itemShown}},{key:"toggle",value:function(){this.visible?this.hide():this.show()}},{key:"toggleItems",value:function(){this.isItemShown()?this.hideItems():this.showItems()}},{key:"items",get:function(){return util.arrayFrom(this.querySelectorAll("ons-speed-dial-item"))}},{key:"disabled",set:function(value){return value&&this.hideItems(),util.arrayFrom(this.children).forEach(function(e){util.match(e,".fab")&&util.toggleAttribute(e,"disabled",value)}),util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"inline",get:function(){return this.hasAttribute("inline")}},{key:"visible",get:function(){return this._shown&&"none"!==this.style.display}}]),SpeedDialElement}(BaseElement);window.OnsSpeedDialElement=document.registerElement("ons-speed-dial",{prototype:SpeedDialElement.prototype});var rewritables$1={ready:function(element,callback){setImmediate(callback)},link:function(element,target,options,callback){callback(target)}},SplitterContentElement=function(_BaseElement){function SplitterContentElement(){return babelHelpers.classCallCheck(this,SplitterContentElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SplitterContentElement).apply(this,arguments))}return babelHelpers.inherits(SplitterContentElement,_BaseElement),babelHelpers.createClass(SplitterContentElement,[{key:"createdCallback",value:function(){this._page=null}},{key:"attachedCallback",value:function(){if(!util.match(this.parentNode,"ons-splitter"))throw new Error('"ons-splitter-content" must have "ons-splitter" as parentNode.');this.attributeChangedCallback("page",null,this.getAttribute("page"))}},{key:"detachedCallback",value:function(){}},{key:"attributeChangedCallback",value:function(name,last,current){var _this2=this;"page"===name&&null!==current&&rewritables$1.ready(this,function(){return _this2.load(current)})}},{key:"load",value:function(page){var _this3=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this._page=page;var callback=options.callback;return internal.getPageHTMLAsync(page).then(function(html){return new Promise(function(resolve){rewritables$1.link(_this3,util.createFragment(html),options,function(fragment){_this3._hide(),_this3.innerHTML="",_this3.appendChild(fragment),_this3._show(),callback&&callback(),resolve(_this3.firstChild)})})})}},{key:"_show",value:function(){util.propagateAction(this,"_show")}},{key:"_hide",value:function(){util.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){util.propagateAction(this,"_destroy"),this.remove()}},{key:"page",get:function(){return this._page}}]),SplitterContentElement}(BaseElement);window.OnsSplitterContentElement=document.registerElement("ons-splitter-content",{prototype:SplitterContentElement.prototype}),window.OnsSplitterContentElement.rewritables=rewritables$1;var SplitterMaskElement=function(_BaseElement){function SplitterMaskElement(){return babelHelpers.classCallCheck(this,SplitterMaskElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SplitterMaskElement).apply(this,arguments))}return babelHelpers.inherits(SplitterMaskElement,_BaseElement),babelHelpers.createClass(SplitterMaskElement,[{key:"createdCallback",value:function(){this._boundOnClick=this._onClick.bind(this)}},{key:"_onClick",value:function(event){util.match(this.parentNode,"ons-splitter")&&this.parentNode._sides.forEach(function(side){return side.close("left")["catch"](function(){})}),event.stopPropagation()}},{key:"attributeChangedCallback",value:function(name,last,current){}},{key:"attachedCallback",value:function(){this.addEventListener("click",this._boundOnClick)}},{key:"detachedCallback",value:function(){this.removeEventListener("click",this._boundOnClick)}}]),SplitterMaskElement}(BaseElement);window.OnsSplitterMaskElement=document.registerElement("ons-splitter-mask",{prototype:SplitterMaskElement.prototype});var SplitterAnimator=function(){function SplitterAnimator(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];babelHelpers.classCallCheck(this,SplitterAnimator),this._options={timing:"cubic-bezier(.1, .7, .1, 1)",duration:"0.3",delay:"0"},this.updateOptions(options)}return babelHelpers.createClass(SplitterAnimator,[{key:"updateOptions",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];util.extend(this._options,options),this._timing=this._options.timing,this._duration=this._options.duration,this._delay=this._options.delay}},{key:"activate",value:function(sideElement){var splitter=sideElement.parentNode;this._side=sideElement,this._content=splitter.content,this._mask=splitter.mask}},{key:"inactivate",value:function(){this._content=this._side=this._mask=null}},{key:"translate",value:function(distance){animit(this._side).queue({transform:"translate3d("+(this.minus+distance)+"px, 0px, 0px)"}).play()}},{key:"open",value:function(done){animit.runAll(animit(this._side).wait(this._delay).queue({transform:"translate3d("+this.minus+"100%, 0px, 0px)"},{duration:this._duration,timing:this._timing}).queue(function(callback){callback(),done&&done()}),animit(this._mask).wait(this._delay).queue({display:"block"}).queue({opacity:"1"},{duration:this._duration,timing:"linear"}))}},{key:"close",value:function(done){var _this=this;animit.runAll(animit(this._side).wait(this._delay).queue({transform:"translate3d(0px, 0px, 0px)"},{duration:this._duration,timing:this._timing}).queue(function(callback){_this._side.style.webkitTransition="",done&&done(),callback()}),animit(this._mask).wait(this._delay).queue({opacity:"0"},{duration:this._duration,timing:"linear"}).queue({display:"none"}))}},{key:"minus",get:function(){return"right"===this._side._side?"-":""}}]),SplitterAnimator}(),SPLIT_MODE="split",COLLAPSE_MODE="collapse",CLOSED_STATE="closed",OPEN_STATE="open",CHANGING_STATE="changing",rewritables$2={ready:function(splitterSideElement,callback){setImmediate(callback)},link:function(splitterSideElement,target,options,callback){callback(target)}},CollapseDetection=function(){function CollapseDetection(element,target){babelHelpers.classCallCheck(this,CollapseDetection),this._element=element,this._boundOnChange=this._onChange.bind(this),target&&this.changeTarget(target)}return babelHelpers.createClass(CollapseDetection,[{key:"changeTarget",value:function(target){this.disable(),this._target=target,target&&(this._orientation=-1!==["portrait","landscape"].indexOf(target),this.activate())}},{key:"_match",value:function(value){return this._orientation?this._target===(value.isPortrait?"portrait":"landscape"):value.matches}},{key:"_onChange",value:function(value){this._element._updateMode(this._match(value)?COLLAPSE_MODE:SPLIT_MODE)}},{key:"activate",value:function(){this._orientation?(ons.orientation.on("change",this._boundOnChange),this._onChange({isPortrait:ons.orientation.isPortrait()})):(this._queryResult=window.matchMedia(this._target),this._queryResult.addListener(this._boundOnChange),this._onChange(this._queryResult))}},{key:"disable",value:function(){this._orientation?ons.orientation.off("change",this._boundOnChange):this._queryResult&&(this._queryResult.removeListener(this._boundOnChange),this._queryResult=null)}}]),CollapseDetection}(),widthToPx=function(width,parent){var value=parseInt(width,10),px=/px/.test(width);return px?value:Math.round(parent.offsetWidth*value/100)},CollapseMode=function(){function CollapseMode(element){babelHelpers.classCallCheck(this,CollapseMode),this._active=!1,this._state=CLOSED_STATE,this._element=element,this._lock=new DoorLock}return babelHelpers.createClass(CollapseMode,[{key:"_animator",get:function(){return this._element._animator}}]),babelHelpers.createClass(CollapseMode,[{key:"isOpen",value:function(){return this._active&&this._state!==CLOSED_STATE}},{key:"handleGesture",value:function(e){!this._active||this._lock.isLocked()||this._isOpenOtherSideMenu()||("dragstart"===e.type?this._onDragStart(e):this._ignoreDrag||("dragend"===e.type?this._onDragEnd(e):this._onDrag(e)))}},{key:"_onDragStart",value:function(event){var scrolling=!/left|right/.test(event.gesture.direction),distance="left"===this._element._side?event.gesture.center.clientX:window.innerWidth-event.gesture.center.clientX,area=this._element._swipeTargetWidth,isOpen=this.isOpen();this._ignoreDrag=scrolling||area&&distance>area&&!isOpen,this._width=widthToPx(this._element._width,this._element.parentNode),this._startDistance=this._distance=isOpen?this._width:0}},{key:"_onDrag",value:function(event){event.gesture.preventDefault();var delta="left"===this._element._side?event.gesture.deltaX:-event.gesture.deltaX,distance=Math.max(0,Math.min(this._width,this._startDistance+delta));distance!==this._distance&&(this._animator.translate(distance),this._distance=distance,this._state=CHANGING_STATE)}},{key:"_onDragEnd",value:function(event){var distance=this._distance,width=this._width,el=this._element,direction=event.gesture.interimDirection,shouldOpen=el._side!==direction&&distance>width*el._threshold;this.executeAction(shouldOpen?"open":"close")}},{key:"layout",value:function(){this._active&&this._state===OPEN_STATE&&this._animator.open()}},{key:"enterMode",value:function(){this._active||(this._active=!0,this.layout())}},{key:"exitMode",value:function(){this._active=!1}},{key:"_isOpenOtherSideMenu",value:function(){var _this=this;return util.arrayFrom(this._element.parentElement.children).some(function(e){return util.match(e,"ons-splitter-side")&&e!==_this._element&&e.isOpen})}},{key:"executeAction",value:function(name){var _this2=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],FINAL_STATE="open"===name?OPEN_STATE:CLOSED_STATE;if(!this._active)return Promise.resolve(!1);if(this._state===FINAL_STATE)return Promise.resolve(this._element);if(this._lock.isLocked())return Promise.reject("Splitter side is locked.");if("open"===name&&this._isOpenOtherSideMenu())return Promise.reject("Another menu is already open.");if(this._element._emitEvent("pre"+name))return Promise.reject("Canceled in pre"+name+" event.");var callback=options.callback,unlock=this._lock.lock(),done=function(){_this2._state=FINAL_STATE,_this2.layout(),unlock(),_this2._element._emitEvent("post"+name),callback&&callback()};return options.withoutAnimation?(done(),Promise.resolve(this._element)):(this._state=CHANGING_STATE,new Promise(function(resolve){_this2._animator[name](function(){done(),resolve(_this2._element)})}))}}]),CollapseMode}(),SplitterSideElement=function(_BaseElement){function SplitterSideElement(){return babelHelpers.classCallCheck(this,SplitterSideElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SplitterSideElement).apply(this,arguments))}return babelHelpers.inherits(SplitterSideElement,_BaseElement),babelHelpers.createClass(SplitterSideElement,[{key:"createdCallback",value:function(){var _this4=this;this._collapseMode=new CollapseMode(this),this._collapseDetection=new CollapseDetection(this),this._animatorFactory=new AnimatorFactory({animators:window.OnsSplitterElement._animatorDict,baseClass:SplitterAnimator,baseClassName:"SplitterAnimator",defaultAnimation:this.getAttribute("animation")}),this._boundHandleGesture=function(e){return _this4._collapseMode.handleGesture(e)},this._watchedAttributes=["animation","width","side","collapse","swipeable","swipe-target-width","animation-options","open-threshold","page"]}},{key:"attachedCallback",value:function(){var _this5=this;if(!util.match(this.parentNode,"ons-splitter"))throw new Error("Parent must be an ons-splitter element.");this._gestureDetector=new GestureDetector(this.parentElement,{dragMinDistance:1}),this.hasAttribute("side")||this.setAttribute("side","left"),this._watchedAttributes.forEach(function(e){return _this5._update(e)})}},{key:"detachedCallback",value:function(){this._collapseDetection.disable(),this._gestureDetector.dispose(),this._gestureDetector=null}},{key:"attributeChangedCallback",value:function(name,last,current){-1!==this._watchedAttributes.indexOf(name)&&this._update(name,current)}},{key:"_update",value:function(name,value){return name="_update"+name.split("-").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(""),this[name](value)}},{key:"_emitEvent",value:function(name){if("pre"!==name.slice(0,3))return util.triggerElementEvent(this,name,{side:this});var isCanceled=!1;return util.triggerElementEvent(this,name,{side:this,cancel:function(){return isCanceled=!0}}),isCanceled}},{key:"_updateCollapse",value:function(){var value=arguments.length<=0||void 0===arguments[0]?this.getAttribute("collapse"):arguments[0];return null===value||"split"===value?(this._collapseDetection.disable(),this._updateMode(SPLIT_MODE)):""===value||"collapse"===value?(this._collapseDetection.disable(),this._updateMode(COLLAPSE_MODE)):void this._collapseDetection.changeTarget(value)}},{key:"_updateMode",value:function(mode){mode!==this._mode&&(this._mode=mode,this._collapseMode[mode===COLLAPSE_MODE?"enterMode":"exitMode"](),this.setAttribute("mode",mode),util.triggerElementEvent(this,"modechange",{side:this,mode:mode}))}},{key:"_updatePage",value:function(){var _this6=this,page=arguments.length<=0||void 0===arguments[0]?this.getAttribute("page"):arguments[0];null!==page&&rewritables$2.ready(this,function(){return _this6.load(page)})}},{key:"_updateOpenThreshold",value:function(){var threshold=arguments.length<=0||void 0===arguments[0]?this.getAttribute("open-threshold"):arguments[0];this._threshold=Math.max(0,Math.min(1,parseFloat(threshold)||.3))}},{key:"_updateSwipeable",value:function(){var swipeable=arguments.length<=0||void 0===arguments[0]?this.getAttribute("swipeable"):arguments[0],action=null===swipeable?"off":"on";this._gestureDetector&&this._gestureDetector[action]("dragstart dragleft dragright dragend",this._boundHandleGesture)}},{key:"_updateSwipeTargetWidth",value:function(){var value=arguments.length<=0||void 0===arguments[0]?this.getAttribute("swipe-target-width"):arguments[0];this._swipeTargetWidth=Math.max(0,parseInt(value)||0)}},{key:"_updateWidth",value:function(){var width=arguments.length<=0||void 0===arguments[0]?this.getAttribute("width"):arguments[0];this._width=/^\d+(px|%)$/.test(width)?width:"80%",this.style.width=this._width}},{key:"_updateSide",value:function(){var side=arguments.length<=0||void 0===arguments[0]?this.getAttribute("side"):arguments[0];this._side="right"===side?side:"left"}},{key:"_updateAnimation",value:function(){var animation=arguments.length<=0||void 0===arguments[0]?this.getAttribute("animation"):arguments[0];this._animator=this._animatorFactory.newAnimator({animation:animation}),this._animator.activate(this)}},{key:"_updateAnimationOptions",value:function(){var value=arguments.length<=0||void 0===arguments[0]?this.getAttribute("animation-options"):arguments[0];this._animator.updateOptions(AnimatorFactory.parseAnimationOptionsString(value))}},{key:"open",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._collapseMode.executeAction("open",options)}},{key:"close",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._collapseMode.executeAction("close",options)}},{key:"toggle",value:function(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this.isOpen?this.close(options):this.open(options)}},{key:"load",value:function(page){var _this7=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this._page=page;var callback=options.callback;return internal.getPageHTMLAsync(page).then(function(html){return new Promise(function(resolve){rewritables$2.link(_this7,util.createFragment(html),options,function(fragment){_this7._hide(),_this7.innerHTML="",_this7.appendChild(fragment),_this7._show(),callback&&callback(),resolve(_this7.firstChild)})})})}},{key:"_show",value:function(){util.propagateAction(this,"_show")}},{key:"_hide",value:function(){util.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){util.propagateAction(this,"_destroy"),this.remove()}},{key:"page",get:function(){return this._page}},{key:"mode",get:function(){return this._mode}},{key:"isOpen",get:function(){return this._collapseMode.isOpen()}}]),SplitterSideElement}(BaseElement);window.OnsSplitterSideElement=document.registerElement("ons-splitter-side",{prototype:SplitterSideElement.prototype}),window.OnsSplitterSideElement.rewritables=rewritables$2;var SplitterElement=function(_BaseElement){function SplitterElement(){return babelHelpers.classCallCheck(this,SplitterElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SplitterElement).apply(this,arguments))}return babelHelpers.inherits(SplitterElement,_BaseElement),babelHelpers.createClass(SplitterElement,[{key:"_getSide",value:function(side){var element=util.findChild(this,function(e){return util.match(e,"ons-splitter-side")&&e.getAttribute("side")===side});return element&&CustomElements.upgrade(element),element}},{key:"_onDeviceBackButton",value:function(handler){this._sides.some(function(s){return s.isOpen?s.close():!1})||handler.callParentHandler()}},{key:"_onModeChange",value:function(e){e.target.parentNode&&this._layout()}},{key:"_layout",value:function(){var _this2=this;this._sides.forEach(function(side){_this2.content.style[side._side]="split"===side.mode?side._width:0})}},{key:"createdCallback",value:function(){this._boundOnDeviceBackButton=this._onDeviceBackButton.bind(this),this._boundOnModeChange=this._onModeChange.bind(this)}},{key:"attachedCallback",value:function(){var _this3=this;this._backButtonHandler=deviceBackButtonDispatcher.createHandler(this,this._boundOnDeviceBackButton),this.addEventListener("modechange",this._boundOnModeChange,!1),setImmediate(function(){return _this3._layout()})}},{key:"detachedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this.removeEventListener("modechange",this._boundOnModeChange,!1)}},{key:"attributeChangedCallback",value:function(name,last,current){}},{key:"_show",value:function(){util.propagateAction(this,"_show")}},{key:"_hide",value:function(){util.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){util.propagateAction(this,"_destroy"),this.remove()}},{key:"left",get:function(){return this._getSide("left")}},{key:"right",get:function(){return this._getSide("right")}},{key:"_sides",get:function(){return[this.left,this.right].filter(function(e){return e})}},{key:"content",get:function(){return util.findChild(this,"ons-splitter-content")||this.appendChild(document.createElement("ons-splitter-content"))}},{key:"mask",get:function(){return util.findChild(this,"ons-splitter-mask")||this.appendChild(document.createElement("ons-splitter-mask"))}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler}}]),SplitterElement}(BaseElement);window.OnsSplitterElement=document.registerElement("ons-splitter",{prototype:SplitterElement.prototype}),window.OnsSplitterElement._animatorDict={"default":SplitterAnimator,overlay:SplitterAnimator},window.OnsSplitterElement.registerAnimator=function(name,Animator){if(!(Animator instanceof SplitterAnimator))throw new Error("Animator parameter must be an instance of SplitterAnimator.");window.OnsSplitterElement._animatorDict[name]=Animator},window.OnsSplitterElement.SplitterAnimator=SplitterAnimator;var scheme$19={"":"switch--*",".switch__input":"switch--*__input",".switch__handle":"switch--*__handle",".switch__toggle":"switch--*__toggle"},template$2=util.createFragment('\n  <input type="checkbox" class="switch__input">\n  <div class="switch__toggle">\n    <div class="switch__handle">\n      <div class="switch__touch"></div>\n    </div>\n  </div>\n'),locations={ios:[1,21],material:[0,16]},SwitchElement=function(_BaseElement){function SwitchElement(){return babelHelpers.classCallCheck(this,SwitchElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SwitchElement).apply(this,arguments))}return babelHelpers.inherits(SwitchElement,_BaseElement),babelHelpers.createClass(SwitchElement,[{key:"createdCallback",value:function(){var _this2=this;this.hasAttribute("_compiled")||this._compile(),this._checkbox=this.querySelector(".switch__input"),this._handle=this.querySelector(".switch__handle"),["checked","disabled","modifier","name","input-id"].forEach(function(e){_this2.attributeChangedCallback(e,null,_this2.getAttribute(e))})}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("switch"),this.appendChild(template$2.cloneNode(!0)),this.setAttribute("_compiled","")}},{key:"detachedCallback",value:function(){this._checkbox.removeEventListener("change",this._onChange),this.removeEventListener("dragstart",this._onDragStart),this.removeEventListener("hold",this._onHold),this.removeEventListener("tap",this.click),this.removeEventListener("click",this._onClick),this._gestureDetector.dispose()}},{key:"attachedCallback",value:function(){this._checkbox.addEventListener("change",this._onChange),this._gestureDetector=new GestureDetector(this,{dragMinDistance:1,holdTimeout:251}),this.addEventListener("dragstart",this._onDragStart),this.addEventListener("hold",this._onHold),this.addEventListener("tap",this.click),this._boundOnRelease=this._onRelease.bind(this),this.addEventListener("click",this._onClick)}},{key:"_onChange",value:function(){this.checked?this.parentNode.setAttribute("checked",""):this.parentNode.removeAttribute("checked")}},{key:"_onClick",value:function(ev){ev.target.classList.contains("switch__touch")&&ev.preventDefault()}},{key:"click",value:function(){this.disabled||(this.checked=!this.checked,util.triggerElementEvent(this.checkbox,"change"))}},{key:"_getPosition",value:function(e){var l=this._locations;return Math.min(l[1],Math.max(l[0],this._startX+e.gesture.deltaX))}},{key:"_onHold",value:function(e){this.disabled||(this.classList.add("switch--active"),document.addEventListener("release",this._boundOnRelease))}},{key:"_onDragStart",value:function(e){return this.disabled||-1===["left","right"].indexOf(e.gesture.direction)?void this.classList.remove("switch--active"):(this.classList.add("switch--active"),this._startX=this._locations[this.checked?1:0],this.addEventListener("drag",this._onDrag),void document.addEventListener("release",this._boundOnRelease))}},{key:"_onDrag",value:function(e){e.gesture.srcEvent.preventDefault(),this._handle.style.left=this._getPosition(e)+"px"}},{key:"_onRelease",value:function(e){var l=this._locations,position=this._getPosition(e);this.checked=position>=(l[0]+l[1])/2,this.removeEventListener("drag",this._onDrag),document.removeEventListener("release",this._boundOnRelease),this._handle.style.left="",this.classList.remove("switch--active")}},{key:"attributeChangedCallback",value:function(name,last,current){switch(name){case"modifier":this._isMaterial=-1!==(current||"").indexOf("material"),this._locations=locations[this._isMaterial?"material":"ios"],ModifierUtil.onModifierChanged(last,current,this,scheme$19);break;case"input-id":this._checkbox.id=current;break;case"checked":this._checkbox.checked=null!==current,util.toggleAttribute(this._checkbox,name,null!==current);break;case"disabled":util.toggleAttribute(this._checkbox,name,null!==current)}}},{key:"checked",get:function(){return this._checkbox.checked},set:function(value){return!!value!==this._checkbox.checked?(this._checkbox.click(),this._checkbox.checked=!!value,util.toggleAttribute(this,"checked",this.checked)):void 0}},{key:"disabled",get:function(){return this._checkbox.disabled},set:function(value){return this._checkbox.disabled=value,util.toggleAttribute(this,"disabled",this.disabled)}},{key:"checkbox",get:function(){return this._checkbox}}]),SwitchElement}(BaseElement);window.OnsSwitchElement=document.registerElement("ons-switch",{prototype:SwitchElement.prototype});var TabbarAnimator=function(){function TabbarAnimator(){var options=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];babelHelpers.classCallCheck(this,TabbarAnimator),this.timing=options.timing||"linear",this.duration=void 0!==options.duration?options.duration:"0.4",this.delay=void 0!==options.delay?options.delay:"0"}return babelHelpers.createClass(TabbarAnimator,[{key:"apply",value:function(enterPage,leavePage,enterPageIndex,leavePageIndex,done){throw new Error("This method must be implemented.")}}]),TabbarAnimator}(),TabbarNoneAnimator=function(_TabbarAnimator){function TabbarNoneAnimator(){return babelHelpers.classCallCheck(this,TabbarNoneAnimator),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TabbarNoneAnimator).apply(this,arguments))}return babelHelpers.inherits(TabbarNoneAnimator,_TabbarAnimator),babelHelpers.createClass(TabbarNoneAnimator,[{key:"apply",value:function(enterPage,leavePage,enterIndex,leaveIndex,done){setTimeout(done,1e3/60)}}]),TabbarNoneAnimator}(TabbarAnimator),TabbarFadeAnimator=function(_TabbarAnimator2){function TabbarFadeAnimator(options){return babelHelpers.classCallCheck(this,TabbarFadeAnimator),options.timing=void 0!==options.timing?options.timing:"linear",options.duration=void 0!==options.duration?options.duration:"0.4",options.delay=void 0!==options.delay?options.delay:"0",babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TabbarFadeAnimator).call(this,options))}return babelHelpers.inherits(TabbarFadeAnimator,_TabbarAnimator2),babelHelpers.createClass(TabbarFadeAnimator,[{key:"apply",value:function(enterPage,leavePage,enterPageIndex,leavePageIndex,done){animit.runAll(animit(enterPage).saveStyle().queue({transform:"translate3D(0, 0, 0)",opacity:0}).wait(this.delay).queue({transform:"translate3D(0, 0, 0)",opacity:1},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(callback){done(),callback()}),animit(leavePage).queue({transform:"translate3D(0, 0, 0)",opacity:1}).wait(this.delay).queue({transform:"translate3D(0, 0, 0)",opacity:0},{duration:this.duration,timing:this.timing}))}}]),TabbarFadeAnimator}(TabbarAnimator),TabbarSlideAnimator=function(_TabbarAnimator3){function TabbarSlideAnimator(options){return babelHelpers.classCallCheck(this,TabbarSlideAnimator),options.timing=void 0!==options.timing?options.timing:"ease-in",options.duration=void 0!==options.duration?options.duration:"0.15",options.delay=void 0!==options.delay?options.delay:"0",babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TabbarSlideAnimator).call(this,options))}return babelHelpers.inherits(TabbarSlideAnimator,_TabbarAnimator3),babelHelpers.createClass(TabbarSlideAnimator,[{key:"apply",value:function(enterPage,leavePage,enterIndex,leaveIndex,done){var sgn=enterIndex>leaveIndex;animit.runAll(animit(enterPage).saveStyle().queue({transform:"translate3D("+(sgn?"":"-")+"100%, 0, 0)"}).wait(this.delay).queue({transform:"translate3D(0, 0, 0)"},{duration:this.duration,timing:this.timing}).restoreStyle().queue(function(callback){done(),callback()}),animit(leavePage).queue({transform:"translate3D(0, 0, 0)"}).wait(this.delay).queue({transform:"translate3D("+(sgn?"-":"")+"100%, 0, 0)"},{duration:this.duration,timing:this.timing}))}}]),TabbarSlideAnimator}(TabbarAnimator),scheme$21={".tab-bar__content":"tab-bar--*__content",".tab-bar":"tab-bar--*"},_animatorDict$5={"default":TabbarNoneAnimator,fade:TabbarFadeAnimator,slide:TabbarSlideAnimator,none:TabbarNoneAnimator},rewritables$3={ready:function(tabbarElement,callback){
callback()},link:function(tabbarElement,target,options,callback){callback(target)},unlink:function(tabbarElement,target,callback){callback(target)}},generateId$1=function(){var i=0;return function(){return"ons-tabbar-gen-"+i++}}(),TabbarElement=function(_BaseElement){function TabbarElement(){return babelHelpers.classCallCheck(this,TabbarElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TabbarElement).apply(this,arguments))}return babelHelpers.inherits(TabbarElement,_BaseElement),babelHelpers.createClass(TabbarElement,[{key:"createdCallback",value:function(){var _this2=this;this._tabbarId=generateId$1(),contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile();for(var i=0;i<_this2.firstChild.children.length;i++)_this2.firstChild.children[i].style.display="none";var activeIndex=_this2.getAttribute("activeIndex");activeIndex&&_this2.children[1].children.length>activeIndex&&_this2.children[1].children[activeIndex].setAttribute("active","true"),autoStyle.prepare(_this2),ModifierUtil.initModifier(_this2,scheme$21),_this2._animatorFactory=new AnimatorFactory({animators:_animatorDict$5,baseClass:TabbarAnimator,baseClassName:"TabbarAnimator",defaultAnimation:_this2.getAttribute("animation")})})}},{key:"_compile",value:function(){for(var content=util.create(".ons-tab-bar__content.tab-bar__content"),tabbar=util.create(".tab-bar.ons-tab-bar__footer.ons-tabbar-inner");this.firstChild;)tabbar.appendChild(this.firstChild);this.appendChild(content),this.appendChild(tabbar),this._updatePosition(),this.setAttribute("_compiled","")}},{key:"_updatePosition",value:function(){var _this3=this,position=arguments.length<=0||void 0===arguments[0]?this.getAttribute("position"):arguments[0],top=this._top="top"===position||"auto"===position&&platform.isAndroid(),action=top?util.addModifier:util.removeModifier;action(this,"top");var page=util.findParent(this,"ons-page");page&&(this.style.top=top?window.getComputedStyle(page._getContentElement(),null).getPropertyValue("padding-top"):"",util.match(page.firstChild,"ons-toolbar")&&action(page.firstChild,"noshadow")),internal.autoStatusBarFill(function(){var filled=util.findParent(_this3,function(e){return e.hasAttribute("status-bar-fill")});util.toggleAttribute(_this3,"status-bar-fill",top&&!filled)})}},{key:"_getTabbarElement",value:function(){return util.findChild(this,".tab-bar")}},{key:"loadPage",value:function(page){var _this4=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(resolve){OnsTabElement.prototype._createPageElement(page,function(pageElement){resolve(_this4._loadPageDOMAsync(pageElement,options))})})}},{key:"_loadPageDOMAsync",value:function(pageElement){var _this5=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(resolve){rewritables$3.link(_this5,pageElement,options,function(pageElement){_this5._contentElement.appendChild(pageElement),-1!==_this5.getActiveTabIndex()?resolve(_this5._switchPage(pageElement,options)):(options.callback instanceof Function&&options.callback(),_this5._oldPageElement=pageElement,resolve(pageElement))})})}},{key:"getTabbarId",value:function(){return this._tabbarId}},{key:"_getCurrentPageElement",value:function(){for(var pages=this._contentElement.children,page=null,i=0;i<pages.length;i++)if("none"!==pages[i].style.display){page=pages[i];break}if(page&&"ons-page"!==page.nodeName.toLowerCase())throw new Error('Invalid state: page element must be a "ons-page" element.');return page}},{key:"_switchPage",value:function(element,options){var oldPageElement=this._oldPageElement||internal.nullElement;this._oldPageElement=element;var animator=this._animatorFactory.newAnimator(options);return new Promise(function(resolve){oldPageElement!==internal.nullElement&&oldPageElement._hide(),animator.apply(element,oldPageElement,options.selectedTabIndex,options.previousTabIndex,function(){oldPageElement!==internal.nullElement&&(oldPageElement.style.display="none"),element.style.display="block",element._show(),options.callback instanceof Function&&options.callback(),resolve(element)})})}},{key:"setActiveTab",value:function(index){var _this6=this,options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(options&&"object"!=("undefined"==typeof options?"undefined":babelHelpers["typeof"](options)))throw new Error("options must be an object. You supplied "+options);options.animationOptions=util.extend(options.animationOptions||{},AnimatorFactory.parseAnimationOptionsString(this.getAttribute("animation-options"))),!options.animation&&this.hasAttribute("animation")&&(options.animation=this.getAttribute("animation"));var previousTab=this._getActiveTabElement(),selectedTab=this._getTabElement(index),previousTabIndex=this.getActiveTabIndex(),selectedTabIndex=index,previousPageElement=this._getCurrentPageElement();if(!selectedTab)return Promise.reject("Specified index does not match any tab.");if(selectedTabIndex===previousTabIndex)return util.triggerElementEvent(this,"reactive",{index:selectedTabIndex,tabItem:selectedTab}),Promise.resolve(previousPageElement);var canceled=!1;if(util.triggerElementEvent(this,"prechange",{index:selectedTabIndex,tabItem:selectedTab,cancel:function(){return canceled=!0}}),canceled)return selectedTab.setInactive(),previousTab&&previousTab.setActive(),Promise.reject("Canceled in prechange event.");selectedTab.setActive();var needLoad=!selectedTab.isLoaded()&&!options.keepPage;if(util.arrayFrom(this._getTabbarElement().children).forEach(function(tab){tab!=selectedTab?tab.setInactive():needLoad||util.triggerElementEvent(_this6,"postchange",{index:selectedTabIndex,tabItem:selectedTab})}),needLoad){var removeElement,params,_ret=function(){removeElement=!1,(!previousTab&&previousPageElement||previousTab&&previousTab._pageElement!==previousPageElement)&&(removeElement=!0),params={callback:function(){util.triggerElementEvent(_this6,"postchange",{index:selectedTabIndex,tabItem:selectedTab}),options.callback instanceof Function&&options.callback()},previousTabIndex:previousTabIndex,selectedTabIndex:selectedTabIndex},options.animation&&(params.animation=options.animation),params.animationOptions=options.animationOptions||{};var link=function(element,callback){rewritables$3.link(_this6,element,options,callback)};return{v:new Promise(function(resolve){selectedTab._loadPageElement(function(pageElement){resolve(_this6._loadPersistentPageDOM(pageElement,params))},link)})}}();if("object"===("undefined"==typeof _ret?"undefined":babelHelpers["typeof"](_ret)))return _ret.v}return Promise.resolve(previousPageElement)}},{key:"_loadPersistentPageDOM",value:function(element){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return util.isAttached(element)||this._contentElement.appendChild(element),element.removeAttribute("style"),this._switchPage(element,options)}},{key:"setTabbarVisibility",value:function(visible){this._contentElement.style[this._top?"top":"bottom"]=visible?"":"0px",this._getTabbarElement().style.display=visible?"":"none"}},{key:"getActiveTabIndex",value:function(){for(var tabs=this._getTabbarElement().children,i=0;i<tabs.length;i++)if(tabs[i]instanceof window.OnsTabElement&&tabs[i].isActive&&tabs[i].isActive())return i;return-1}},{key:"_getActiveTabElement",value:function(){return this._getTabElement(this.getActiveTabIndex())}},{key:"_getTabElement",value:function(index){return this._getTabbarElement().children[index]}},{key:"detachedCallback",value:function(){}},{key:"attachedCallback",value:function(){}},{key:"_show",value:function(){var currentPageElement=this._getCurrentPageElement();currentPageElement&&currentPageElement._show()}},{key:"_hide",value:function(){var currentPageElement=this._getCurrentPageElement();currentPageElement&&currentPageElement._hide()}},{key:"_destroy",value:function(){for(var pages=this._contentElement.children,i=pages.length-1;i>=0;i--)pages[i]._destroy();this.remove()}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$21):void 0}},{key:"_contentElement",get:function(){return util.findChild(this,".tab-bar__content")}},{key:"pages",get:function(){return util.arrayFrom(this._contentElement.children)}}]),TabbarElement}(BaseElement);window.OnsTabbarElement=document.registerElement("ons-tabbar",{prototype:TabbarElement.prototype}),window.OnsTabbarElement.registerAnimator=function(name,Animator){if(!(Animator.prototype instanceof TabbarAnimator))throw new Error('"Animator" param must inherit OnsTabbarElement.TabbarAnimator');_animatorDict$5[name]=Animator},window.OnsTabbarElement.rewritables=rewritables$3,window.OnsTabbarElement.TabbarAnimator=TabbarAnimator;var OnsTabbarElement$1=OnsTabbarElement,scheme$20={"":"tab-bar--*__item",".tab-bar__button":"tab-bar--*__button"},templateSource$2=util.createElement('\n  <div>\n    <input type="radio" style="display: none">\n    <button class="tab-bar__button tab-bar-inner"></button>\n  </div>\n'),defaultInnerTemplateSource=util.createElement('\n  <div>\n    <div class="tab-bar__icon">\n      <ons-icon icon="ion-cloud"></ons-icon>\n    </div>\n    <div class="tab-bar__label">label</div>\n  </div>\n'),TabElement=function(_BaseElement){function TabElement(){return babelHelpers.classCallCheck(this,TabElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TabElement).apply(this,arguments))}return babelHelpers.inherits(TabElement,_BaseElement),babelHelpers.createClass(TabElement,[{key:"createdCallback",value:function(){var _this2=this;this.hasAttribute("label")||this.hasAttribute("icon")?this.hasAttribute("_compiled")||this._compile():contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile()}),this._boundOnClick=this._onClick.bind(this)}},{key:"_compile",value:function(){autoStyle.prepare(this);for(var fragment=document.createDocumentFragment(),hasChildren=!1;this.childNodes[0];){var node=this.childNodes[0];this.removeChild(node),fragment.appendChild(node),node.nodeType==Node.ELEMENT_NODE&&(hasChildren=!0)}for(var template=templateSource$2.cloneNode(!0);template.children[0];)this.appendChild(template.children[0]);this.classList.add("tab-bar__item");var button=util.findChild(this,".tab-bar__button");hasChildren?(button.appendChild(fragment),this._hasDefaultTemplate=!1):(this._hasDefaultTemplate=!0,this._updateDefaultTemplate()),ModifierUtil.initModifier(this,scheme$20),this._updateRipple(),this.setAttribute("_compiled","")}},{key:"_updateRipple",value:function(){}},{key:"_updateDefaultTemplate",value:function(){function getLabelElement(){return self.querySelector(".tab-bar__label")}function getIconElement(){return self.querySelector("ons-icon")}if(this._hasDefaultTemplate){var button=util.findChild(this,".tab-bar__button"),template=defaultInnerTemplateSource.cloneNode(!0);button.querySelector(".tab-bar__icon")||button.insertBefore(template.querySelector(".tab-bar__icon"),button.firstChild),button.querySelector(".tab-bar__label")||button.appendChild(template.querySelector(".tab-bar__label"));var self=this,icon=this.getAttribute("icon"),label=this.getAttribute("label");if("string"==typeof icon)getIconElement().setAttribute("icon",icon);else{var wrapper=button.querySelector(".tab-bar__icon");wrapper&&wrapper.remove()}if("string"==typeof label)getLabelElement().textContent=label;else{var _label=getLabelElement();_label&&_label.remove()}}}},{key:"_onClick",value:function(){var tabbar=this._findTabbarElement();tabbar&&tabbar.setActiveTab(this._findTabIndex())}},{key:"setActive",value:function(){var radio=util.findChild(this,"input");radio.checked=!0,this.classList.add("active"),util.arrayFrom(this.querySelectorAll("[ons-tab-inactive], ons-tab-inactive")).forEach(function(element){return element.style.display="none"}),util.arrayFrom(this.querySelectorAll("[ons-tab-active], ons-tab-active")).forEach(function(element){return element.style.display="inherit"})}},{key:"setInactive",value:function(){var radio=util.findChild(this,"input");radio.checked=!1,this.classList.remove("active"),util.arrayFrom(this.querySelectorAll("[ons-tab-inactive], ons-tab-inactive")).forEach(function(element){return element.style.display="inherit"}),util.arrayFrom(this.querySelectorAll("[ons-tab-active], ons-tab-active")).forEach(function(element){return element.style.display="none"})}},{key:"isLoaded",value:function(){return!1}},{key:"_loadPageElement",value:function(callback,link){var _this3=this;this.pageElement?callback(this.pageElement):this._createPageElement(this.getAttribute("page"),function(element){link(element,function(element){_this3.pageElement=element,callback(element)})})}},{key:"_createPageElement",value:function(page,callback){internal.getPageHTMLAsync(page).then(function(html){callback(util.createElement(html.trim()))})}},{key:"isActive",value:function(){return this.classList.contains("active")}},{key:"detachedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"attachedCallback",value:function(){var _this4=this;contentReady(this,function(){_this4._ensureElementPosition();var tabbar=_this4._findTabbarElement();if(tabbar.hasAttribute("modifier")){var prefix=_this4.hasAttribute("modifier")?_this4.getAttribute("modifier")+" ":"";_this4.setAttribute("modifier",prefix+tabbar.getAttribute("modifier"))}_this4.hasAttribute("active")?!function(){var tabIndex=_this4._findTabIndex();OnsTabbarElement$1.rewritables.ready(tabbar,function(){setImmediate(function(){return tabbar.setActiveTab(tabIndex,{animation:"none"})})})}():OnsTabbarElement$1.rewritables.ready(tabbar,function(){setImmediate(function(){_this4.hasAttribute("page")&&_this4._createPageElement(_this4.getAttribute("page"),function(pageElement){OnsTabbarElement$1.rewritables.link(tabbar,pageElement,{},function(pageElement){_this4.pageElement=pageElement,_this4.pageElement.style.display="none",tabbar._contentElement.appendChild(_this4.pageElement)})})})}),_this4.addEventListener("click",_this4._boundOnClick,!1)})}},{key:"_findTabbarElement",value:function(){return this.parentNode&&"ons-tabbar"===this.parentNode.nodeName.toLowerCase()?this.parentNode:this.parentNode.parentNode&&"ons-tabbar"===this.parentNode.parentNode.nodeName.toLowerCase()?this.parentNode.parentNode:null}},{key:"_findTabIndex",value:function(){for(var elements=this.parentNode.children,i=0;i<elements.length;i++)if(this===elements[i])return i}},{key:"_ensureElementPosition",value:function(){if(!this._findTabbarElement())throw new Error("This ons-tab element is must be child of ons-tabbar element.")}},{key:"attributeChangedCallback",value:function(name,last,current){var _this5=this;switch(name){case"modifier":contentReady(this,function(){return ModifierUtil.onModifierChanged(last,current,_this5,scheme$20)});break;case"ripple":contentReady(this,function(){return _this5._updateRipple()});break;case"icon":case"label":contentReady(this,function(){return _this5._updateDefaultTemplate()})}}},{key:"pageElement",set:function(el){this._pageElement=el},get:function(){if("undefined"!=typeof this._pageElement)return this._pageElement;var tabbar=this._findTabbarElement(),index=this._findTabIndex();return tabbar._contentElement.children[index]}}]),TabElement}(BaseElement);window.OnsTabElement=document.registerElement("ons-tab",{prototype:TabElement.prototype}),document.registerElement("ons-tabbar-item",{prototype:Object.create(TabElement.prototype)});var scheme$22={"":"toolbar-button--*"},ToolbarButtonElement=function(_BaseElement){function ToolbarButtonElement(){return babelHelpers.classCallCheck(this,ToolbarButtonElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ToolbarButtonElement).apply(this,arguments))}return babelHelpers.inherits(ToolbarButtonElement,_BaseElement),babelHelpers.createClass(ToolbarButtonElement,[{key:"createdCallback",value:function(){this.hasAttribute("_compiled")||this._compile()}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("toolbar-button"),ModifierUtil.initModifier(this,scheme$22),this.setAttribute("_compiled","")}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$22):void 0}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}}]),ToolbarButtonElement}(BaseElement);window.OnsToolbarButton=document.registerElement("ons-toolbar-button",{prototype:ToolbarButtonElement.prototype});var scheme$23={"":"navigation-bar--*",".navigation-bar__left":"navigation-bar--*__left",".navigation-bar__center":"navigation-bar--*__center",".navigation-bar__right":"navigation-bar--*__right"},ToolbarElement=function(_BaseElement){function ToolbarElement(){return babelHelpers.classCallCheck(this,ToolbarElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ToolbarElement).apply(this,arguments))}return babelHelpers.inherits(ToolbarElement,_BaseElement),babelHelpers.createClass(ToolbarElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile()}),this._tryToEnsureNodePosition(),setImmediate(function(){return _this2._tryToEnsureNodePosition()})}},{key:"attributeChangedCallback",value:function(name,last,current){return"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$23):void 0}},{key:"attachedCallback",value:function(){var _this3=this;this._tryToEnsureNodePosition(),setImmediate(function(){return _this3._tryToEnsureNodePosition()})}},{key:"_tryToEnsureNodePosition",value:function(){if(this.parentNode&&!this.hasAttribute("inline")){var page=util.findParent(this,"ons-page");page&&page!==this.parentNode&&page._registerToolbar(this)}}},{key:"_getToolbarLeftItemsElement",value:function(){return this.querySelector(".left")||internal.nullElement}},{key:"_getToolbarCenterItemsElement",value:function(){return this.querySelector(".center")||internal.nullElement}},{key:"_getToolbarRightItemsElement",value:function(){return this.querySelector(".right")||internal.nullElement}},{key:"_getToolbarBackButtonLabelElement",value:function(){return this.querySelector("ons-back-button .back-button__label")||internal.nullElement}},{key:"_compile",value:function(){autoStyle.prepare(this),this.classList.add("navigation-bar"),this._ensureToolbarItemElements(),ModifierUtil.initModifier(this,scheme$23),this.setAttribute("_compiled","")}},{key:"_ensureToolbarItemElements",value:function(){for(var i=this.childNodes.length-1;i>=0;i--)1!=this.childNodes[i].nodeType&&this.removeChild(this.childNodes[i]);var center=this._ensureToolbarElement("center");if(center.classList.add("navigation-bar__title"),1!==this.children.length||!this.children[0].classList.contains("center")){var left=this._ensureToolbarElement("left"),right=this._ensureToolbarElement("right");this.children[0]===left&&this.children[1]===center&&this.children[2]===right||(this.appendChild(left),this.appendChild(center),this.appendChild(right))}}},{key:"_ensureToolbarElement",value:function(name){var element=util.findChild(this,"."+name)||util.create("."+name);return element.classList.add("navigation-bar__"+name),element}}]),ToolbarElement}(BaseElement);window.OnsToolbarElement=document.registerElement("ons-toolbar",{prototype:ToolbarElement.prototype});var scheme$24={".range":"range--*",".range__left":"range--*__left"},templateSource$3=util.createElement('<div>\n  <div class="range__left"></div>\n  <input type="range" class="range">\n</div>'),INPUT_ATTRIBUTES$1=["autofocus","disabled","inputmode","max","min","name","placeholder","readonly","size","step","validator","value"],RangeElement=function(_BaseElement){function RangeElement(){return babelHelpers.classCallCheck(this,RangeElement),babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(RangeElement).apply(this,arguments))}return babelHelpers.inherits(RangeElement,_BaseElement),babelHelpers.createClass(RangeElement,[{key:"createdCallback",value:function(){var _this2=this;contentReady(this,function(){_this2.hasAttribute("_compiled")||_this2._compile(),_this2._updateBoundAttributes(),_this2._onChange()})}},{key:"_compile",value:function(){if(autoStyle.prepare(this),!util.findChild(this,".range__left")||!util.findChild(this,"input"))for(var template=templateSource$3.cloneNode(!0);template.children[0];)this.appendChild(template.children[0]);ModifierUtil.initModifier(this,scheme$24),this.setAttribute("_compiled","")}},{key:"_onChange",value:function(){this._left.style.width=100*this._ratio+"%"}},{key:"attributeChangedCallback",value:function(name,last,current){var _this3=this;"modifier"===name?ModifierUtil.onModifierChanged(last,current,this,scheme$24):INPUT_ATTRIBUTES$1.indexOf(name)>=0&&contentReady(this,function(){_this3._updateBoundAttributes(),"min"!==name&&"max"!==name||_this3._onChange()})}},{key:"attachedCallback",value:function(){this.addEventListener("input",this._onChange)}},{key:"detachedCallback",value:function(){this.removeEventListener("input",this._onChange)}},{key:"_updateBoundAttributes",value:function(){var _this4=this;INPUT_ATTRIBUTES$1.forEach(function(attr){_this4.hasAttribute(attr)?_this4._input.setAttribute(attr,_this4.getAttribute(attr)):_this4._input.removeAttribute(attr)})}},{key:"_ratio",get:function(){var min=""===this._input.min?0:parseInt(this._input.min),max=""===this._input.max?100:parseInt(this._input.max);return(this.value-min)/(max-min)}},{key:"_input",get:function(){return this.querySelector("input")}},{key:"_left",get:function(){return this.querySelector(".range__left")}},{key:"disabled",set:function(value){return util.toggleAttribute(this,"disabled",value)},get:function(){return this.hasAttribute("disabled")}},{key:"value",get:function(){return this._input.value},set:function(val){var _this5=this;contentReady(this,function(){_this5._input.value=val,_this5._onChange()})}}]),RangeElement}(BaseElement);return window.OnsRangeElement=document.registerElement("ons-range",{prototype:RangeElement.prototype}),window.addEventListener("load",function(){ons$1.fastClick=FastClick.attach(document.body)},!1),window.addEventListener("DOMContentLoaded",function(){ons$1._deviceBackButtonDispatcher.enable(),ons$1._defaultDeviceBackButtonHandler=ons$1._deviceBackButtonDispatcher.createHandler(window.document.body,function(){navigator.app.exitApp()}),document.body._gestureDetector=new ons$1.GestureDetector(document.body)},!1),ons$1.ready(function(){ons$1._setupLoadingPlaceHolders()}),(new Viewport).setup(),ons$1});
html {
  height: 100%;
  width: 100%;
}
body {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  padding: 0;
  margin: 0;
  -webkit-text-size-adjust: 100%;
}
*:not(input):not(textarea):not(select) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
input:active,
input:focus,
textarea:active,
textarea:focus,
select:active,
select:focus {
  outline: none;
}
h1 {
  font-size: 36px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4,
h5,
h6 {
  font-size: 18px;
}
.page {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  background-color: #f9f9f9;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  overflow: visible;
  font-size: 17px;
  color: #1f1f21;
  -ms-overflow-style: none;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}
.page::-webkit-scrollbar {
  display: none;
}
.page__content {
  background-color: #f9f9f9;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.page__background {
  background-color: #f9f9f9;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.content-padded {
  padding: 8px;
}
.page--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.page--material__content {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}
.page--material__content h1,
.page--material__content h2,
.page--material__content h3,
.page--material__content h4,
.page--material__content h5 {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}
.page--material__background {
  background-color: #fff;
}
/* topdoc
  name: Switch
  class: switch
  modifiers:
    :focus: Focus state
    :disabled: Disabled state
  markup:
    <label class="switch">
      <input type="checkbox" class="switch__input">
      <div class="switch__toggle">
        <div class="switch__handle"></div>
      </div>
    </label>
    <label class="switch">
      <input type="checkbox" class="switch__input" checked>
      <div class="switch__toggle">
        <div class="switch__handle"></div>
      </div>
    </label>
    <label class="switch">
      <input type="checkbox" class="switch__input" disabled>
      <div class="switch__toggle">
        <div class="switch__handle"></div>
      </div>
    </label>
*/
.switch {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: relative;
  overflow: hidden;
  min-width: 51px;
  font-size: 17px;
  padding: 0 20px;
  border: none;
  overflow: visible;
  width: 51px;
  height: 32px;
  z-index: 0;
  text-align: left;
}
.switch__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  z-index: -1;
}
.switch__toggle {
  background-color: #fff;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  -webkit-border-radius: 30px;
  border-radius: 30px;
  -webkit-transition-property: all;
  -moz-transition-property: all;
  -o-transition-property: all;
  transition-property: all;
  -webkit-transition-duration: 0.35s;
  -moz-transition-duration: 0.35s;
  -o-transition-duration: 0.35s;
  transition-duration: 0.35s;
  -webkit-transition-timing-function: ease-out;
  -moz-transition-timing-function: ease-out;
  -o-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
  -webkit-box-shadow: inset 0 0 0 2px #e5e5e5;
  box-shadow: inset 0 0 0 2px #e5e5e5;
}
.switch__handle {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: absolute;
  content: '';
  -webkit-border-radius: 28px;
  border-radius: 28px;
  height: 28px;
  width: 28px;
  background-color: #fff;
  left: 1px;
  top: 2px;
  -webkit-transition-property: all;
  -moz-transition-property: all;
  -o-transition-property: all;
  transition-property: all;
  -webkit-transition-duration: 0.35s;
  -moz-transition-duration: 0.35s;
  -o-transition-duration: 0.35s;
  transition-duration: 0.35s;
  -webkit-transition-timing-function: cubic-bezier(0.59, 0.01, 0.5, 0.99);
  -moz-transition-timing-function: cubic-bezier(0.59, 0.01, 0.5, 0.99);
  -o-transition-timing-function: cubic-bezier(0.59, 0.01, 0.5, 0.99);
  transition-timing-function: cubic-bezier(0.59, 0.01, 0.5, 0.99);
  -webkit-box-shadow: 0 0 0 1px #e4e4e4, 0 3px 2px rgba(0,0,0,0.25);
  box-shadow: 0 0 0 1px #e4e4e4, 0 3px 2px rgba(0,0,0,0.25);
}
.switch--active .switch__handle {
  -webkit-transition-duration: 0s;
  -moz-transition-duration: 0s;
  -o-transition-duration: 0s;
  transition-duration: 0s;
}
input:checked + .switch__toggle {
  -webkit-box-shadow: inset 0 0 0 2px #5198db;
  box-shadow: inset 0 0 0 2px #5198db;
  background-color: #5198db;
}
input:checked + .switch__toggle .switch__handle {
  left: 21px;
  -webkit-box-shadow: 0 3px 2px rgba(0,0,0,0.25);
  box-shadow: 0 3px 2px rgba(0,0,0,0.25);
}
input:disabled + .switch__toggle {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.switch__touch {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: -10px;
  right: -10px;
}
/* topdoc
  name: Material Switch
  use: Switch
  modifiers:
    :focus: Focus state
    :disabled: Disabled state
  markup:
    <label class="switch switch--material">
      <input type="checkbox" class="switch__input switch--material__input">
      <div class="switch__toggle switch--material__toggle">
        <div class="switch__handle switch--material__handle">
        </div>
      </div>
    </label>
    <label class="switch switch--material">
      <input type="checkbox" class="switch__input switch--material__input" checked>
      <div class="switch__toggle switch--material__toggle">
        <div class="switch__handle switch--material__handle">
        </div>
      </div>
    </label>
    <label class="switch switch--material">
      <input type="checkbox" class="switch__input switch--material__input" disabled>
      <div class="switch__toggle switch--material__toggle">
        <div class="switch__handle switch--material__handle">
        </div>
      </div>
    </label>
*/
.switch.switch--material {
  width: 36px;
  height: 24px;
  padding: 0 10px;
  min-width: 36px;
}
.switch.switch--material .switch__toggle {
  background-color: #b0afaf;
  margin-top: 5px;
  height: 14px;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.switch.switch--material .switch__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  z-index: -1;
}
.switch.switch--material .switch__handle {
  background-color: #f1f1f1;
  left: 0px;
  margin-top: -5px;
  width: 20px;
  height: 20px;
  -webkit-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.4);
  box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.4);
}
.switch.switch--material input:checked + .switch__toggle {
  background-color: #77c2bb;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.switch.switch--material input:checked + .switch__toggle .switch__handle {
  left: 16px;
  background-color: #009688;
  -webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
}
.switch.switch--material input:disabled + .switch__toggle {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.switch.switch--material .switch__handle:before {
  background: transparent;
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  z-index: -1;
  -webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.12);
  box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.12);
  -webkit-transition: -webkit-box-shadow 0.1s linear;
  -moz-transition: box-shadow 0.1s linear;
  -o-transition: box-shadow 0.1s linear;
  transition: box-shadow 0.1s linear;
}
.switch.switch--material.switch--active .switch__handle:before {
  -webkit-box-shadow: 0px 0px 0px 14px rgba(0,0,0,0.12);
  box-shadow: 0px 0px 0px 14px rgba(0,0,0,0.12);
}
.switch.switch--material.switch--active input:checked + .switch__toggle .switch__handle:before {
  -webkit-box-shadow: 0px 0px 0px 14px rgba(0,150,136,0.2);
  box-shadow: 0px 0px 0px 14px rgba(0,150,136,0.2);
}
.switch.switch--material .switch__touch {
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: -15px;
  right: -15px;
}
/* topdoc
  name: Range
  class: range
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <input type="range" class="range">
    <input type="range" class="range" disabled>
  showcase:
    <div class="navigation-bar">
        <div class="navigation-bar__item center full">
            <h1 class="navigation-bar__title">Range</h1>
        </div>
    </div>

    <div style="padding:8px">
      <input type="range" class="range" style="width:100%" value="0">
    </div>

    <div style="padding:8px">
      <input type="range" class="range" style="width:100%" value="30">
    </div>

    <div style="padding:8px">
      <input type="range" class="range" style="width:100%" value="60">
    </div>

    <div style="padding:8px">
      <input type="range" class="range" style="width:100%" value="90">
    </div>
*/
.range {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  line-height: 1;
  -webkit-appearance: none;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  border: none;
  height: 2px;
  -webkit-border-radius: 0;
  border-radius: 0;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  background-image: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#ccc));
  background-image: -webkit-linear-gradient(#ccc, #ccc);
  background-image: -moz-linear-gradient(#ccc, #ccc);
  background-image: -o-linear-gradient(#ccc, #ccc);
  background-image: linear-gradient(#ccc, #ccc);
  background-position: left center;
  -webkit-background-size: 100% 2px;
  background-size: 100% 2px;
  background-repeat: no-repeat;
  overflow: hidden;
  height: 32px;
}
.range::-moz-range-track {
  position: relative;
  border: none;
  background-color: #ccc;
  height: 2px;
  border-radius: 30px;
  box-shadow: none;
  top: 0;
  margin: 0;
  padding: 0;
}
.range::-ms-track {
  position: relative;
  border: none;
  background-color: #ccc;
  height: 0;
  border-radius: 30px;
}
.range::-webkit-slider-thumb {
  cursor: pointer;
  -webkit-appearance: none;
  position: relative;
  height: 29px;
  width: 29px;
  background-color: #fff;
  border: 1px solid #ccc;
  -webkit-border-radius: 30px;
  border-radius: 30px;
  -webkit-box-shadow: none;
  box-shadow: none;
  top: 0;
  margin: 0;
  padding: 0;
}
.range::-moz-range-thumb {
  cursor: pointer;
  position: relative;
  height: 29px;
  width: 29px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 30px;
  box-shadow: none;
  margin: 0;
  padding: 0;
}
.range::-ms-thumb {
  cursor: pointer;
  position: relative;
  height: 29px;
  width: 29px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 30px;
  box-shadow: none;
  top: 0;
  margin: 0;
  padding: 0;
}
.range::-webkit-slider-thumb:before {
  position: absolute;
  top: 13px;
  right: 28px;
  left: -10000px;
  height: 2px;
  background-color: rgba(24,103,194,0.81);
  content: '';
  margin: 0;
  padding: 0;
}
.range::-ms-fill-lower {
  height: 2px;
  background-color: rgba(24,103,194,0.81);
}
.range::-ms-tooltip {
  display: none;
}
.range:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.range__left {
  position: relative;
  top: 17px;
  height: 2px;
  width: 0;
  background-color: rgba(24,103,194,0.81);
  pointer-events: none;
}
[disabled] > .range__left,
.range--material:disabled + .range__left {
  visibility: hidden;
}
/* topdoc
  name: Material Range
  use: Range
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <input type="range" class="range range--material">
    <input type="range" class="range range--material" disabled>
*/
.range--material {
  background-image: -webkit-gradient(linear, left top, left bottom, from(#e0e0e0), to(#e0e0e0));
  background-image: -webkit-linear-gradient(#e0e0e0, #e0e0e0);
  background-image: -moz-linear-gradient(#e0e0e0, #e0e0e0);
  background-image: -o-linear-gradient(#e0e0e0, #e0e0e0);
  background-image: linear-gradient(#e0e0e0, #e0e0e0);
  background-position: center;
  -webkit-background-size: 100% 2px;
  background-size: 100% 2px;
  overflow: visible;
}
.range--material::-webkit-slider-thumb {
  top: 1px;
  border: none;
  height: 36px;
  width: 14px;
  -webkit-border-radius: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: -webkit-radial-gradient(7px, circle 6px, #009688 0%, #009688 6px, transparent 7px);
  background-image: radial-gradient(circle 6px at 7px, #009688 0%, #009688 6px, transparent 7px);
  margin-top: -1px;
}
.range--material::-moz-range-thumb {
  top: 1px;
  border: 3px solid #e0e0e0;
  height: 12px;
  width: 12px;
  border-radius: 100%;
  border-color: #009688;
  background-color: #009688;
}
.range--material::-moz-range-track {
  background-color: #e0e0e0;
}
.range--material::-ms-thumb {
  margin-top: 1px;
  border: none;
  height: 12px;
  width: 12px;
  border-radius: 100%;
  border-color: #009688;
  background-color: #009688;
}
.range--material:focus::-moz-range-thumb {
  border-color: #009688;
  background-color: #009688;
}
.range--material::-moz-range-thumb:before {
  display: none;
}
.range--material::-webkit-slider-thumb:before {
  display: none;
}
.range--material::-ms-fill-lower {
  background-color: #009688;
}
.range--material::-moz-range-thumb:after {
  margin-top: -3px;
  margin-left: -3px;
  content: '';
  display: block;
  border: 0px;
  border-radius: 100%;
  height: 12px;
  width: 12px;
  background-color: #009688;
  opacity: 0.2;
  -moz-transition: -moz-transform 0.1s linear;
  transition: transform 0.1s linear;
}
.range--material::-webkit-slider-thumb:after {
  margin-top: -3px;
  margin-left: -3px;
  content: '';
  display: block;
  border: 0px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  height: 12px;
  width: 12px;
  background-color: #009688;
  opacity: 0.2;
  -webkit-transition: -webkit-transform 0.1s linear;
  transition: transform 0.1s linear;
  display: inline-block;
  margin-left: 1px;
  margin-top: 12px;
}
.range--material::-ms-fill-upper {
  margin-top: -6px;
  margin-left: -6px;
  content: '';
  display: block;
  border: 0px;
  border-radius: 100%;
  height: 12px;
  width: 12px;
  background-color: #009688;
  opacity: 0.2;
  transition: transform 0.1s linear;
}
.range--material:active::-webkit-slider-thumb:after {
  -webkit-transform: scale(2.5);
  transform: scale(2.5);
}
.range--material:active::-moz-range-thumb:after {
  -moz-transform: scale(2.5);
  transform: scale(2.5);
}
.range--material:active::-ms-fill-upper {
  -ms-transform: scale(2.5);
  transform: scale(2.5);
}
.range--material__left {
  background-color: #009688;
}
/* topdoc
  name: Navigation Bar
  class: navigation-bar
  markup:
    <div class="navigation-bar">
      <div class="navigation-bar__center">Navigation Bar</div>
    </div>
*/
.navigation-bar {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  white-space: nowrap;
  overflow: hidden;
  word-spacing: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 2;
  display: block;
  height: 44px;
  padding-left: 0;
  padding-right: 0;
  background: #fff;
  color: #1f1f21;
  -webkit-box-shadow: none;
  box-shadow: none;
  border-bottom: 1px solid #bbb;
  font-weight: 400;
  width: 100%;
  white-space: nowrap;
  overflow: visible;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navigation-bar {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #bbb, #bbb 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #bbb, #bbb 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #bbb, #bbb 50%, transparent 50%);
    background-image: linear-gradient(0deg, #bbb, #bbb 50%, transparent 50%);
  }
}
.navigation-bar__bg {
  background: #fff;
}
.navigation-bar__item,
.navigation-bar__left,
.navigation-bar__right,
.navigation-bar__center {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  height: 44px;
  vertical-align: top;
  overflow: visible;
  display: block;
  vertical-align: middle;
  float: left;
}
.navigation-bar__left {
  max-width: 50%;
  width: 27%;
  text-align: left;
  line-height: 44px;
}
.navigation-bar__right {
  max-width: 50%;
  width: 27%;
  text-align: right;
  line-height: 44px;
}
.navigation-bar__center {
  width: 46%;
  text-align: center;
  line-height: 44px;
  font-size: 17px;
  font-weight: 500;
  color: #1f1f21;
}
.navigation-bar__title {
  line-height: 44px;
  font-size: 17px;
  font-weight: 500;
  color: #1f1f21;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.navigation-bar__center:first-child:last-child {
  width: 100%;
}
/* topdoc
  name: Navigation Bar Item
  use: Toolbar Button, Navigation Bar
  markup:
    <div class="navigation-bar">
      <div class="navigation-bar__left">
        <span class="toolbar-button--quiet">
          <i class="ion-navicon" style="font-size:32px; vertical-align:-6px;"></i>
        </span>
      </div>

      <div class="navigation-bar__center">
        Navigation Bar
      </div>

      <div class="navigation-bar__right">
        <span class="toolbar-button--quiet">Label</span>
      </div>
    </div>
*/
/* topdoc
  name: Navigation Bar with Outline Button
  use: Toolbar Button, Navigation Bar
  markup:
    <!-- Prerequisite=This example use ionicons(http://ionicons.com) to display icons. -->
    <div class="navigation-bar">
      <div class="navigation-bar__left">
        <span class="toolbar-button--outline">
          <i class="ion-navicon" style="font-size:32px; vertical-align:-6px;"></i>
        </span>
      </div>

      <div class="navigation-bar__center">
        Title
      </div>

      <div class="navigation-bar__right">
        <span class="toolbar-button--outline">Button</span>
      </div>
    </div>
*/
/* topdoc
  name: Transparent Navigation Bar
  class: navigation-bar--transparent
  use: Toolbar Button, Navigation Bar
  markup:
    <div class="navigation-bar navigation-bar--transparent">
      <div class="navigation-bar__left">
        <span class="toolbar-button--quiet">
          <i class="ion-navicon" style="font-size:32px; vertical-align:-6px;"></i>
        </span>
      </div>
      <div class="navigation-bar__center">
        Navigation Bar
      </div>
      <div class="navigation-bar__right">
        <span class="toolbar-button--quiet">Label</span>
      </div>
    </div>
*/
.navigation-bar--transparent {
  background-color: transparent;
  background-image: none;
  border: none;
}
/* topdoc
  name: Navigation Bar with Outline Button
  use: Toolbar Button, Navigation Bar
  markup:
    <!-- Prerequisite=This example use ionicons(http://ionicons.com) to display icons. -->
    <div class="navigation-bar">
      <div class="navigation-bar__left">
        <span class="toolbar-button--outline">
          <i class="ion-navicon" style="font-size:32px; vertical-align:-6px;"></i>
        </span>
      </div>

      <div class="navigation-bar__center">
        Title
      </div>

      <div class="navigation-bar__right">
        <span class="toolbar-button--outline">Button</span>
      </div>
    </div>
*/
/* topdoc
  name: Transparent Navigation Bar
  class: navigation-bar--transparent
  use: Toolbar Button, Navigation Bar
  markup:
    <!-- Prerequisite=This example use ionicons(http://ionicons.com) to display icons. -->
    <div class="navigation-bar navigation-bar--transparent">
      <div class="navigation-bar__left">
        <span class="toolbar-button--quiet">
          <i class="ion-navicon" style="font-size:32px; vertical-align:-6px;"></i>
        </span>
      </div>
      <div class="navigation-bar__center">
        Navigation Bar
      </div>
      <div class="navigation-bar__right">
        <span class="toolbar-button--quiet">Label</span>
      </div>
    </div>
*/
.navigation-bar--transparent {
  background-color: transparent;
  background-image: none;
  border: none;
}
/* topdoc
  name: Bottom Bar
  class: bottom-bar
  use: Navigation Bar
  markup:
    <div class="bottom-bar">
      <div class="bottom-bar__line-height" style="text-align:center">Bottom Toolbar</div>
    </div>
*/
.bottom-bar {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  white-space: nowrap;
  overflow: hidden;
  word-spacing: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 2;
  display: block;
  height: 44px;
  padding-left: 0;
  padding-right: 0;
  background: #fff;
  color: #1f1f21;
  -webkit-box-shadow: none;
  box-shadow: none;
  font-weight: 400;
  border-bottom: none;
  border-top: 1px solid #bbb;
  position: absolute;
  bottom: 0px;
  right: 0px;
  left: 0px;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .bottom-bar {
    border-top: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top;
    background-image: -webkit-linear-gradient(270deg, #bbb, #bbb 50%, transparent 50%);
    background-image: -moz-linear-gradient(270deg, #bbb, #bbb 50%, transparent 50%);
    background-image: -o-linear-gradient(270deg, #bbb, #bbb 50%, transparent 50%);
    background-image: linear-gradient(180deg, #bbb, #bbb 50%, transparent 50%);
  }
}
.bottom-bar__line-height {
  line-height: 44px;
  padding-bottom: 0;
  padding-top: 0;
}
.bottom-bar--transparent {
  background-color: transparent;
  background-image: none;
  border: none;
}
/* topdoc
  name: Navigation Bar with Segment
  class: navigation-bar
  hint: .navigation-bar .button-bar
  use: Segment, Navigation Bar
  markup:
    <div class="navigation-bar">
      <div class="navigation-bar__center">
        <div class="button-bar" style="width:200px;margin:7px 50px;">
          <div class="button-bar__item">
            <input type="radio" name="navi-segment-a" checked>
            <div class="button-bar__button">One</div>
          </div>

          <div class="button-bar__item">
            <input type="radio" name="navi-segment-a">
            <div class="button-bar__button">Two</div>
          </div>
        </div>
      </div>
    </div>
*/
/* topdoc
  name: Material Navigation Bar
  class: navigation-bar--material
  use: Toolbar Button, Navigation Bar
  markup:
    <div class="navigation-bar navigation-bar--material">
      <div class="navigation-bar__center navigation-bar--material__center">
        Title
      </div>
    </div>
*/
.navigation-bar--material {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: nowrap;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -moz-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  height: 56px;
  border-bottom: 0;
  -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
  box-shadow: 0 1px 5px rgba(0,0,0,0.3);
  padding: 0;
  background-color: #009688;
  -webkit-background-size: 0;
  background-size: 0;
}
.navigation-bar--noshadow {
  -webkit-box-shadow: none;
  box-shadow: none;
  background-image: none;
  border-bottom: none;
}
.navigation-bar--material__left,
.navigation-bar--material__right {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  height: 56px;
  min-width: 72px;
  width: auto;
  float: initial;
  line-height: 56px;
}
.navigation-bar--material__center {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  height: 56px;
  width: auto;
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
  -moz-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  float: initial;
  line-height: 56px;
}
.navigation-bar--material__center:first-child {
  margin-left: 16px;
}
.navigation-bar--material__center:last-child {
  margin-right: 16px;
}
.navigation-bar--material__left:empty,
.navigation-bar--material__right:empty {
  min-width: 16px;
}
/* topdoc
  name: Material Navigation Bar with Icons
  class: navigation-bar--material
  use: Toolbar Button, Material Navigation Bar
  hint: .navigation-bar--material
  markup:
    <div class="navigation-bar navigation-bar--material">
      <div class="navigation-bar__left navigation-bar--material__left">
        <span class="toolbar-button toolbar-button--material">
          <i class="zmdi zmdi-menu"></i>
        </span>
      </div>
      <div class="navigation-bar__center navigation-bar--material__center">
        Title
      </div>
      <div class="navigation-bar__right navigation-bar--material__right">
        <span class="toolbar-button toolbar-button--material">
          <i class="zmdi zmdi-search"></i>
        </span>
        <span class="toolbar-button toolbar-button--material">
          <i class="zmdi zmdi-favorite"></i>
        </span>
        <span class="toolbar-button toolbar-button--material">
          <i class="zmdi zmdi-more-vert"></i>
        </span>
      </div>
    </div>
*/
/* topdoc
  name: Button
  class: button
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <button class="button">Button</button>
    <button class="button" disabled>Button</button>
*/
.button {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button:active {
  background-color: rgba(24,103,194,0.81);
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
}
.button:focus {
  outline: 0;
}
.button:disabled,
.button[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
/* topdoc
  name: Outline Button
  class: button--outline
  use: Button
  markup:
    <button class="button button--outline">Button</button>
    <button class="button button--outline" disabled>Button</button>
*/
.button--outline {
  background-color: transparent;
  border: 1px solid rgba(24,103,194,0.81);
  color: rgba(24,103,194,0.81);
}
.button--outline:active {
  background-color: rgba(24,103,194,0.2);
  border: 1px solid rgba(24,103,194,0.81);
  color: rgba(24,103,194,0.81);
  opacity: 1;
}
.button--outline:hover {
  border: 1px solid rgba(24,103,194,0.81);
  -webkit-transition: 0;
  -moz-transition: 0;
  -o-transition: 0;
  transition: 0;
}
/* topdoc
  name: Light Button
  class: button--light
  use: Button
  markup:
    <button class="button button--light">Button</button>
    <button class="button button--light" disabled>Button</button>
*/
.button--light {
  background-color: transparent;
  color: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,0,0,0.2);
}
.button--light:active {
  background-color: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,0,0,0.2);
  opacity: 1;
}
/* topdoc
  name: Quiet Button
  class: button--quiet
  markup:
    <button class="button--quiet">Button</button>
    <button class="button--quiet" disabled>Button</button>
*/
.button--quiet {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  background: transparent;
  border: 1px solid transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  background: transparent;
  color: rgba(24,103,194,0.81);
  border: none;
}
.button--quiet:disabled,
.button--quiet[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  border: none;
}
.button--quiet:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--quiet:focus {
  outline: 0;
}
.button--quiet:active {
  background-color: transparent;
  border: none;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
  color: rgba(24,103,194,0.81);
}
/* topdoc
  name: Call To Action Button
  class: button--cta
  markup:
    <button class="button--cta">Button</button>
    <button class="button--cta" disabled>Button</button>
*/
.button--cta {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  border: none;
  background-color: #25a6d9;
  color: #fff;
}
.button--cta:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--cta:focus {
  outline: 0;
}
.button--cta:active {
  color: var-button-cat-color;
  background-color: #25a6d9;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
}
.button--cta:disabled,
.button--cta[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
/* topdoc
  name: Large Button
  class: button--large
  use: Button
  markup:
    <button class="button button--large">Button</button>
*/
.button--large {
  font-size: 17px;
  font-weight: 500;
  line-height: 36px;
  padding: 4px 12px;
  display: block;
  width: 100%;
  text-align: center;
}
.button--large:active {
  background-color: rgba(24,103,194,0.81);
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--large:disabled,
.button--large[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.button--large:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--large:focus {
  outline: 0;
}
/* topdoc
  name: Large Quiet Button
  class: button--large--quiet
  markup:
    <button class="button--large--quiet">Button</button>
*/
.button--large--quiet {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  font-size: 17px;
  font-weight: 500;
  line-height: 36px;
  padding: 4px 12px;
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: rgba(24,103,194,0.81);
  text-align: center;
}
.button--large--quiet:active {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
  color: rgba(24,103,194,0.81);
  background: transparent;
  border: 1px solid transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.button--large--quiet:disabled,
.button--large--quiet[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.button--large--quiet:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--large--quiet:focus {
  outline: 0;
}
/* topdoc
  name: Large Call To Action Button
  class: button--large--cta
  markup:
    <button class="button--large--cta" >Button</button>
*/
.button--large--cta {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  border: none;
  background-color: #25a6d9;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 36px;
  padding: 4px 12px;
  width: 100%;
  text-align: center;
  display: block;
}
.button--large--cta:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button--large--cta:focus {
  outline: 0;
}
.button--large--cta:active {
  color: #fff;
  background-color: #25a6d9;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
}
.button--large--cta:disabled,
.button--large--cta[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
/* topdoc
  name: Material Button
  class: button--material
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <button class="button button--material">BUTTON</button>
    <button class="button button--material" disabled>DISABLED</button>
*/
.button--material {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  -webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  min-height: 36px;
  line-height: 36px;
  padding: 0px 16px;
  -webkit-transition: -webkit-box-shadow 0.2s ease;
  -moz-transition: box-shadow 0.2s ease;
  -o-transition: box-shadow 0.2s ease;
  transition: box-shadow 0.2s ease;
  text-align: center;
  font-size: 14px;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  text-transform: uppercase;
  background-color: #009688;
  color: #fff;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
}
.button--material:active {
  -webkit-box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px -1px rgba(0,0,0,0.4);
  box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px -1px rgba(0,0,0,0.4);
  background-color: #009688;
  opacity: 1;
}
.button--material:focus {
  outline: 0;
}
.button--material:disabled,
.button--material[disabled] {
  opacity: 0.5;
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* topdoc
  name: Material Flat Button
  class: button--material--flat
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <button class="button button--material--flat">BUTTON</button>
    <button class="button button--material--flat" disabled>DISABLED</button>
*/
.button--material--flat {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: auto;
  text-decoration: none;
  padding: 4px 10px;
  font-size: 17px;
  line-height: 32px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  background-color: rgba(24,103,194,0.81);
  border: 0px solid currentColor;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  -webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  min-height: 36px;
  line-height: 36px;
  padding: 0px 16px;
  -webkit-transition: -webkit-box-shadow 0.2s ease;
  -moz-transition: box-shadow 0.2s ease;
  -o-transition: box-shadow 0.2s ease;
  transition: box-shadow 0.2s ease;
  text-align: center;
  font-size: 14px;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  text-transform: uppercase;
  background-color: #009688;
  color: #fff;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
  -webkit-box-shadow: none;
  box-shadow: none;
  background-color: transparent;
  color: #009688;
}
.button--material--flat:active {
  -webkit-box-shadow: none;
  box-shadow: none;
  background-color: transparent;
  color: #009688;
  outline: 0;
  opacity: 1;
  border: none;
}
.button--material--flat:focus {
  -webkit-box-shadow: none;
  box-shadow: none;
  background-color: transparent;
  color: #009688;
  outline: 0;
  opacity: 1;
  border: none;
}
.button--material--flat:disabled,
.button--material--flat[disabled] {
  opacity: 0.5;
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* topdoc
  name: Button Bar
  class: button-bar
  modifiers:
    :disabled: Disabled state
  markup:
    <div class="button-bar" style="width:280px;margin:0 auto;">
      <div class="button-bar__item">
        <button class="button-bar__button">One</button>
      </div>
      <div class="button-bar__item">
        <button class="button-bar__button">Two</button>
      </div>
      <div class="button-bar__item">
        <button class="button-bar__button">Three</button>
      </div>
    </div>
*/
.button-bar {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  display: table;
  table-layout: fixed;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  position: relative;
  margin: 0;
  border: none;
}
.button-bar__item {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  display: table-cell;
  width: auto;
  -webkit-border-radius: 0;
  border-radius: 0;
  position: relative;
  position: relative;
  overflow: hidden;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.button-bar__item > input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.button-bar__item:first-child > .button-bar__button {
  border-left: 1px solid rgba(18,114,224,0.77);
  border-right: 1px solid rgba(18,114,224,0.77);
  -webkit-border-top-left-radius: 4px;
  border-top-left-radius: 4px;
  -webkit-border-bottom-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.button-bar__item:last-child > .button-bar__button {
  border-right: 1px solid rgba(18,114,224,0.77);
  -webkit-border-top-right-radius: 4px;
  border-top-right-radius: 4px;
  -webkit-border-bottom-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
.button-bar__button {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  -webkit-border-radius: inherit;
  border-radius: inherit;
  background-color: transparent;
  color: rgba(18,114,224,0.77);
  border: 0px solid rgba(18,114,224,0.77);
  border-top: 1px solid rgba(18,114,224,0.77);
  border-bottom: 1px solid rgba(18,114,224,0.77);
  border-right: 1px solid rgba(18,114,224,0.77);
  font-weight: 400;
  padding: 0 8px;
  height: 27px;
  line-height: 27px;
  font-size: 13px;
  width: 100%;
  -webkit-transition: background-color 0.2s linear, color 0.2s linear;
  -moz-transition: background-color 0.2s linear, color 0.2s linear;
  -o-transition: background-color 0.2s linear, color 0.2s linear;
  transition: background-color 0.2s linear, color 0.2s linear;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.button-bar__button:active,
:active + .button-bar__button {
  background-color: rgba(18,114,224,0.2);
  border: 0px solid rgba(18,114,224,0.77);
  border-top: 1px solid rgba(18,114,224,0.77);
  border-bottom: 1px solid rgba(18,114,224,0.77);
  border-right: 1px solid rgba(18,114,224,0.77);
  height: 27px;
  line-height: 27px;
  font-size: 13px;
  width: 100%;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button-bar__item.active > .button-bar__button,
:checked + .button-bar__button {
  background-color: rgba(18,114,224,0.77);
  color: #fff;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button-bar__button:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.button-bar__button:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.button-bar__button:focus {
  outline: 0;
}
/* topdoc
  name: Segment
  use: Button Bar
  modifiers:
    :disabled: Disabled state
  markup:
    <div class="button-bar" style="width:280px;margin:0 auto;">
      <div class="button-bar__item">
        <input type="radio" name="segment-a" checked>
        <button class="button-bar__button">One</button>
      </div>
      <div class="button-bar__item">
        <input type="radio" name="segment-a">
        <button class="button-bar__button">Two</button>
      </div>
      <div class="button-bar__item">
        <input type="radio" name="segment-a">
        <button class="button-bar__button">Three</button>
      </div>
    </div>
*/
/* topdoc
  name: Icon Tab Bar
  class: tab-bar
  use: Tab Bar
  modifiers:
    :disabled: Disabled state
  markup:
    <!-- Prerequisite=This example use ionicons(http://ionicons.com) to display icons. -->
    <div class="tab-bar">
      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-a" checked="checked">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-stop"></i>
          <div class="tab-bar__label">One</div>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-a">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-record"></i>
          <div class="tab-bar__label">Two</div>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-a">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-star"></i>
          <div class="tab-bar__label">Three</div>
        </button>
      </label>
    </div>
*/
/* topdoc
  name: Tab Bar
  class: tab-bar
  modifiers:
    :disabled: Disabled state
  markup:
    <div class="tab-bar">
      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-c" checked="checked">
        <button class="tab-bar__button">
          <div class="tab-bar__label">One</div>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-c">
        <button class="tab-bar__button">
          <div class="tab-bar__label">Two</div>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-c">
        <button class="tab-bar__button">
          <div class="tab-bar__label">Three</div>
        </button>
      </label>
    </div>
*/
.tab-bar {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  display: table;
  table-layout: fixed;
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  height: 49px;
  background-color: #fff;
  border-top: 1px solid #ccc;
  width: 100%;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .tab-bar {
    border-top: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top;
    background-image: -webkit-linear-gradient(270deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(270deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(270deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(180deg, #ccc, #ccc 50%, transparent 50%);
  }
}
.tab-bar__item {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: relative;
  overflow: hidden;
  display: table-cell;
  width: auto;
  -webkit-border-radius: 0;
  border-radius: 0;
}
.tab-bar__item > input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.tab-bar__button {
  position: relative;
  display: inline-block;
  vertical-align: top;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  padding: 0;
  height: 49px;
  letter-spacing: 0;
  color: #999;
  text-shadow: 0 1px none;
  vertical-align: top;
  background-color: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  border-top: none;
  width: 100%;
  font-weight: 400;
  line-height: 49px;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .tab-bar__button {
    border-top: none;
  }
}
.tab-bar__icon {
  font-size: 24px;
  padding: 0;
  margin: 0;
  line-height: 26px;
  display: block;
  height: 28px;
}
.tab-bar__label {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
}
.tab-bar__icon + .tab-bar__label {
  font-size: 10px;
  line-height: 1;
  margin: 0;
  font-weight: 400;
}
.tab-bar__label:first-child {
  font-size: 16px;
  line-height: 49px;
  margin: 0;
  padding: 0;
}
.tab-bar__button {
  color: #999;
}
:checked + .tab-bar__button {
  color: rgba(24,103,194,0.81);
  background-color: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  border-top: none;
}
.tab-bar__button:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.tab-bar__button:focus {
  z-index: 1;
  border-top: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  outline: 0;
}
.tab-bar__content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 49px;
  z-index: 0;
}
/* topdoc
  name: Icon Only Tab Bar
  use: Tab Bar
  class: tab-bar
  hint: .tab-bar .fa
  modifiers:
    :disabled: Disabled state
  markup:
    <!-- Prerequisite=This example use ionicons(http://ionicons.com) to display icons. -->
    <div class="tab-bar">
      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-b" checked="checked">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-stop"></i>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-b">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-record"></i>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="tab-bar-b">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-star"></i>
        </button>
      </label>

    </div>
*/
/* topdoc
  name: Top Tab Bar
  class: tab-bar--top
  use: Tab Bar
  markup:
    <div class="tab-bar tab-bar--top">
      <label class="tab-bar__item">
        <input type="radio" name="top-tab-bar-a" checked="checked">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-stop"></i>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="top-tab-bar-a">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-record"></i>
        </button>
      </label>

      <label class="tab-bar__item">
        <input type="radio" name="top-tab-bar-a">
        <button class="tab-bar__button">
          <i class="tab-bar__icon ion-star"></i>
        </button>
      </label>
    </div>
*/
.tab-bar--top {
  position: relative;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: auto;
  border-top: none;
  border-bottom: 1px solid #ccc;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .tab-bar--top {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(0deg, #ccc, #ccc 50%, transparent 50%);
  }
}
.tab-bar--top__content {
  top: 49px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}
/* topdoc
  name: Bordered Top Tab Bar
  class: tab-bar--top-border
  use: Top Tab Bar
  markup:
    <div class="tab-bar tab-bar--top tab-bar--top-border">
      <label class="tab-bar__item tab-bar--top-border__item">
        <input type="radio" name="top-tab-bar-b" checked="checked">
        <button class="tab-bar__button tab-bar--top-border__button">
          Home
        </button>
      </label>

      <label class="tab-bar__item tab-bar--top-border__item">
        <input type="radio" name="top-tab-bar-b">
        <button class="tab-bar__button tab-bar--top-border__button">
          Comments
        </button>
      </label>

      <label class="tab-bar__item tab-bar--top-border__item">
        <input type="radio" name="top-tab-bar-b">
        <button class="tab-bar__button tab-bar--top-border__button">
          Activity
        </button>
      </label>
    </div>
*/
/* topdoc
  name: Material Tab Bar
  class: tab-bar--material
  use: Top Tab Bar
  markup:
    <div class="tab-bar tab-bar--top tab-bar--material">
      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a" checked="checked">
        <button class="tab-bar__button tab-bar--material__button">
          Music
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          Movies
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          Books
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          Games
        </button>
      </label>

    </div>
*/
.tab-bar--top-border__button {
  background-color: transparent;
  border-bottom: 4px solid transparent;
}
:checked + .tab-bar--top-border__button {
  background-color: transparent;
  border-bottom: 4px solid rgba(24,103,194,0.81);
}
.tab-bar--material {
  background-color: #009688;
  border-bottom-width: 0px;
  -webkit-box-shadow: 0 4px 2px -2px rgba(0,0,0,0.14), 0 3px 5px -2px rgba(0,0,0,0.12), 0 5px 1px -4px rgba(0,0,0,0.2);
  box-shadow: 0 4px 2px -2px rgba(0,0,0,0.14), 0 3px 5px -2px rgba(0,0,0,0.12), 0 5px 1px -4px rgba(0,0,0,0.2);
}
.tab-bar--material__button {
  background-color: transparent;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tab-bar--material__button:after {
  content: '';
  display: block;
  width: 0px;
  height: 2px;
  bottom: 0px;
  position: absolute;
  margin-top: -2px;
  background-color: #fff;
}
:checked + .tab-bar--material__button:after {
  width: 100%;
  -webkit-transition: width 0.2s ease-in-out;
  -moz-transition: width 0.2s ease-in-out;
  -o-transition: width 0.2s ease-in-out;
  transition: width 0.2s ease-in-out;
}
:checked + .tab-bar--material__button {
  background-color: transparent;
  color: #fff;
}
.tab-bar--material__item:not([ripple]):active {
  background-color: #26a69a;
}
/* topdoc
  name: Material Tab Bar (Icon only)
  class: tab-bar--material__icon
  use:  Material Tab Bar
  markup:
    <div class="tab-bar tab-bar--top tab-bar--material">
      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a" checked="checked">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-phone"></i>
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-favorite"></i>
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-pin-account"></i>
        </button>
      </label>
    </div>
*/
.tab-bar--material__icon {
  font-size: 22px;
  line-height: 36px;
}
/* topdoc
  name: Material Tab Bar (Icon and Label)
  class: tab-bar--material__label
  use:  Material Tab Bar
  markup:
    <div class="tab-bar tab-bar--top tab-bar--material">
      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a" checked="checked">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-phone"></i>
          <div class="tab-bar__label tab-bar--material__label">Call</div>
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-favorite"></i>
          <div class="tab-bar__label tab-bar--material__label">Favorites</div>
        </button>
      </label>

      <label class="tab-bar__item tab-bar--material__item">
        <input type="radio" name="tab-bar-material-a">
        <button class="tab-bar__button tab-bar--material__button">
          <i class="tab-bar__icon tab-bar--material__icon zmdi zmdi-delete"></i>
          <div class="tab-bar__label tab-bar--material__label">Delete</div>
        </button>
      </label>
    </div>
*/
.tab-bar--material__label {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tab-bar--material__label:first-child {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.015em;
  font-weight: 500;
  font-size: 14px;
}
.tab-bar--material__icon + .tab-bar--material__label {
  font-size: 10px;
}
/* topdoc
  name: Notification
  class: notification
  markup:
    <span class="notification">1</span>
    <span class="notification">10</span>
    <span class="notification">999</span>
*/
.notification {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  padding: 0 4px;
  width: auto;
  height: 19px;
  -webkit-border-radius: 19px;
  border-radius: 19px;
  background-color: #dc5236;
  color: #fff;
  text-align: center;
  font-size: 16px;
  min-width: 19px;
  line-height: 19px;
  font-weight: 400;
}
.notification:empty {
  display: none;
}
/* topdoc
  name: Toolbar Button
  class: toolbar-button
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <!-- Prerequisite=This example use font-awesome(http://fortawesome.github.io/Font-Awesome/) to display icons. -->
    <button class="toolbar-button">
      <i class="fa fa-bell" style="font-size:17px"></i> Label
    </button>

    <button class="toolbar-button toolbar-button--outline">
      <i class="fa fa-bell" style="font-size:17px"></i> Label
    </button>
*/
.toolbar-button,
.toolbar-button--outline,
.toolbar-button--quiet {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  padding: 4px 10px;
  letter-spacing: 0;
  color: rgba(38,100,171,0.81);
  text-shadow: 0 1px none;
  background-color: rgba(0,0,0,0);
  -webkit-border-radius: 2px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-weight: 400;
  font-size: 17px;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.toolbar-button:active,
.toolbar-button--outline:active,
.toolbar-button--quiet:active {
  background-color: rgba(0,0,0,0);
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
  opacity: 0.2;
}
.toolbar-button:disabled,
.toolbar-button[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.toolbar-button:focus,
.toolbar-button--outline:focus,
.toolbar-button--quiet:focus {
  outline: 0;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.toolbar-button:hover,
.toolbar-button--outline:hover,
.toolbar-button--quiet:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.toolbar-button--outline {
  border: 1px solid rgba(38,100,171,0.81);
  margin: auto 8px;
  padding-left: 6px;
  padding-right: 6px;
}
.toolbar-button--material {
  font-size: 22px;
  color: #fff;
  display: inline-block;
  padding: 0 12px;
  height: 100%;
  margin: 0;
  border: none;
  -webkit-border-radius: 0;
  border-radius: 0;
  vertical-align: initial;
}
.toolbar-button--material:first-of-type {
  margin-left: 4px;
}
.toolbar-button--material:last-of-type {
  margin-right: 4px;
}
.toolbar-button--material:active {
  opacity: 1;
  background-color: #26a69a;
}
.back-button {
  height: 44px;
  line-height: 44px;
  padding-left: 8px;
  color: rgba(38,100,171,0.81);
  background-color: rgba(0,0,0,0);
}
.back-button:active {
  opacity: 0.2;
}
.back-button__label {
  display: inline-block;
  height: 100%;
  vertical-align: top;
  margin-left: 12px;
}
.back-button__icon {
  display: inline-block;
  height: 100%;
  vertical-align: top;
}
.back-button__icon:before {
  font-family: 'Ionicons';
  content: '\f3cf';
  font-size: 32px;
}
.back-button--material {
  font-size: 22px;
  color: #fff;
  display: inline-block;
  padding: 0 12px;
  height: 100%;
  margin: 0 0 0 4px;
  border: none;
  -webkit-border-radius: 0;
  border-radius: 0;
  vertical-align: initial;
  line-height: 56px;
}
.back-button--material__label {
  display: none;
  font-size: 20px;
}
.back-button--material__icon:before {
  font-family: 'Material-Design-Iconic-Font';
  content: '\f2ea';
  font-size: 26px;
}
.back-button--material:active {
  opacity: 1;
  background-color: #26a69a;
}
/* topdoc
  name: Checkbox
  class: checkbox
  modifiers:
    :focus: Focus state
    :disabled: Disabled state
  markup:
    <label class="checkbox">
      <input type="checkbox" class="checkbox__input">
      <div class="checkbox__checkmark"></div>
      OFF
    </label>

    <label class="checkbox">
      <input type="checkbox" class="checkbox__input" checked="checked">
      <div class="checkbox__checkmark"></div>
      ON
    </label>

    <label class="checkbox">
      <input type="checkbox" class="checkbox__input" disabled>
      <div class="checkbox__checkmark"></div>
      Disabled
    </label>
*/
.checkbox {
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  line-height: 24px;
}
.checkbox__checkmark {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: relative;
  overflow: hidden;
  height: 24px;
  pointer-events: none;
}
.checkbox__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.checkbox__input:checked {
  background: rgba(24,103,194,0.81);
}
.checkbox__input:checked + .checkbox__checkmark:before {
  background: rgba(24,103,194,0.81);
  border: 1px solid rgba(24,103,194,0.81);
}
.checkbox__input:checked + .checkbox__checkmark:after {
  opacity: 1;
}
.checkbox__checkmark:before {
  content: '';
  position: absolute;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid rgba(24,103,194,0.81);
  -webkit-border-radius: 16px;
  border-radius: 16px;
  -webkit-box-shadow: none;
  box-shadow: none;
  left: 0;
}
.checkbox__checkmark {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: relative;
  overflow: hidden;
  width: 24px;
  height: 24px;
}
.checkbox__checkmark:after {
  content: '';
  position: absolute;
  top: 6px;
  left: 5px;
  width: 12px;
  height: 6px;
  background: transparent;
  border: 3px solid #fff;
  border-width: 2px;
  border-top: none;
  border-right: none;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  opacity: 0;
}
.checkbox__input:focus + .checkbox__checkmark:before {
  -webkit-box-shadow: none;
  box-shadow: none;
}
.checkbox__input:disabled + .checkbox__checkmark {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.checkbox__input:disabled:active + .checkbox__checkmark:before {
  background: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* topdoc
  name: No border Checkbox
  class: checkbox--noborder
  markup:
    <label class="checkbox--noborder">
      <input type="checkbox" class="checkbox__input checkbox--noborder__input">
      <div class="checkbox__checkmark checkbox--noborder__checkmark"></div>
      OFF
    </label>

    <label class="checkbox--noborder">
      <input type="checkbox" class="checkbox__input checkbox--noborder__input" checked="checked">
      <div class="checkbox__checkmark checkbox--noborder__checkmark"></div>
      ON
    </label>

    <label class="checkbox--noborder">
      <input type="checkbox" class="checkbox__input checkbox--noborder__input" disabled checked="checked">
      <div class="checkbox__checkmark checkbox--noborder__checkmark"></div>
      Disabled
    </label>
 */
.checkbox--noborder__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.checkbox--noborder {
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  line-height: 24px;
  position: relative;
  overflow: hidden;
}
.checkbox--noborder__checkmark {
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  height: 24px;
  background: transparent;
}
.checkbox--noborder__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.checkbox--noborder__input:checked + .checkbox--noborder__checkmark:before {
  background: transparent;
  border: none;
}
.checkbox--noborder__input:checked + .checkbox--noborder__checkmark:after {
  opacity: 1;
}
.checkbox--noborder__checkmark:before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  -webkit-border-radius: 16px;
  border-radius: 16px;
  left: 0;
}
.checkbox--noborder__checkmark {
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  width: 24px;
  height: 24px;
  border: none;
}
.checkbox--noborder__checkmark:after {
  content: '';
  position: absolute;
  top: 6px;
  left: 5px;
  opacity: 0;
  width: 12px;
  height: 6px;
  background: transparent;
  border: 3px solid rgba(24,103,194,0.81);
  border-width: 2px;
  border-top: none;
  border-right: none;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
.checkbox--noborder__input:focus + .checkbox--noborder__checkmark:before {
  border: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.checkbox--noborder__input:disabled + .checkbox--noborder__checkmark {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.checkbox--noborder__input:disabled:active + .checkbox--noborder__checkmark:before {
  background: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
  border: none;
}
/* topdoc
  name: Material Checkbox
  use: Checkbox
  modifiers:
    :focus: Focus state
    :disabled: Disabled state
  markup:
    <label class="checkbox checkbox--material">
      <input type="checkbox" class="checkbox__input checkbox--material__input">
      <div class="checkbox__checkmark checkbox--material__checkmark"></div>
      OFF
    </label>
    <label class="checkbox checkbox--material">
      <input type="checkbox" class="checkbox__input checkbox--material__input" checked="checked">
      <div class="checkbox__checkmark checkbox--material__checkmark"></div>
      ON
    </label>
    <label class="checkbox checkbox--material">
      <input type="checkbox" class="checkbox__input checkbox--material__input" checked="checked" disabled>
      <div class="checkbox__checkmark checkbox--material__checkmark"></div>
      ON
    </label>
    <label class="checkbox checkbox--material">
      <input type="checkbox" class="checkbox__input checkbox--material__input" disabled>
      <div class="checkbox__checkmark checkbox--material__checkmark"></div>
      Disabled
    </label>
*/
.checkbox--material {
  line-height: 18px;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.checkbox--material__checkmark {
  width: 18px;
  height: 18px;
}
.checkbox--material__checkmark:before {
  border: 2px solid #717171;
}
.checkbox--material__input:checked + .checkbox--material__checkmark:before {
  background-color: #009688;
  border: none;
}
.checkbox--material__input + .checkbox--material__checkmark:after {
  border-color: #fff;
  -webkit-transition: -webkit-transform 0.3s ease;
  -moz-transition: -moz-transform 0.3s ease;
  -o-transition: -o-transform 0.3s ease;
  transition: transform 0.3s ease;
  width: 10px;
  height: 5px;
  top: 4px;
  left: 3px;
  -webkit-transform: scale(0) rotate(-45deg);
  -moz-transform: scale(0) rotate(-45deg);
  -ms-transform: scale(0) rotate(-45deg);
  -o-transform: scale(0) rotate(-45deg);
  transform: scale(0) rotate(-45deg);
}
.checkbox--material__input:checked + .checkbox--material__checkmark:after {
  top: 4px;
  left: 3px;
  -webkit-transform: scale(1) rotate(-45deg);
  -moz-transform: scale(1) rotate(-45deg);
  -ms-transform: scale(1) rotate(-45deg);
  -o-transform: scale(1) rotate(-45deg);
  transform: scale(1) rotate(-45deg);
}
.checkbox--material__input:disabled + .checkbox--material__checkmark {
  opacity: 1;
}
.checkbox--material__input:disabled + .checkbox--material__checkmark:before {
  border-color: #afafaf;
}
.checkbox--material__input:disabled:checked + .checkbox--material__checkmark:before {
  background-color: #afafaf;
}
.checkbox--material__input:disabled:checked + .checkbox--material__checkmark:after {
  border-color: #fff;
}
.checkbox--material__input:disabled:checked:active + .checkbox--material__checkmark:before {
  background-color: #afafaf;
}
.checkbox--material__checkmark:before {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  width: 18px;
  height: 18px;
}
/* topdoc
  name: Radio Button
  class: radio-button
  modifiers:
  markup:
    <label class="radio-button">
      <input type="radio" class="radio-button__input" name="r" checked="checked">
      <div class="radio-button__checkmark"></div>
      Label
    </label>

    <label class="radio-button">
      <input type="radio" class="radio-button__input" name="r">
      <div class="radio-button__checkmark"></div>
      Label
    </label>

    <label class="radio-button">
      <input type="radio" class="radio-button__input" name="r">
      <div class="radio-button__checkmark"></div>
      Label
    </label>
*/
.radio-button__input {
  position: absolute;
  overflow: hidden;
  right: 0px;
  top: 0px;
  left: 0px;
  bottom: 0px;
  padding: 0;
  border: 0;
  opacity: 0.001;
  z-index: 1;
  vertical-align: top;
  outline: none;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.radio-button__input:active,
.radio-button__input:focus {
  outline: 0;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.radio-button__input:checked + .radio-button__checkmark:after {
  opacity: 1;
}
.radio-button__input:checked + .radio-button__checkmark:before {
  background: transparent;
  border: none;
}
.radio-button {
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  line-height: 24px;
  text-align: left;
}
.radio-button__checkmark:before {
  content: '';
  position: absolute;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  -webkit-border-radius: 16px;
  border-radius: 16px;
  left: 0;
}
.radio-button__checkmark {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  position: relative;
  display: inline-block;
  vertical-align: top;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: relative;
  overflow: hidden;
  position: relative;
  width: 24px;
  height: 24px;
  background: transparent;
  pointer-events: none;
}
.radio-button__input:checked + .radio-button__checkmark {
  background: rgba(0,0,0,0);
}
.radio-button__checkmark:after {
  content: '';
  position: absolute;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  top: 6px;
  left: 5px;
  opacity: 0;
  width: 12px;
  height: 6px;
  background: transparent;
  border: 3px solid rgba(24,103,194,0.81);
  border-width: 2px;
  border-top: none;
  border-right: none;
  -webkit-border-radius: 0px;
  border-radius: 0px;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}
.radio-button__input:disabled + .radio-button__checkmark {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
/* topdoc
  name: Material Radio Button
  use: Radio Button
  modifiers:
  markup:
    <label class="radio-button radio-button--material">
      <input type="radio" class="radio-button__input radio-button--material__input" name="r" checked="checked">
      <div class="radio-button__checkmark radio-button--material__checkmark"></div>
      Label
    </label>
    <label class="radio-button radio-button--material">
      <input type="radio" class="radio-button__input radio-button--material__input" name="r">
      <div class="radio-button__checkmark radio-button--material__checkmark"></div>
      Label
    </label>
    <label class="radio-button radio-button--material">
      <input type="radio" class="radio-button__input radio-button--material__input" name="s" disabled checked>
      <div class="radio-button__checkmark radio-button--material__checkmark"></div>
      Label
    </label>
    <label class="radio-button radio-button--material">
      <input type="radio" class="radio-button__input radio-button--material__input" name="s" disabled>
      <div class="radio-button__checkmark radio-button--material__checkmark"></div>
      Label
    </label>
*/
.radio-button--material {
  line-height: 22px;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.radio-button--material__checkmark {
  width: 20px;
  height: 20px;
  overflow: visible;
}
.radio-button--material__checkmark:before {
  background: transparent;
  border: 2px solid #717171;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  -webkit-transition: border 0.2s ease;
  -moz-transition: border 0.2s ease;
  -o-transition: border 0.2s ease;
  transition: border 0.2s ease;
}
.radio-button--material__checkmark:after {
  -webkit-transition: background 0.2s ease, -webkit-transform 0.2s ease;
  -moz-transition: background 0.2s ease, -moz-transform 0.2s ease;
  -o-transition: background 0.2s ease, -o-transform 0.2s ease;
  transition: background 0.2s ease, transform 0.2s ease;
  top: 5px;
  left: 5px;
  width: 10px;
  height: 10px;
  border: none;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  -ms-transform: scale(0);
  -o-transform: scale(0);
  transform: scale(0);
}
.radio-button--material__input:checked + .radio-button__checkmark:before {
  background: transparent;
  border: 2px solid #009688;
}
.radio-button--material__input + .radio-button__checkmark:after {
  background: #717171;
  opacity: 1;
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  -ms-transform: scale(0);
  -o-transform: scale(0);
  transform: scale(0);
}
.radio-button--material__input:checked + .radio-button__checkmark:after {
  opacity: 1;
  background: #009688;
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
}
.radio-button--material__input:disabled + .radio-button__checkmark {
  opacity: 1;
}
.radio-button--material__input:disabled + .radio-button__checkmark:after {
  background-color: #afafaf;
  border-color: #afafaf;
}
.radio-button--material__input:disabled + .radio-button__checkmark:before {
  border-color: #afafaf;
}
/* topdoc
  name: List
  class: list
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">Dog</div>
      </li>
      <li class="list__item">
        <div class="list__item__center">Cat</div>
      </li>
      <li class="list__item">
        <div class="list__item__center">Hamster</div>
      </li>
    </ul>
*/
.list__item__left {
  min-height: 44px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  padding-right: 14px;
  -webkit-box-ordinal-group: 1;
  -webkit-order: 0;
  -moz-box-ordinal-group: 1;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-align-self: stretch;
  -ms-flex-item-align: stretch;
  align-self: stretch;
}
.list__item__left:empty {
  width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
}
.list__item__center {
  min-height: 44px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
  -moz-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -moz-box-orient: horizontal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-ordinal-group: 2;
  -webkit-order: 1;
  -moz-box-ordinal-group: 2;
  -ms-flex-order: 1;
  order: 1;
  margin-right: auto;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-align-self: stretch;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  margin-left: 0;
  border-bottom: 1px solid #ccc;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item__center {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(0deg, #ccc, #ccc 50%, transparent 50%);
  }
}
.list__item__right {
  min-height: 44px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  margin-left: auto;
  padding-right: 12px;
  -webkit-box-ordinal-group: 3;
  -webkit-order: 2;
  -moz-box-ordinal-group: 3;
  -ms-flex-order: 2;
  order: 2;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-align-self: stretch;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  border-bottom: 1px solid #ccc;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item__right {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(0deg, #ccc, #ccc 50%, transparent 50%);
  }
}
.list__header {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  display: block;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 20px 0 0 15px;
  font-size: 12px;
  font-weight: 500;
  color: #1f1f21;
  text-shadow: none;
  border-top: none;
  border-bottom: 1px solid #ccc;
  -webkit-box-shadow: 0px 1px 0px 0px #fff;
  box-shadow: 0px 1px 0px 0px #fff;
  min-height: 24px;
  line-height: 24px;
  margin-top: -1px;
  text-transform: uppercase;
  position: relative;
}
.list__header:not(:first-of-type) {
  border-top: 1px solid #ccc;
}
.list {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  padding: 0;
  margin: 0;
  list-style-type: none;
  text-align: left;
  overflow: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #ccc;
  overflow: hidden;
}
.list__item {
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
  list-style: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -moz-box-orient: horizontal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: start;
  -webkit-justify-content: flex-start;
  -moz-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 0 0 0 14px;
  margin: 1px 0 -1px 0;
  color: #1f1f21;
  background-color: #fff;
  min-height: 44px;
}
.list__item:first-child {
  -webkit-box-shadow: inset 0px 1px 0px 0px #ccc;
  box-shadow: inset 0px 1px 0px 0px #ccc;
  margin-top: 0;
}
.list__item_active:active {
  background-color: #d9d9d9;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
/* topdoc
  name: Noborder List
  class: list--noborder
  use: List
  markup:
    <ul class="list list--noborder">
      <li class="list__item">
        <div class="list__item__center">Item</div>
      </li>
      <li class="list__item">
        <div class="list__item__center">Item</div>
      </li>
    </ul>
 */
.list--noborder {
  border-top: none;
  border-bottom: none;
  background-image: none;
}
.list--noborder .list__item:first-child {
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* topdoc
  name: List item without divider
  class: list__item--nodivider
  use: List
  markup:
    <ul class="list">
      <li class="list__item list__item--nodivider">
        <div class="list__item__center list__item--nodivider__center">Item</div>
      </li>
      <li class="list__item list__item--nodivider">
        <div class="list__item__center list__item--nodivider__center">Item</div>
      </li>
    </ul>
 */
.list__item--nodivider__center {
  border: none;
  background-image: none;
}
.list__item--nodivider__right {
  border: none;
  background-image: none;
}
.list__item--nodivider.list__item--chevron:before {
  border: none;
  background-image: none;
}
/* topdoc
  name: List item with long divider
  class: list__item--longdivider
  use: List
  markup:
    <ul class="list">
      <li class="list__item list__item--longdivider">
        <div class="list__item__center list__item--longdivider__center">Item</div>
      </li>
      <li class="list__item list__item--longdivider">
        <div class="list__item__center list__item--longdivider__center">Item</div>
      </li>
    </ul>
 */
.list__item--longdivider {
  border-bottom: 1px solid #ccc;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item--longdivider {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(0deg, #ccc, #ccc 50%, transparent 50%);
  }
}
.list__item--longdivider:last-of-type {
  border: none;
  background-image: none;
}
.list__item--longdivider__center {
  border: none;
  background-image: none;
}
.list__item--longdivider__right {
  border: none;
  background-image: none;
}
.list__item--longdivider.list__item--chevron:before {
  border: none;
  background-image: none;
}
/* topdoc
  name: Category List Header
  class: list__header
  use: List
  markup:
    <ul class="list">
      <li class="list__header">
        Header
      </li>
      <li class="list__item">
        <div class="list__item__center">Item</div>
      </li>
    </ul>
 */
/* topdoc
  name: Tappable List
  class: list__item--tappable
  use: List
  markup:
    <ul class="list">
      <li class="list__item list__item--tappable">
        <div class="list__item__center">Tappable Item</div>
      </li>
    </ul>
 */
.list__item--tappable:active {
  background-color: #d9d9d9;
}
/* topdoc
  name: Switch in List Item
  use: Switch, List
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">
          Label
        </div>
        <div class="list__item__right">
          <label class="switch">
            <input type="checkbox" class="switch__input" checked>
            <div class="switch__toggle">
              <div class="switch__handle"></div>
            </div>
          </label>
        </div>
      </li>
      <li class="list__item">
        <div class="list__item__center">
          Label
        </div>
        <div class="list__item__right">
          <label class="switch">
            <input type="checkbox" class="switch__input">
            <div class="switch__toggle">
              <div class="switch__handle"></div>
            </div>
          </label>
        </div>
      </li>
    </ul>
*/
/* topdoc
  name: List Item with Chevron
  class: list__item--chevron
  use: List
  markup:
    <ul class="list">
      <li class="list__item list__item--chevron">
        <div class="list__item__center">Item A</div>
      </li>
      <li class="list__item list__item--chevron">
        <div class="list__item__center">Item B</div>
      </li>
    </ul>
 */
.list__item--chevron {
  -webkit-transition: background-color 0.2s linear;
  -moz-transition: background-color 0.2s linear;
  -o-transition: background-color 0.2s linear;
  transition: background-color 0.2s linear;
  overflow: hidden;
}
.list__item--chevron:hover {
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  transition: none;
}
.list__item--chevron:before {
  min-height: 44px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  color: #ccc;
  -webkit-box-ordinal-group: 4;
  -webkit-order: 3;
  -moz-box-ordinal-group: 4;
  -ms-flex-order: 3;
  order: 3;
  -webkit-align-self: stretch;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  font-size: 28px;
  font-family: FontAwesome;
  font-style: normal;
  font-weight: normal;
  content: "\f105";
  margin-left: auto;
  width: 18px;
  text-align: right;
  border-bottom: 1px solid #ccc;
  width: 10px;
  padding-right: 8px;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item--chevron:before {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #ccc, #ccc 50%, transparent 50%);
    background-image: linear-gradient(0deg, #ccc, #ccc 50%, transparent 50%);
  }
}
/* topdoc
  name: Inset List
  use: List, List Item with Chevron, Tappable List
  markup:
    <ul class="list list--inset">
      <li class="list__item list--inset__item list__item--chevron list__item--tappable">
        <div class="list__item__center">List Item with Chevron</div>
      </li>
      <li class="list__item list--inset__item list__item--chevron list__item--tappable">
        <div class="list__item__center">List Item with Chevron</div>
      </li>
    </ul>
 */
.list--inset {
  margin-left: 8px;
  margin-right: 8px;
  border: 1px solid #ccc;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  background-image: none;
}
.list--inset__item:first-child {
  -webkit-box-shadow: none;
  box-shadow: none;
}
/* topdoc
  name: Radio Button in List Item
  modifiers:
  use: Radio Button, List
  markup:
    <ul class="list">
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="radio-button">
            <input type="radio" id="r1" class="radio-button__input" name="r" checked="checked">
            <div class="radio-button__checkmark"></div>
          </label>
        </div>
        <label for="r1" class="list__item__center">
          Radio Button
        </label>
      </li>
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="radio-button">
            <input type="radio" id="r2" class="radio-button__input" name="r">
            <div class="radio-button__checkmark"></div>
          </label>
        </div>
        <label for="r2" class="list__item__center">
          Radio Button
        </label>
      </li>
    </ul>
*/
/* topdoc
  name: Checkbox in List Item
  use: Checkbox, List, Tappable List, Switch in List Item
  markup:
    <ul class="list">
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="checkbox">
            <input type="checkbox" id="checkbox1" class="checkbox__input" name="c" checked="checked">
            <div class="checkbox__checkmark"></div>
          </label>
        </div>
        <label for="checkbox1" class="list__item__center">
          Checkbox
        </label>
      </li>
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="checkbox">
            <input type="checkbox" id="checkbox2" class="checkbox__input" name="c">
            <div class="checkbox__checkmark"></div>
          </label>
        </div>
        <label for="checkbox2" class="list__item__center">
          Checkbox
        </label>
      </li>
    </ul>
*/
/* topdoc
  name: No border Checkbox in List Item
  use: Checkbox in List Item, No border Checkbox
  markup:
    <ul class="list">
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="checkbox checkbox--noborder">
            <input id="s1" type="checkbox" class="checkbox__input checkbox--noborder__input">
            <div class="checkbox__checkmark checkbox--noborder checkbox--noborder__checkmark"></div>
          </label>
        </div>
        <label for="s1" class="list__item__center">
          Checkbox
        </label>
      </li>
      <li class="list__item list__item--tappable">
        <div class="list__item__left">
          <label class="checkbox checkbox--noborder">
            <input id="s2" type="checkbox" class="checkbox__input checkbox--noborder__input" checked>
            <div class="checkbox__checkmark checkbox--noborder checkbox--noborder__checkmark"></div>
          </label>
        </div>
        <label for="s2" class="list__item__center">
          Checkbox
        </label>
      </li>
    </ul>
*/
/* topdoc
  name: Text Input in List Item
  use: List
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">
          <input type="text" class="text-input" placeholder="Name">
        </div>
      </li>
      <li class="list__item">
        <div class="list__item__center">
          <input type="text" class="text-input" placeholder="Email">
        </div>
      </li>
    </ul>
*/
/* topdoc
  name: Textarea in List Item
  use: List, Textarea Transparent
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">
          <textarea class="textarea textarea--transparent" placeholder="Text message"></textarea>
        </div>
      </li>
    </ul>
*/
/* topdoc
  name: Right Label in List Item
  use: List, Switch in List Item
  class: list__right-label
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">
          Title
        </div>
        <div class="list__item__right">
          <div class="list__item__label">Label</div>
        </div>
      </li>
    </ul>
*/
.list__item__label {
  font-size: 14px;
  padding: 0 4px;
  opacity: 0.6;
}
/* topdoc
  name: List Item with Subtitle
  use: List, Switch in List Item
  class: list__item__subtitle
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__center">
          <div class="list__item__title">
            Title
          </div>
          <div class="list__item__subtitle">
            Subtitle
          </div>
        </div>
      </li>
    </ul>
*/
.list__item__title {
  -webkit-flex-basis: 100%;
  -ms-flex-preferred-size: 100%;
  flex-basis: 100%;
  -webkit-box-ordinal-group: 1;
  -webkit-order: 0;
  -moz-box-ordinal-group: 1;
  -ms-flex-order: 0;
  order: 0;
}
.list__item__subtitle {
  opacity: 0.75;
  font-size: 14px;
  -webkit-box-ordinal-group: 2;
  -webkit-order: 1;
  -moz-box-ordinal-group: 2;
  -ms-flex-order: 1;
  order: 1;
  -webkit-flex-basis: 100%;
  -ms-flex-preferred-size: 100%;
  flex-basis: 100%;
}
/* topdoc
  name: List Item with Thumbnail
  use: List, List Item with Subtitle
  class: list__item__thumbnail
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__left">
          <img class="list__item__thumbnail" src="http://placekitten.com/g/40/40" alt="Cute kitten">
        </div>

        <div class="list__item__center">
          <div class="list__item__title">Lily</div>
          <div class="list__item__subtitle">Very friendly cat</div>
        </div>
      </li>

      <li class="list__item">
        <div class="list__item__left">
          <img class="list__item__thumbnail" src="http://placekitten.com/g/40/40" alt="Cute kitten">
        </div>

        <div class="list__item__center">
          <div class="list__item__title">Molly</div>
          <div class="list__item__subtitle">Loves tuna!</div>
        </div>
      </li>
    </ul>
*/
.list__item__thumbnail {
  width: 40px;
  height: 40px;
  -webkit-border-radius: 6px;
  border-radius: 6px;
  display: block;
  margin: 8px 10px 8px 0px;
}
/* topdoc
  name: List Item with Icon
  use: List, List Item with Thumbnail
  class: list__item__icon
  markup:
    <ul class="list">
      <li class="list__item">
        <div class="list__item__left">
          <img class="list__item__thumbnail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwJCB8v/9zErgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAvSURBVFjD7c0BDQAACAMgtX+KJzWGm4MCdJK6MHVELBaLxWKxWCwWi8VisVj8MV7qBgI2A8rYpgAAAABJRU5ErkJggg==">
        </div>

        <div class="list__item__center">
          <div class="list__item__title">Alice</div>
        </div>

        <div class="list__item__right">
          <i class="ion-ios-information list__item__icon"></i>
        </div>
      </li>

      <li class="list__item">
        <div class="list__item__left">
          <img class="list__item__thumbnail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwJCB8v/9zErgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAvSURBVFjD7c0BDQAACAMgtX+KJzWGm4MCdJK6MHVELBaLxWKxWCwWi8VisVj8MV7qBgI2A8rYpgAAAABJRU5ErkJggg==">
        </div>

        <div class="list__item__center">
          <div class="list__item__title">Bob</div>
        </div>

        <div class="list__item__right">
          <i class="ion-ios-information list__item__icon"></i>
        </div>
      </li>
    </ul>
*/
.list__item__icon {
  font-size: 22px;
  padding: 0 6px;
}
/* topdoc
  name: Material List
  use: List Item with Subtitle
  class: list--material
  markup:
    <ul class="list list--material">
      <li class="list__item list__item--material">
        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Orange</div>
          <div class="list__item__subtitle list__item--material__subtitle">Sweet fruit that grows on trees.</div>
        </div>
      </li>
      <li class="list__item list__item--material">
        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Pear</div>
          <div class="list__item__subtitle list__item--material__subtitle">Funny-shaped fruit.</div>
        </div>
      </li>
    </ul>
*/
.list--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  border: 0;
}
.list__item--material {
  border: 0;
  min-height: 56px;
  padding: 0 0 0 16px;
  line-height: normal;
}
.list__item--material__subtitle {
  margin-top: 4px;
}
.list__item--material:first-child {
  -webkit-box-shadow: none;
  box-shadow: none;
}
.list__item--material__left {
  padding: 16px 0px 16px 0px;
  min-width: 56px;
  line-height: 1;
}
.list__item--material__left:empty,
.list__item--material__center {
  padding: 16px 0;
  border-color: #eee;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item--material__left:empty,
  .list__item--material__center {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: linear-gradient(0deg, #eee, #eee 50%, transparent 50%);
  }
}
.list__item--material__right {
  padding: 16px 16px 16px 0px;
  line-height: 1;
  border-color: #eee;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item--material__right {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: linear-gradient(0deg, #eee, #eee 50%, transparent 50%);
  }
}
.list__item--material.list__item--longdivider {
  border-bottom: 1px solid #eee;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .list__item--material.list__item--longdivider {
    border-bottom: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-image: -webkit-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -moz-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: -o-linear-gradient(90deg, #eee, #eee 50%, transparent 50%);
    background-image: linear-gradient(0deg, #eee, #eee 50%, transparent 50%);
  }
}
/* topdoc
  name: Material List with Header
  use: Material List
  class: list__header--material
  markup:
    <ul class="list list--material">
      <li class="list__header list__header--material">
        Fruits
      </li>
      <li class="list__item list__item--material">
        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Orange</div>
          <div class="list__item__subtitle list__item--material__subtitle">Sweet fruit that grows on trees.</div>
        </div>
      </li>
    </ul>
*/
.list__header--material {
  background: #fff;
  border: none;
  font-size: 14px;
  text-transform: none;
  margin: -1px 0 0 0;
  color: #6c6c6c;
  font-weight: 500;
  padding: 8px 16px;
}
.list__header--material:not(:first-of-type) {
  border-top: 1px solid #eee;
  padding-top: 16px;
}
/* topdoc
  name: Material List with Checkboxes
  use: Material List, Material Checkbox
  class: list__header--material
  markup:
    <ul class="list list--material">
      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <label class="checkbox checkbox--material">
            <input type="checkbox" id="checkbox3" class="checkbox__input checkbox--material__input">
            <div class="checkbox__checkmark checkbox--material__checkmark"></div>
          </label>
        </div>

        <label for="checkbox3" class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Notifications</div>
          <div class="list__item__subtitle list__item--material__subtitle">Allow notifications</div>
        </label>
      </li>

      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <label class="checkbox checkbox--material">
            <input type="checkbox" id="checkbox4" class="checkbox__input checkbox--material__input" checked="checked">
            <div class="checkbox__checkmark checkbox--material__checkmark"></div>
          </label>
        </div>

        <label for="checkbox4" class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Sound</div>
          <div class="list__item__subtitle list__item--material__subtitle">Hangouts message</div>
        </label>
      </li>

    </ul>
*/
/* topdoc
  name: Material List with Thumbnails
  use: Material List, List Item with Thumbnail
  class: list__item--material__thumbnail
  markup:
    <ul class="list list--material">
      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <img class="list__item__thumbnail list__item--material__thumbnail" src="http://placekitten.com/g/42/41" alt="Cute kitten">
        </div>

        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Lily</div>
          <div class="list__item__subtitle list__item--material__subtitle">Very friendly cat</div>
        </div>
      </li>

      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <img class="list__item__thumbnail list__item--material__thumbnail" src="http://placekitten.com/g/40/40" alt="Cute kitten">
        </div>

        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Molly</div>
          <div class="list__item__subtitle list__item--material__subtitle">Loves tuna!</div>
        </div>
      </li>

    </ul>
*/
.list__item--material__thumbnail {
  width: 40px;
  height: 40px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
}
/* topdoc
  name: Material List with Icons
  use: Material List, Material List with Thumbnails
  class: list__item--material__icon
  markup:
    <ul class="list list--material">
      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <img class="list__item__thumbnail list__item--material__thumbnail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwJCB8v/9zErgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAvSURBVFjD7c0BDQAACAMgtX+KJzWGm4MCdJK6MHVELBaLxWKxWCwWi8VisVj8MV7qBgI2A8rYpgAAAABJRU5ErkJggg==">
        </div>

        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Alice</div>
        </div>

        <div class="list__item__right list__item--material__right">
          <i style="color:#4db6ac" class="list__item__icon list__item--material__icon zmdi zmdi-comment"></i>
        </div>
      </li>

      <li class="list__item list__item--material">
        <div class="list__item__left list__item--material__left">
          <img class="list__item__thumbnail list__item--material__thumbnail" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAIAAAADnC86AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwJCB8v/9zErgAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAvSURBVFjD7c0BDQAACAMgtX+KJzWGm4MCdJK6MHVELBaLxWKxWCwWi8VisVj8MV7qBgI2A8rYpgAAAABJRU5ErkJggg==">
        </div>

        <div class="list__item__center list__item--material__center">
          <div class="list__item__title list__item--material__title">Bob</div>
        </div>

        <div class="list__item__right list__item--material__right">
          <i style="color:#4db6ac" class="list__item__icon list__item--material__icon zmdi zmdi-comment"></i>
        </div>
      </li>
    </ul>
*/
.list__item--material__icon {
  font-size: 20px;
  padding: 0 4px;
}
/* topdoc
  name: Search Input
  class: search-input
  modifiers:
    :disabled: Disabled state
  markup:
    <input type="search" value="" placeholder="Search" class="search-input">
*/
input[type="search"].search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}
.search-input {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  line-height: 1;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  -webkit-appearance: none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  height: 31px;
  font-size: 15px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #1f1f21;
  padding: 4px 0 0 28px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nNDFweCcgaGVpZ2h0PSc0MHB4JyB2aWV3Qm94PScwIDAgNDEgNDAnIHZlcnNpb249JzEuMScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluaycgeG1sbnM6c2tldGNoPSdodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMnPjx0aXRsZT5TbGljZSAxPC90aXRsZT48ZGVzY3JpcHRpb24+Q3JlYXRlZCB3aXRoIFNrZXRjaCAoaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoKTwvZGVzY3JpcHRpb24+PGRlZnM+PC9kZWZzPjxnIGlkPSdQYWdlIDEnIHN0cm9rZT0nbm9uZScgc3Ryb2tlLXdpZHRoPScxJyBmaWxsPSdub25lJyBmaWxsLXJ1bGU9J2V2ZW5vZGQnPjxnIGlkPSdzZWFyY2gnIGZpbGw9JyNDNkM4QzgnPjxwYXRoIGQ9J00wLjUwNCwxNi4zMzggQzAuNTA0LDI1LjA4NSA3LjYzNSwzMi4xNjUgMTYuNDQ0LDMyLjE2NSBDMjUuMjQsMzIuMTY1IDMyLjM4MiwyNS4wODUgMzIuMzgyLDE2LjMzOCBDMzIuMzgyLDcuNTkxIDI1LjI0LDAuNSAxNi40NDQsMC41IEM3LjYzNSwwLjUgMC41MDQsNy41OTEgMC41MDQsMTYuMzM4IEwwLjUwNCwxNi4zMzggWiBNNS41NTUsMTYuMzM4IEM1LjU1NSwxMC4zNTkgMTAuNDIzLDUuNTIxIDE2LjQ0NSw1LjUyMSBDMjIuNDU1LDUuNTIxIDI3LjMzMywxMC4zNiAyNy4zMzMsMTYuMzM4IEMyNy4zMzMsMjIuMzE3IDIyLjQ1NSwyNy4xNTYgMTYuNDQ1LDI3LjE1NiBDMTAuNDIzLDI3LjE1NiA1LjU1NSwyMi4zMTYgNS41NTUsMTYuMzM4IEw1LjU1NSwxNi4zMzggWiBNMjcuNjY2LDMwLjg2MSBMMzQuNTIxLDM4LjY3IEMzNS42MjUsMzkuNzcyIDM2LjMzOCwzOS43ODEgMzcuNDYsMzguNjcgTDM5LjY2MSwzNi40ODkgQzQwLjc0MywzNS40MDggNDAuODExLDM0LjcxMSAzOS42NjEsMzMuNTY4IEwzMS43NjUsMjYuNzkzIEwyNy42NjYsMzAuODYxIEwyNy42NjYsMzAuODYxIFogTTI3LjY2NiwzMC44NjEnIGlkPSdTaGFwZSc+PC9wYXRoPjwvZz48L2c+PC9zdmc+");
  background-position: 8px center;
  background-repeat: no-repeat;
  -webkit-background-size: 17px;
  background-size: 17px;
  font-weight: 400;
  display: block;
  width: 100%;
}
.search-input:focus {
  background-color: #f9f9f9;
  color: #1f1f21;
  border: 1px solid #ccc;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  margin-right: 0px;
}
.search-input::-webkit-input-placeholder {
  color: #999;
}
.search-input::-moz-placeholder {
  color: #999;
}
.search-input::-ms-input-placeholder {
  color: #999;
}
.search-input:-ms-input-placeholder {
  color: #999;
}
.search-input:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
/* topdoc
  name: Text Input
  class: text-input
  modifiers:
    :disabled: Disabled state
    :focus: Focused
    :invalid: Hover state
  markup:
    <input type="text" class="text-input" placeholder="text" value="">
    <br>
    <input type="text" class="text-input" placeholder="text" value="" disabled>
*/
.text-input {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  line-height: 1;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  border: none;
  background-color: transparent;
  letter-spacing: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #1f1f21;
  padding: 0;
  margin: 0;
  width: 100%;
  font-size: 15px;
  height: 31px;
  font-weight: 400;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.text-input::-webkit-input-placeholder {
  color: #999;
}
.text-input::-moz-placeholder {
  color: #999;
}
.text-input::-ms-input-placeholder {
  color: #999;
}
.text-input:-ms-input-placeholder {
  color: #999;
}
.text-input:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  border: none;
  background-color: transparent;
}
.text-input:disabled::-webkit-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
}
.text-input:disabled::-moz-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
}
.text-input:disabled::-ms-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
}
.text-input:disabled:-ms-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
}
.text-input::-ms-clear {
  display: none;
}
.text-input:invalid {
  border: none;
  background-color: transparent;
  color: #1f1f21;
}
/* topdoc
  name: Underbar Text Input
  class: text-input--underbar
  markup:
    <input type="text" class="text-input--underbar" placeholder="text" value="">
    <br>
    <input type="text" class="text-input--underbar" placeholder="text" value="" disabled>
*/
.text-input--underbar {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  line-height: 1;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  border: none;
  background-color: transparent;
  letter-spacing: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #1f1f21;
  padding: 0;
  margin: 0;
  width: 100%;
  font-size: 15px;
  height: 31px;
  font-weight: 400;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid #ccc;
  -webkit-border-radius: 0px;
  border-radius: 0px;
}
.text-input--underbar:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  border: none;
  background-color: transparent;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid #ccc;
}
.text-input--underbar:disabled::-webkit-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
  border: none;
  background-color: transparent;
}
.text-input--underbar:disabled::-moz-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
  border: none;
  background-color: transparent;
}
.text-input--underbar:disabled::-ms-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
  border: none;
  background-color: transparent;
}
.text-input--underbar:disabled:-ms-input-placeholder {
  border: none;
  background-color: transparent;
  color: #999;
  border: none;
  background-color: transparent;
}
.text-input--underbar:invalid {
  border: none;
  background-color: transparent;
  color: #1f1f21;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid #ccc;
}
/* topdoc
  name: Material Input
  class: text-input--material
  markup:
    <span>
      <input class="text-input--material" placeholder="Username" type="text" required>
      <br /><br />
      <input class="text-input--material" placeholder="Password" type="password" required>
    </span>
*/
.text-input--material {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  vertical-align: top;
  outline: none;
  line-height: 1;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #212121;
  background-image: -webkit-gradient(linear, left bottom, left top, color-stop(1px, transparent), color-stop(1px, #afafaf));
  background-image: -webkit-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: -moz-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: -o-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: linear-gradient(to top, transparent 1px, #afafaf 1px);
  -webkit-background-size: 100% 2px;
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-color: transparent;
  font-size: 16px;
  font-weight: 400;
  border: none;
  padding-bottom: 2px;
  -webkit-border-radius: 0;
  border-radius: 0;
  height: 24px;
  -webkit-transform: translate3d(0, 0, 0);
}
.text-input--material__label {
  color: #009688;
}
.text-input--material:focus {
  background-image: -webkit-gradient(linear, left top, left bottom, from(#009688), to(#009688)), -webkit-gradient(linear, left bottom, left top, color-stop(1px, transparent), color-stop(1px, #afafaf));
  background-image: -webkit-linear-gradient(#009688, #009688), -webkit-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: -moz-linear-gradient(#009688, #009688), -moz-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: -o-linear-gradient(#009688, #009688), -o-linear-gradient(bottom, transparent 1px, #afafaf 1px);
  background-image: linear-gradient(#009688, #009688), linear-gradient(to top, transparent 1px, #afafaf 1px);
  -webkit-animation: material-text-input-animate 0.3s forwards;
  -moz-animation: material-text-input-animate 0.3s forwards;
  -o-animation: material-text-input-animate 0.3s forwards;
  animation: material-text-input-animate 0.3s forwards;
}
.text-input--material::-webkit-input-placeholder {
  color: #afafaf;
  line-height: 20px;
}
.text-input--material::-moz-placeholder {
  color: #afafaf;
  line-height: 20px;
}
.text-input--material::-ms-input-placeholder {
  color: #afafaf;
  line-height: 20px;
}
.text-input--material:-ms-input-placeholder {
  color: #afafaf;
  line-height: 20px;
}
.text-input--material::-ms-clear {
  display: none;
}
@-moz-keyframes material-text-input-animate {
  0% {
    background-size: 0% 2px, 100% 2px;
  }
  100% {
    background-size: 100% 2px, 100% 2px;
  }
}
@-webkit-keyframes material-text-input-animate {
  0% {
    -webkit-background-size: 0% 2px, 100% 2px;
    background-size: 0% 2px, 100% 2px;
  }
  100% {
    -webkit-background-size: 100% 2px, 100% 2px;
    background-size: 100% 2px, 100% 2px;
  }
}
@-o-keyframes material-text-input-animate {
  0% {
    background-size: 0% 2px, 100% 2px;
  }
  100% {
    background-size: 100% 2px, 100% 2px;
  }
}
@keyframes material-text-input-animate {
  0% {
    -webkit-background-size: 0% 2px, 100% 2px;
    background-size: 0% 2px, 100% 2px;
  }
  100% {
    -webkit-background-size: 100% 2px, 100% 2px;
    background-size: 100% 2px, 100% 2px;
  }
}
/* topdoc
  name: Textarea
  class: textarea
  modifiers:
    :disabled: Disabled state
  markup:
    <textarea class="textarea" rows="3" placeholder="Textarea"></textarea>
  showcase:
*/
.textarea {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  vertical-align: top;
  resize: none;
  outline: none;
  padding: 5px 5px 5px 5px;
  font-size: 15px;
  font-weight: 400;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #1f1f21;
  letter-spacing: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-appearance: none;
  width: 100%;
}
.textarea:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.textarea::-webkit-input-placeholder,
.textarea::-moz-placeholder,
.textarea:-ms-input-placeholder {
  color: #999;
}
/* topdoc
  name: Textarea Transparent
  class: textarea--transparent
  modifiers:
    :disabled: Disabled state
  markup:
    <textarea class="textarea--transparent" rows="3" placeholder="Textarea"></textarea>
  showcase:
*/
.textarea--transparent {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  vertical-align: top;
  resize: none;
  outline: none;
  padding: 5px 5px 5px 5px;
  padding-left: 0;
  padding-right: 0;
  font-size: 15px;
  font-weight: 400;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  border: none;
  background-color: transparent;
  color: #1f1f21;
  letter-spacing: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-appearance: none;
  width: 100%;
}
.textarea--transparent:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.textarea--transparent::-webkit-input-placeholder,
.textarea--transparent::-moz-placeholder,
.textarea--transparent:-ms-input-placeholder {
  color: #999;
}
/* topdoc
  name: Dialog
  class: dialog
  markup:
    <div class="dialog-mask"></div>
    <div class="dialog">
      <div class="dialog-container">
        <div class="page">
          <p style="text-align:center;margin-top:40px;opacity:0.4;">Content</p>
        </div>
      </div>
    </div>
*/
.dialog {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  margin: auto auto;
  overflow: hidden;
  min-width: 270px;
  min-height: 100px;
  text-align: left;
}
.dialog-container {
  height: inherit;
  min-height: inherit;
  overflow: hidden;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  background-color: #f4f4f4;
  -webkit-mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC");
}
.dialog-mask {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.2);
}
/* topdoc
  name: Material Dialog
  use: Dialog
  markup:
    <div class="dialog-mask dialog-mask--material"></div>
    <div class="dialog dialog--material">
      <div class="dialog dialog-container--material">
        <p style="margin-left:24px;margin-right:24px">The quick brown fox jumps over the lazy dog.</p>
      </div>
    </div>
*/
.dialog--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  -webkit-box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.4);
  box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.4);
}
.dialog-container--material {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  background-color: #fff;
}
.dialog-mask--material {
  background-color: rgba(0,0,0,0.3);
}
/* topdoc
  name: Alert Dialog
  class: alert-dialog
  height: 360px
  markup:
    <div class="alert-dialog-mask"></div>
    <div class="alert-dialog">
      <div class="alert-dialog-container">
        <div class="alert-dialog-title">Alert</div>

        <div class="alert-dialog-content">
          Hello World!
        </div>

        <div class="alert-dialog-footer">
          <button class="alert-dialog-button alert-dialog-button--primal">OK</button>
        </div>
      </div>
    </div>
*/
.alert-dialog {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 270px;
  margin: auto auto;
  background-color: #f4f4f4;
  -webkit-border-radius: 8px;
  border-radius: 8px;
  overflow: visible;
  max-width: 95%;
  color: #1f1f21;
}
.alert-dialog-container {
  height: inherit;
  padding-top: 16px;
  overflow: hidden;
}
.alert-dialog-title {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  font-size: 17px;
  font-weight: 500;
  padding: 0px 8px 0px 8px;
  text-align: center;
  color: #1f1f21;
}
.alert-dialog-content {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 4px 12px 8px 12px;
  font-size: 14px;
  min-height: 36px;
  text-align: center;
  color: #1f1f21;
}
.alert-dialog-footer {
  width: 100%;
}
.alert-dialog-button {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: 0;
  vertical-align: middle;
  border: none;
  border-top: 1px solid #ddd;
  font-size: 16px;
  padding: 0 8px;
  margin: 0;
  display: block;
  width: 100%;
  background-color: transparent;
  text-align: center;
  height: 44px;
  line-height: 44px;
  outline: none;
  color: rgba(24,103,194,0.81);
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button {
    border-top: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top;
    background-image: -webkit-linear-gradient(270deg, #ddd, #ddd 50%, transparent 50%);
    background-image: -moz-linear-gradient(270deg, #ddd, #ddd 50%, transparent 50%);
    background-image: -o-linear-gradient(270deg, #ddd, #ddd 50%, transparent 50%);
    background-image: linear-gradient(180deg, #ddd, #ddd 50%, transparent 50%);
  }
}
.alert-dialog-button:active {
  background-color: rgba(0,0,0,0.05);
}
.alert-dialog-button--primal {
  font-weight: 500;
}
.alert-dialog-footer--one {
  white-space: nowrap;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -moz-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.alert-dialog-button--one {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -moz-box-flex: 1;
  -moz-flex: 1;
  -ms-flex: 1;
  flex: 1;
  display: block;
  width: 100%;
  border-left: 1px solid #ddd;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button--one {
    border-top: none;
    border-left: none;
    -webkit-background-size: 100% 1px, 1px 100%;
    background-size: 100% 1px, 1px 100%;
    background-repeat: no-repeat;
    background-position: top, left;
    background-image: -webkit-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%), -webkit-linear-gradient(0deg, transparent, transparent 50%, #ddd 50%);
    background-image: -moz-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%), -moz-linear-gradient(0deg, transparent, transparent 50%, #ddd 50%);
    background-image: -o-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%), -o-linear-gradient(0deg, transparent, transparent 50%, #ddd 50%);
    background-image: linear-gradient(0deg, transparent, transparent 50%, #ddd 50%), linear-gradient(90deg, transparent, transparent 50%, #ddd 50%);
  }
}
.alert-dialog-button--one:first-child {
  border-left: none;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button--one:first-child {
    border-top: none;
    -webkit-background-size: 100% 1px;
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top, left;
    background-image: -webkit-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%);
    background-image: -moz-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%);
    background-image: -o-linear-gradient(90deg, transparent, transparent 50%, #ddd 50%);
    background-image: linear-gradient(0deg, transparent, transparent 50%, #ddd 50%);
  }
}
.alert-dialog-mask {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.2);
}
/* topdoc
  name: Alert Dialog without Title
  use: Alert Dialog
  height: 360px
  markup:
    <div class="alert-dialog-mask"></div>
    <div class="alert-dialog">
      <div class="alert-dialog-container">
        <div class="alert-dialog-content">
          Hello World!
        </div>

        <div class="alert-dialog-footer">
          <button class="alert-dialog-button alert-dialog-button--primal">OK</button>
        </div>
      </div>
    </div>
*/
/* topdoc
  name: Alert Dialog with Multiple Buttons
  use: Alert Dialog
  height: 360px
  markup:
    <div class="alert-dialog-mask"></div>
    <div class="alert-dialog">
      <div class="alert-dialog-container">
        <div class="alert-dialog-content">
          Hello World!
        </div>

        <div class="alert-dialog-footer">
          <button class="alert-dialog-button">Cancel</button>
          <button class="alert-dialog-button alert-dialog-button--primal">OK</button>
        </div>
      </div>
    </div>
*/
/* topdoc
  name: Alert Dialog with Multiple Buttons 2
  use: Alert Dialog
  height: 360px
  markup:
    <div class="alert-dialog-mask"></div>
    <div class="alert-dialog">
      <div class="alert-dialog-container">
        <div class="alert-dialog-title">Alert</div>

        <div class="alert-dialog-content">
          Hello World!
        </div>

        <div class="alert-dialog-footer alert-dialog-footer--one">
          <button class="alert-dialog-button alert-dialog-button--one">Left</button>
          <button class="alert-dialog-button alert-dialog-button--primal alert-dialog-button--one">Center</button>
          <button class="alert-dialog-button alert-dialog-button--one">Right</button>
        </div>
      </div>
    </div>
*/
/* topdoc
  name: Material Alert Dialog
  use: Alert Dialog
  height: 360px
  markup:
    <div class="alert-dialog-mask alert-dialog-mask--material"></div>
    <div class="alert-dialog alert-dialog--material">
      <div class="alert-dialog-container alert-dialog-container--material">
        <div class="alert-dialog-title alert-dialog-title--material">
          Dialog title
        </div>
        <div class="alert-dialog-content alert-dialog-content--material">
          Some dialog content.
        </div>
        <div class="alert-dialog-footer alert-dialog-footer--material">
          <button class="alert-dialog-button alert-dialog-button--material">OK</button>
          <button class="alert-dialog-button alert-dialog-button--material">CANCEL</button>
        </div>
      </div>
    </div>
*/
.alert-dialog--material {
  -webkit-border-radius: 2px;
  border-radius: 2px;
  background-color: #fff;
}
.alert-dialog-container--material {
  padding-top: 22px;
  -webkit-box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.4);
  box-shadow: 0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px -5px rgba(0,0,0,0.4);
}
.alert-dialog-title--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  font-size: 20px;
  font-weight: 500;
  padding: 0 24px;
  color: #212121;
}
.alert-dialog-content--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  padding: 0 24px;
  margin: 24px 0 10px 0;
  min-height: 0;
  color: #727272;
}
.alert-dialog-footer--material {
  display: inline-block;
  padding: 0px 8px 0px 24px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.alert-dialog-button--material {
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
  display: inline-block;
  width: auto;
  min-width: 70px;
  float: right;
  background: none;
  border-top: none;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  color: #009688;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button--material {
    background: none;
  }
}
.alert-dialog-button--material:active {
  background-color: initial;
}
.alert-dialog-button--one--material,
.alert-dialog-button--one--material:first-child {
  border: 0;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button--one--material,
  .alert-dialog-button--one--material:first-child {
    background: none;
  }
}
.alert-dialog-button--primal--material {
  font-weight: 500;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .alert-dialog-button--primal--material {
    background: none;
  }
}
.alert-dialog-mask--material {
  background-color: rgba(0,0,0,0.3);
}
/* topdoc
  name: Popover
  class: popover
  markup:
    <div class="popover">
      <div class="popover-mask"></div>
      <div class="popover popover--bottom" style="bottom:20px;left:50px;">
        <div class="popover__arrow"></div>
        <div class="popover__content">
          <div style="text-align:center;opacity:0.4;margin-top:40px">Content</div>
        </div>
      </div>
    </div>
*/
.popover {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  left: 6px;
  z-index: 20000;
  display: none;
}
.popover-mask {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.1);
  position: fixed;
}
.popover__container {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.popover__content {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  position: absolute;
  display: block;
  width: 220px;
  overflow: auto;
  min-height: 100px;
  max-height: 100%;
  background-color: #fff;
  -webkit-border-radius: 8px;
  border-radius: 8px;
  color: #1f1f21;
  pointer-events: auto;
}
.popover__content > * {
  overflow: hidden;
}
.popover__content .page,
.popover__content .page__content {
  position: static;
}
.popover__arrow {
  position: absolute;
  width: 18px;
  height: 18px;
  -webkit-transform-origin: 50% 50% 0;
  -moz-transform-origin: 50% 50% 0;
  -ms-transform-origin: 50% 50% 0;
  -o-transform-origin: 50% 50% 0;
  transform-origin: 50% 50% 0;
  background-color: transparent;
  background-image: -webkit-linear-gradient(45deg, #fff, #fff 50%, transparent 50%);
  background-image: -moz-linear-gradient(45deg, #fff, #fff 50%, transparent 50%);
  background-image: -o-linear-gradient(45deg, #fff, #fff 50%, transparent 50%);
  background-image: linear-gradient(45deg, #fff, #fff 50%, transparent 50%);
  -webkit-border-radius: 0 0 0 4px;
  border-radius: 0 0 0 4px;
  margin: -9px;
}
.popover--bottom .popover__arrow {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
  bottom: 1px;
}
.popover--top .popover__arrow {
  -webkit-transform: rotate(135deg);
  -moz-transform: rotate(135deg);
  -ms-transform: rotate(135deg);
  -o-transform: rotate(135deg);
  transform: rotate(135deg);
  top: 1px;
}
.popover--left .popover__arrow {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  left: 1px;
}
.popover--right .popover__arrow {
  -webkit-transform: rotate(225deg);
  -moz-transform: rotate(225deg);
  -ms-transform: rotate(225deg);
  -o-transform: rotate(225deg);
  transform: rotate(225deg);
  right: 1px;
}
/* topdoc
  name: Popover(down)
  use: Popover
  markup:
    <div class="popover-mask"></div>
    <div class="popover popover--top" style="top:20px;left:50px;">
      <div class="popover__arrow"></div>
      <div class="popover__content">
        <div style="text-align:center;opacity:0.4;margin-top:40px">Content</div>
      </div>
    </div>
*/
/* topdoc
  name: Popover(left)
  use: Popover
  markup:
    <div class="popover-mask"></div>
    <div class="popover popover--right" style="top:20px;right:20px;">
      <div class="popover__arrow"></div>
      <div class="popover__content">
        <div style="text-align:center;opacity:0.4;margin-top:40px">Content</div>
      </div>
    </div>
*/
/* topdoc
  name: Popover(right)
  use: Popover
  markup:
    <div class="popover-mask"></div>
    <div class="popover popover--left" style="top:20px;left:20px;">
      <div class="popover__arrow"></div>
      <div class="popover__content">
        <div style="text-align:center;opacity:0.4;margin-top:40px">Content</div>
      </div>
    </div>
*/
.popover--material {
  top: 4px;
  right: 4px;
  bottom: 4px;
  left: 4px;
}
.popover-mask--material {
  background-color: transparent;
}
.popover__container--material {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  display: inline-block;
  max-height: 100%;
  overflow: auto;
/*border-bottom 4px solid transparent*/
}
.popover__content--material {
  background-color: #fafafa;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  color: #1f1f21;
  -webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2);
}
.popover__arrow--material {
  display: none;
}
/* topdoc
  name: Modal
  class: modal
  markup:
    <div class="modal">
      <div class="modal__content">
        Message Text
      </div>
    </div>
*/
.modal {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  white-space: nowrap;
  overflow: hidden;
  word-spacing: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  overflow: hidden;
  background-color: rgba(0,0,0,0.7);
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: table;
  z-index: 2147483647;
}
.modal__content {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  white-space: nowrap;
  overflow: hidden;
  word-spacing: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  color: #fff;
  white-space: normal;
}
/* topdoc
  name: Progress Bar
  class: progres-bar
  markup:
    <div class="progress-bar progress-bar--indeterminate">
      <div class="progress-bar__primary"></div>
      <div class="progress-bar__secondary"></div>
    </div>
    <br />
    <div class="progress-bar progress-bar--determinate">
      <div class="progress-bar__primary" style="width:20%"></div>
      <div class="progress-bar__secondary" style="width:76%"></div>
    </div>
*/
.progress-bar {
  position: relative;
  height: 4px;
  display: block;
  width: 100%;
  background-color: #e0e0e0;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  margin: 0;
  overflow: hidden;
}
.progress-bar--determinate > .progress-bar__primary,
.progress-bar--determinate > .progress-bar__secondary {
  position: absolute;
  background-color: #009688;
  top: 0;
  bottom: 0;
  -webkit-transition: width 0.3s linear;
  -moz-transition: width 0.3s linear;
  -o-transition: width 0.3s linear;
  transition: width 0.3s linear;
  z-index: 100;
}
.progress-bar--determinate > .progress-bar__secondary {
  background-color: #80cbc4;
  z-index: 0;
}
.progress-bar--indeterminate:before {
  content: '';
  position: absolute;
  background-color: #009688;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  -moz-animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  -o-animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
.progress-bar--indeterminate:after {
  content: '';
  position: absolute;
  background-color: #009688;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  -moz-animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  -o-animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  -webkit-animation-delay: 1.15s;
  -moz-animation-delay: 1.15s;
  -o-animation-delay: 1.15s;
  animation-delay: 1.15s;
}
@-moz-keyframes progress-bar__indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}
@-webkit-keyframes progress-bar__indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}
@-o-keyframes progress-bar__indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}
@keyframes progress-bar__indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}
@-moz-keyframes progress-bar__indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}
@-webkit-keyframes progress-bar__indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}
@-o-keyframes progress-bar__indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}
@keyframes progress-bar__indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}
/* topdoc
  name: Progress Circle
  class: progres-circle
  markup:
    <svg class="progress-circular">
      <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" fill="none" stroke-width="10%" stroke-miterlimit="10"/>
    </svg>
    <svg class="progress-circular progress-circular--determinate">
      <circle class="progress-circular__secondary" cx="50%" cy="50%" r="40%" fill="none" stroke-width="10%" stroke-miterlimit="10" style="stroke-dasharray:140%,251.32%"/>
      <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" fill="none" stroke-width="10%" stroke-miterlimit="10" style="stroke-dasharray:100%,251.32%"/>
    </svg>

*/
.progress-circular {
  -webkit-animation: progress__rotate 2s linear infinite;
  -moz-animation: progress__rotate 2s linear infinite;
  -o-animation: progress__rotate 2s linear infinite;
  animation: progress__rotate 2s linear infinite;
  height: 80px;
  position: relative;
  width: 80px;
}
.progress-circular__primary {
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  -webkit-animation: progress__dash 1.5s ease-in-out infinite;
  -moz-animation: progress__dash 1.5s ease-in-out infinite;
  -o-animation: progress__dash 1.5s ease-in-out infinite;
  animation: progress__dash 1.5s ease-in-out infinite;
  stroke: #009688;
  -webkit-transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  -moz-transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  -o-transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-circular--determinate {
  -webkit-transform: rotate(270deg);
  -moz-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  transform: rotate(270deg);
  -webkit-animation: none;
  -moz-animation: none;
  -o-animation: none;
  animation: none;
}
.progress-circular--determinate > .progress-circular__primary {
  -webkit-animation: none;
  -moz-animation: none;
  -o-animation: none;
  animation: none;
}
.progress-circular--determinate > .progress-circular__secondary {
  -webkit-animation: none;
  -moz-animation: none;
  -o-animation: none;
  animation: none;
  stroke: #80cbc4;
}
@-moz-keyframes progress__rotate {
  100% {
    -moz-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-webkit-keyframes progress__rotate {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-o-keyframes progress__rotate {
  100% {
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes progress__rotate {
  100% {
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-moz-keyframes progress__dash {
  0% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: 0%;
  }
  50% {
    stroke-dasharray: 201%, 50.322%;
    stroke-dashoffset: -100%;
  }
  100% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: -251.32%;
  }
}
@-webkit-keyframes progress__dash {
  0% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: 0%;
  }
  50% {
    stroke-dasharray: 201%, 50.322%;
    stroke-dashoffset: -100%;
  }
  100% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: -251.32%;
  }
}
@-o-keyframes progress__dash {
  0% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: 0%;
  }
  50% {
    stroke-dasharray: 201%, 50.322%;
    stroke-dashoffset: -100%;
  }
  100% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: -251.32%;
  }
}
@keyframes progress__dash {
  0% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: 0%;
  }
  50% {
    stroke-dasharray: 201%, 50.322%;
    stroke-dashoffset: -100%;
  }
  100% {
    stroke-dasharray: 10%, 241.32%;
    stroke-dashoffset: -251.32%;
  }
}
/* topdoc
  name: Fab
  class: fab
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <button class="fab"><i class="zmdi zmdi-car"></i></button>
    <button class="fab" disabled><i class="zmdi zmdi-car"></i></button>
*/
.fab {
  position: relative;
  display: inline-block;
  vertical-align: top;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  line-height: normal;
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  font-size: 17px;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: 'Roboto', 'Noto', sans-serif;
  -webkit-font-smoothing: antialiased;
  width: 56px;
  height: 56px;
  text-decoration: none;
  font-size: 25px;
  line-height: 56px;
  letter-spacing: 0;
  color: #fff;
  vertical-align: middle;
  text-align: center;
  background-color: #009688;
  border: 0px solid currentColor;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  overflow: hidden;
  -webkit-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.4);
  box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.4);
  -webkit-transition: all 0.2s ease-in-out;
  -moz-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}
.fab:active {
  -webkit-box-shadow: 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.4);
  box-shadow: 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.4);
  background-color: #009688;
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.fab:focus {
  outline: 0;
}
.fab__icon {
  position: relative;
  overflow: hidden;
  height: 100%;
  width: 100%;
  display: block;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  padding: 0;
  z-index: 100;
  line-height: 56px;
}
.fab:disabled,
.fab[disabled] {
  background-color: rgba(0,0,0,0.5);
  -webkit-box-shadow: none;
  box-shadow: none;
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.fab--top__right {
  top: 20px;
  bottom: auto;
  right: 20px;
  left: auto;
  position: fixed;
}
.fab--bottom__right {
  top: auto;
  bottom: 20px;
  right: 20px;
  left: auto;
  position: fixed;
}
.fab--top__left {
  top: 20px;
  bottom: auto;
  right: auto;
  left: 20px;
  position: fixed;
}
.fab--bottom__left {
  top: auto;
  bottom: 20px;
  right: auto;
  left: 20px;
  position: fixed;
}
.fab--top__center {
  top: 20px;
  bottom: auto;
  margin-left: -28px;
  left: 50%;
  right: auto;
  position: fixed;
}
.fab--bottom__center {
  top: auto;
  bottom: 20px;
  margin-left: -28px;
  left: 50%;
  right: auto;
  position: fixed;
}
/* topdoc
  name: Fab Mini
  use: Fab
  modifiers:
    :active: Active state
    :disabled: Disabled state
    :focus: Focused
  markup:
    <button class="fab fab--mini"><i class="zmdi zmdi-plus"></i></button>
    <button class="fab fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
*/
.fab--mini {
  width: 40px;
  height: 40px;
  line-height: 40px;
}
.fab--mini .fab__icon {
  line-height: 40px;
}
.speed-dial__item {
  position: absolute;
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  -ms-transform: scale(0);
  -o-transform: scale(0);
  transform: scale(0);
}
/*! onsenui - v2.0.0-rc.4 - 2016-05-03 */
/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 */

@import url("font_awesome/css/font-awesome.min.css");
@import url("ionicons/css/ionicons.min.css");
@import url("material-design-iconic-font/css/material-design-iconic-font.min.css");

/* custom elements */
ons-page, ons-navigator,
ons-split-view, ons-sliding-menu, ons-tabbar,
ons-gesture-detector {
  display: block;
}

ons-navigator,
ons-tabbar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  overflow: hidden;
}

ons-tab {
  -webkit-transform: translate3d(0, 0, 0);
          transform: translate3d(0, 0, 0);
}

ons-page, ons-navigator, ons-tabbar, ons-sliding-menu, ons-split-view {
  z-index: 2;
}

ons-fab {
  z-index: 3;
}

* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

input, textarea {
  -webkit-user-select: auto;
}

ons-toolbar:not([inline]), ons-bottom-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 10000;
}
ons-toolbar:not([inline]) {
  top: 0;
}
ons-bottom-toolbar {
  bottom: 0;
}

.page, .page__content {
  background-color: transparent !important;
  background: transparent !important;
}

.page__content {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 0;
  -ms-touch-action: pan-y;
}

.navigation-bar + .page__background + .page__content {
  margin-top: -1px;
  top: 44px;
}

.navigation-bar--material + .page__background + .page__content {
  top: 56px;
}

.page[status-bar-fill] > .page__content {
  top: 20px;
}

.page[status-bar-fill] > .navigation-bar {
  padding-top: 20px;
  box-sizing: content-box;
}

.page[status-bar-fill] > .navigation-bar + .page__background + .page__content {
  top: 64px;
}

.page[status-bar-fill] > .navigation-bar--material + .page__background + .page__content {
  top: 76px;
}

ons-tabbar[status-bar-fill] > .tab-bar--top__content {
  top: 71px;
}

ons-tabbar[status-bar-fill] > .tab-bar--top {
  padding-top: 22px;
}

ons-tabbar[position="top"] .page[status-bar-fill] > .page__content {
  top: 0px;
}

.navigation-bar + .page__background + .page__content ons-tabbar[status-bar-fill] > .tab-bar--top {
  top: 0px;
}

.navigation-bar + .page__background + .page__content ons-tabbar[status-bar-fill] > .tab-bar--top__content {
  top: 49px;
}

.page-with-bottom-toolbar > .page__content {
  bottom: 44px;
}

ons-dialog[disabled] > .dialog,
ons-alert-dialog[disabled],
ons-popover[disabled] {
  pointer-events: none;
  opacity: 0.75;
}

ons-list-item[disabled] {
   pointer-events: none;
}

ons-pull-hook {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  text-align: center;
  z-index: 20002;
}

ons-splitter {
  overflow: hidden;
}

ons-splitter, ons-splitter-mask, ons-splitter-content, ons-splitter-side {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  z-index: 0;
}

ons-splitter-mask {
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.1);
  display: none;
  opacity: 0;
}

ons-splitter-content {
  z-index: 1;
}

ons-splitter-side {
  right: auto;
  z-index: 1;
}

ons-splitter-side[side="right"] {
  right: 0;
  left: auto;
}

ons-splitter-side[mode="collapse"] {
  z-index: 3;
  left: auto;
  right: 100%;
}

ons-splitter-side[side="right"][mode="collapse"] {
  right: auto;
  left: 100%;
}

ons-toolbar-button > ons-icon[icon*="ion-"] {
  font-size: 26px;
}

ons-range {
  display: inline-block;
}

ons-range > input {
  min-width: 50px;
  width: 100%;
}

/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 */

ons-carousel {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
}

ons-carousel-item {
  display: block;
  height: 100%;
  visibility: hidden;
}

ons-carousel[fullscreen] {
  position: absolute;
  top: 0px;
  right: 0px;
  left: 0px;
  bottom: 0px;
  box-sizing: border-box;
}

ons-carousel[disabled] {
  pointer-events: none;
  opacity: 0.75;
}

ons-row {
  display: -webkit-box;
  display: -moz-flex;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

ons-row[vertical-align="top"], ons-row[align="top"] {
  -webkit-box-align: start;
  box-align: start;
  -moz-align-items: flex-start;
  -ms-grid-row-align: flex-start;
      align-items: flex-start;
}

ons-row[vertical-align="bottom"], ons-row[align="bottom"] {
  -webkit-box-align: end;
  box-align: end;
  -moz-align-items: flex-end;
  -ms-grid-row-align: flex-end;
      align-items: flex-end;
}

ons-row[vertical-align="center"], ons-row[align="center"] {
  -webkit-box-align: center;
  box-align: center;
  -moz-align-items: center;
  -ms-grid-row-align: center;
      align-items: center;
  text-align: inherit;
}

ons-row + ons-row {
  padding-top: 0;
}

ons-col {
  -webkit-box-flex: 1;
  -moz-flex: 1;
  flex: 1;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

ons-col[vertical-align="top"], ons-col[align="top"] {
  align-self: flex-start;
}

ons-col[vertical-align="bottom"], ons-col[align="bottom"] {
  align-self: flex-end; }

ons-col[vertical-align="center"], ons-col[align="center"] {
  -webkit-align-self: center;
  -moz-align-self: center;
  -ms-flex-item-align: center;
  text-align: inherit;
}


/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 */

.ons-icon {
  display: inline-block;
  font-style: normal;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ons-icon--ion {
  line-height: 0.75em;
  vertical-align: -25%;
}

ons-icon[spin] {
  -webkit-animation: ons-icon-spin 2s infinite linear;
  animation: ons-icon-spin 2s infinite linear;
}

@-webkit-keyframes ons-icon-spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
  }
}

@keyframes ons-icon-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}

.ons-icon[rotate="90"] {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.ons-icon[rotate="180"] {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

.ons-icon[rotate="270"] {
  -webkit-transform: rotate(270deg);
  transform: rotate(270deg);
}

ons-icon[fixed-width] {
  width: 1.28571429em;
  text-align: center;
}

.ons-icon--lg {
  font-size: 1.33333333em;
  line-height: 0.75em;
  vertical-align: -15%;
}

.ons-icon--2x {
  font-size: 2em;
}

.ons-icon--3x {
  font-size: 3em;
}

.ons-icon--4x {
  font-size: 4em;
}

.ons-icon--5x {
  font-size: 5em;
}

ons-input {
  display: inline-block;
  position: relative;
}

ons-input .text-input__container {
  width: 100%;
  display: inline-block;
}

ons-input .text-input--material__label {
  position: absolute;
  left: 0px;
  top: 2px;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Roboto', 'Noto', sans-serif;
  pointer-events: none;
}

ons-input .text-input__label:not(.text-input--material__label) {
  display: none;
}

ons-input .text-input__label--active {
  transform: translate(0, -75%) scale(0.75);
  -webkit-transform: translate(0, -75%) scale(0.75);
  transform-origin: left top;
  -webkit-transform-origin: left top;
  -webkit-transition: color 0.1s ease-in, -webkit-transform 0.1s ease-in;
  transition: color 0.1s ease-in, -webkit-transform 0.1s ease-in;
  transition: transform 0.1s ease-in, color 0.1s ease-in;
  transition: transform 0.1s ease-in, color 0.1s ease-in, -webkit-transform 0.1s ease-in;
  -webkit-transition: transform 0.1s ease-in, color 0.1s ease-in;
}

ons-input:not([float]) .text-input__label--active {
  display: none;
}

ons-input[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

ons-input input.text-input--material::-webkit-input-placeholder {
  color: transparent;
}

ons-input input.text-input--material::-moz-placeholder {
  color: transparent;
}

ons-input input.text-input--material:-ms-input-placeholder {
  color: transparent;
}

/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 */

ons-progress-bar {
  display: block;
}

ons-progress-circular {
  display: inline-block;
  width: 42px;
  height: 42px;
}

ons-progress-circular > svg.progress-circular {
  width: 100%;
  height: 100%;
}

/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 */
.ripple {
  display: block;
  position: absolute;
  overflow: hidden;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

ons-list-item .ripple__wave, ons-list-item .ripple__background,
.button--material--flat .ripple__wave, .button--material--flat .ripple__background{
  background: rgba(189, 189, 189, 0.3);
}

.ripple__background {
  background: rgba(255, 255, 255, 0.2);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.ripple__wave {
  background: rgba(255, 255, 255, 0.2);
  width: 0;
  height: 0;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

ons-sliding-menu {
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  z-index: 0;
  overflow-x: hidden;
}

.onsen-sliding-menu__menu,
.onsen-sliding-menu__main {
  position: absolute;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  z-index: 0;
  margin: 0;
  padding: 0;
}

.onsen-sliding-menu__menu {
  opacity: 0;
}


/*
Copyright 2013-2015 ASIAL CORPORATION

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

ons-split-view {
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  z-index: 0;
  overflow: hidden;
}

.onsen-split-view__secondary {
  opacity: 0;
  width: 100%;
}

.onsen-split-view__secondary,
.onsen-split-view__main {
  position: absolute;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  z-index: 0;
  overflow-x: hidden; 
}
/* Riot v3.0.0-alpha.3, @license MIT */
!function(e,t){"use strict";function n(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function r(e,t,n,r){for(var i,o=t.length,a=e.length;o>a;)i=t[--o],t.splice(o,1),i.unmount(),U(r.tags,n,i,!0)}function i(e,t){Object.keys(e.tags).forEach(function(n){var r=e.tags[n];A(r)?d(r,function(e){E(e,n,t)}):E(r,n,t)})}function o(e,t,o){b(e,"each");var a,s=typeof C(e,"no-reorder")!==re||b(e,"no-reorder"),u=R(e),l=W[u]||{tmpl:g(e)},f=se.test(u),p=e.parentNode,h=document.createTextNode(""),m=S(e),v="option"===u.toLowerCase(),x=[],y=[],w="VIRTUAL"==e.tagName;o=he.loopKeys(o),o.isLoop=!0;var _=C(e,"if");return _&&b(e,"if"),p.insertBefore(h,e),p.removeChild(e),o.update=function(){var d=he(o.val,t),g=document.createDocumentFragment();if(p=h.parentNode,A(d)||(a=d||!1,d=a?Object.keys(d).map(function(e){return n(o,e,d[e])}):[]),_&&(d=d.filter(function(e,r){var i=n(o,e,r,t);return!!he(_,i)})),d.forEach(function(r,d){var h,v=s&&r instanceof Object&&!a,b=y.indexOf(r),C=~b&&v?b:d,_=x[C];r=!a&&o.key?n(o,r,d):r,!v&&!_||v&&!~b||!_?(_=new c(l,{parent:t,isLoop:!0,hasImpl:!!W[u],root:f?p:e.cloneNode(),item:r},e.innerHTML),_.mount(),h=_.root,d==x.length?w?K(_,g):g.appendChild(h):(w?K(_,p,x[d]):p.insertBefore(h,x[d].root),y.splice(d,0,r)),x.splice(d,0,_),m&&Z(t.tags,u,_,!0),C=d):_.update(r),C!==d&&v&&(w?V(_,p,x[d]):p.insertBefore(_.root,x[d].root),o.pos&&(_[o.pos]=d),x.splice(d,0,x.splice(C,1)[0]),y.splice(d,0,y.splice(C,1)[0]),!m&&_.tags&&i(_,d)),_._item=r,L(_,"_parent",t)}),r(d,x,u,t),v){if(p.appendChild(g),pe&&!p.multiple)for(var b=0;b<p.length;b++)if(p[b].__riot1374){p.selectedIndex=b,delete p[b].__riot1374;break}}else p.insertBefore(g,h);y=d.slice()},o.unmount=function(){d(x,function(e){e.unmount()})},o}function a(e,t,n){b(e,"if"),this.parentTag=t,this.expr=n,this.stub=document.createTextNode(""),this.pristine=e;var r=e.parentNode;r.insertBefore(this.stub,e),r.removeChild(e)}function s(e,t,n,r){this.dom=e,this.attr=t,this.rawValue=n,this.parent=r,this.customParent=O(r),this.hasExp=he.hasExpr(n),this.firstRun=!0}function u(e,t,n,r){var i={parent:{children:n}};$(e,function(n,i){var u,c,l,f=n.nodeType,p=i.parent;if(3==f&&"STYLE"!=n.parentNode.tagName&&he.hasExpr(n.nodeValue)&&p.children.push({dom:n,expr:n.nodeValue}),1!=f)return i;if(u=C(n,"each"))return p.children.push(o(n,t,u)),!1;if(u=C(n,"if"))return p.children.push(new a(n,t,u)),!1;var h=[],g=[];d(n.attributes,function(e){var r=e.name,i=le.test(r),o=he.hasExpr(e.value);return"name"===r||"id"===r?(c=new s(n,r,e.value,t),p.children.push(c),g.push(c),void h.push(c)):(c={dom:n,expr:e.value,attr:e.name,bool:i},h.push(c),o?(p.children.push(c),i?(b(n,r),!1):void 0):void 0)}),(c=C(n,te))&&he.hasExpr(c)&&(u={isRtag:!0,expr:c,dom:n,children:[]},p.children.push(u),p=u);var m=S(n);if(m&&(n!==e||r)){var v={root:n,parent:t,hasImpl:!0,ownAttrs:h};return l=N(m,v,n.innerHTML,t),p.children.push(l),d(g,function(e){e.tag=l}),!1}return{parent:p}},i)}function c(e,t,n){function r(){var e=g&&p?s:l||s;m?d(m||[],function(e){var t=e.hasOwnProperty("value")?e.value:e.expr;c[w(e.attr)]=t}):d(C.attributes,function(t){var n=t.value,r=he.hasExpr(n);r&&m||(c[w(t.name)]=r?he(n,e):n)})}function i(e){for(var t in v)typeof s[t]!==oe&&I(s,t)&&(s[t]=e[t])}function o(){d(Object.keys(s.parent),function(e){var t=!ue.test(e)&&j(A,e);(typeof s[e]===oe||t)&&(t||A.push(e),s[e]=s.parent[e])})}var a,s=Q.observable(this),c=D(t.opts)||{},l=t.parent,p=t.isLoop,g=t.hasImpl,m=t.ownAttrs,v=F(t.item),y=[],C=t.root,S=e.fn,E=t.tagName||C.tagName.toLowerCase(),N={},R={},A=[];e.name&&C._tag&&C._tag.unmount(!0),this.isMounted=!1,C.isLoop=p,this._hasImpl=g,L(this,"_riot_id",++J),M(this,{parent:l,root:C,opts:c,tags:{}},v),d(C.attributes,function(e){var t=e.value;he.hasExpr(t)&&(N[e.name]=t)}),a=ge(e,n,R),R=R.attrs||"",L(this,"update",function(e){return typeof s.shouldUpdate!=ae||s.shouldUpdate()?(e=F(e),p&&!g&&o(),e&&x(v)&&(i(e),v=e),M(s,e),r(),s.isMounted&&s.trigger("update",e),f(y,s),s.isMounted&&s.trigger("updated"),this):void 0}),L(this,"mixin",function(){return d(arguments,function(e){var t;e=typeof e===re?Q.mixin(e):e,h(e)?(t=new e,e=e.prototype):t=e,d(Object.getOwnPropertyNames(e),function(e){"init"!=e&&(s[e]=h(t[e])?t[e].bind(s):t[e])}),t.init&&t.init.bind(s)()}),this}),L(this,"mount",function(e){r(),C._tag=this;var t=Q.mixin(Y);if(t)for(var n in t)t.hasOwnProperty(n)&&s.mixin(t[n]);if(S&&S.call(s,c),(R||g)&&(k(R,function(e,t){_(C,e,t)}),u(s.root,s,y)),u(a,s,y),s.update(v),s.trigger("before-mount"),p&&!g)s.root=C=a.firstChild;else{for(;a.firstChild;)C.appendChild(a.firstChild);C.stub&&(s.root=C=l.root)}L(s,"root",C),s.isMounted=!0,!s.parent||s.parent.isMounted?s.trigger("mount"):s.parent.one("mount",function(){P(s.root)||s.trigger("mount")})}),L(this,"unmount",function(e){var t,n=s.root,r=n.parentNode,i=X.indexOf(s);if(s.trigger("before-unmount"),~i&&X.splice(i,1),r){if(l)t=O(l),U(t.tags,E,s);else for(;n.firstChild;)n.removeChild(n.firstChild);e?(b(r,ne),b(r,te)):r.removeChild(n)}this._virts&&d(this._virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),T(y),s.trigger("unmount"),s.off("*"),s.isMounted=!1,delete s.root._tag})}function l(t,n,r,i){r[t]=function(t){var o=i._parent,a=i._item;if(!a)for(;o&&!a;)a=o._item,o=o._parent;t=t||e.event,I(t,"currentTarget")&&(t.currentTarget=r),I(t,"target")&&(t.target=t.srcElement),I(t,"which")&&(t.which=t.charCode||t.keyCode),t.item=a,n.call(i,t),t.preventUpdate||O(i).update()}}function f(e,t){d(e,function(e,n){var r=e.dom,i=e.attr,o=he(e.expr,t),a=r&&r.parentNode,s="value"==i;if(e.bool?o=o?i:!1:null==o&&(o=""),a&&"TEXTAREA"==a.tagName&&(o=(""+o).replace(/riot-/g,""),a.value=o),e._riot_id){if(e.isMounted)e.update();else if(e.mount(),"VIRTUAL"==e.root.tagName){var u=document.createDocumentFragment();K(e,u),e.root.parentElement.replaceChild(u,e.root)}}else{if(e.update)return void e.update();var c=e.value;if(e.value=o,e.isRtag&&o)return p(e,t);if(!(s&&r.value==o||!s&&c===o)){if(!i)return void(r.nodeValue=""+o);if(b(r,i),h(o))l(i,o,r,t);else if(/^(show|hide)$/.test(i))"hide"==i&&(o=!o),r.style.display=o?"":"none";else if("value"==i)r.value=o;else if(q(i,ee)&&i!=te)o&&_(r,i.slice(ee.length),o);else{if("selected"==i&&a&&/^(SELECT|OPTGROUP)$/.test(a.nodeName)&&o&&(a.value=r.value),e.bool&&(r[i]=o,!o))return;(0===o||o&&typeof o!==ie)&&_(r,i,o)}}}})}function p(e,t){var n,r=he(e.value,t);if(e.tag&&e.tagName==r)return void e.tag.update();if(e.tag){var i=e.tag.opts.riotTag,o=e.tag._parent.tags[i];A(o)?o.splice(o.indexOf(e.tag),1):delete e.tag._parent.tags[i]}e.impl=W[r],n={root:e.dom,parent:t,hasImpl:!0,tagName:r},e.tag=N(e.impl,n,e.dom.innerHTML,t),e.tagName=r,e.tag.mount(),e.tag.update()}function d(e,t){for(var n,r=e?e.length:0,i=0;r>i;i++)n=e[i],null!=n&&t(n,i)===!1&&i--;return e}function h(e){return typeof e===ae||!1}function g(e){if(e.outerHTML)return e.outerHTML;var t=H("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function m(e,t){if(typeof e.innerHTML!=oe)e.innerHTML=t;else{var n=(new DOMParser).parseFromString(t,"application/xml");e.appendChild(e.ownerDocument.importNode(n.documentElement,!0))}}function v(e){return~ce.indexOf(e)}function x(e){return e&&typeof e===ie}function y(e){return typeof e===oe||null===e||""===e}function b(e,t){e.removeAttribute(t)}function w(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function C(e,t){return e.getAttribute(t)}function _(e,t,n){e.setAttribute(t,n)}function S(e){return e.tagName&&W[C(e,ne)||C(e,te)||e.tagName.toLowerCase()]}function E(e,t,n){var r,i=e.parent;i&&(r=i.tags[t],A(r)?r.splice(n,0,r.splice(r.indexOf(e),1)[0]):Z(i.tags,t,e))}function N(e,t,n,r){var i=new c(e,t,n),o=t.tagName||R(t.root,!0),a=O(r);return i.parent=a,i._parent=r,Z(a.tags,o,i),a!==r&&Z(r.tags,o,i),t.root.innerHTML="",i}function O(e){for(var t=e;!t._hasImpl&&t.parent;)t=t.parent;return t}function T(e){var t,n,r=e.length;for(t=0;r>t;t++)n=e[t],n instanceof c?n.unmount(!0):n.unmount&&n.unmount()}function L(e,t,n,r){return Object.defineProperty(e,t,M({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function R(e,t){var n=S(e),r=!t&&C(e,"name"),i=r&&!he.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase();return i}function M(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var i in t)I(e,i)&&(e[i]=t[i]);return e}function j(e,t){return~e.indexOf(t)}function A(e){return Array.isArray(e)||e instanceof Array}function I(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return typeof e[t]===oe||n&&n.writable}function F(e){if(!(e instanceof c||e&&typeof e.trigger==ae))return e;var t={};for(var n in e)ue.test(n)||(t[n]=e[n]);return t}function $(e,t,n){if(e){var r,i=t(e,n);if(i===!1)return;for(e=e.firstChild;e;)r=e.nextSibling,$(e,t,i),e=r}}function k(e,t){for(var n,r=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g;n=r.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function P(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function H(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function B(e,t){return(t||document).querySelectorAll(e)}function z(e,t){return(t||document).querySelector(e)}function D(e){function t(){}return t.prototype=e,new t}function Z(e,t,n,r){var i=e[t],o=A(i);i&&i===n||(!i&&r?e[t]=[n]:i?(!o||o&&!j(i,n))&&(o?i.push(n):e[t]=[i,n]):e[t]=n)}function U(e,t,n,r){A(e[t])?(d(e[t],function(r,i){r===n&&e[t].splice(i,1)}),e[t].length?1!=e[t].length||r||(e[t]=e[t][0]):delete e[t]):delete e[t]}function q(e,t){return e.slice(0,t.length)===t}function G(e,t,n){var r=W[t],i=e._innerHTML=e._innerHTML||e.innerHTML;e.innerHTML="";var o={root:e,opts:n};return n&&n.parent&&(o.parent=n.parent),r&&e&&(r=new c(r,o,i)),r&&r.mount&&(r.mount(!0),j(X,r)||X.push(r)),r}function K(e,t,n){var r,i,o=document.createTextNode(""),a=document.createTextNode("");for(e._head=e.root.insertBefore(o,e.root.firstChild),e._tail=e.root.appendChild(a),i=e._head,e._virts=[];i;)r=i.nextSibling,n?t.insertBefore(i,n._head):t.appendChild(i),e._virts.push(i),i=r}function V(e,t,n){for(var r,i=e._head;i;)if(r=i.nextSibling,t.insertBefore(i,n._head),i=r,i==e._tail){t.insertBefore(i,n._head);break}}var Q={version:"v3.0.0-alpha.3",settings:{}},J=0,X=[],W={},Y="__global_mixin",ee="riot-",te="data-is",ne="data-is",re="string",ie="object",oe="undefined",ae="function",se=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ue=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,ce=["altGlyph","animate","animateColor","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","font","foreignObject","g","glyph","glyphRef","image","line","linearGradient","marker","mask","missing-glyph","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tref","tspan","use"],le=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,fe=0|(e&&e.document||{}).documentMode,pe=e&&!!e.InstallTrigger;Q.observable=function(e){function t(e,t){for(var n,r,i=e.split(" "),o=i.length,a=0;o>a;a++)n=i[a],r=n.indexOf("."),n&&t(~r?n.substring(0,r):n,a,~r?n.slice(r+1):null)}e=e||{};var n={},r=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(r,i){return"function"!=typeof i?e:(t(r,function(e,t,r){(n[e]=n[e]||[]).push(i),i.typed=t>0,i.ns=r}),e)},enumerable:!1,writable:!1,configurable:!1},off:{value:function(r,i){return"*"!=r||i?t(r,function(e,t,r){if(i||r)for(var o,a=n[e],s=0;o=a&&a[s];++s)(o==i||r&&o.ns==r)&&a.splice(s--,1);else delete n[e]}):n={},e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(i){for(var o,a=arguments.length-1,s=new Array(a),u=0;a>u;u++)s[u]=arguments[u+1];return t(i,function(t,i,a){o=r.call(n[t]||[],0);for(var u,c=0;u=o[c];++c)u.busy||(u.busy=1,a&&u.ns!=a||u.apply(e,u.typed?[t].concat(s):s),o[c]!==u&&c--,u.busy=0);n["*"]&&"*"!=t&&e.trigger.apply(e,["*",t].concat(s))}),e},enumerable:!1,writable:!1,configurable:!1}}),e};var de=function(e){function t(e){return e}function n(e,t){return t||(t=v),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===h)return g;var t=e.split(" ");if(2!==t.length||/[\x00-\x1F<>a-zA-Z0-9'",;\\]/.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(/(?=[[\]()*+?.^$|])/g,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:g[4],t),t[5]=n(e.length>3?/\\({|})/g:g[5],t),t[6]=n(g[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+p,c),t[8]=e,t}function i(e){return e instanceof RegExp?s(e):v[e]}function o(e){(e||(e=h))!==v[8]&&(v=r(e),s=e===h?t:n,v[9]=s(g[9])),m=e}function a(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:o,get:function(){return m},enumerable:!0}),u=e,o(t)}var s,u,c="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,f=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,p=f.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,d={"(":RegExp("([()])|"+p,c),"[":RegExp("([[\\]])|"+p,c),"{":RegExp("([{}])|"+p,c)},h="{ }",g=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+p,c),h,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],m=e,v=[];return i.split=function(e,t,n){function r(e){t||a?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function i(e,t,n){var r,i=d[t];for(i.lastIndex=n,n=1;(r=i.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:i.lastIndex}n||(n=v);var o,a,s,u,c=[],l=n[6];for(a=s=l.lastIndex=0;o=l.exec(e);){if(u=o.index,a){if(o[2]){l.lastIndex=i(e,o[2],l.lastIndex);continue}if(!o[3])continue}o[1]||(r(e.slice(s,u)),s=l.lastIndex,l=n[6+(a^=1)],l.lastIndex=s)}return e&&s<e.length&&r(e.slice(s)),c},i.hasExpr=function(e){return v[4].test(e)},i.loopKeys=function(e){var t=e.match(v[9]);return t?{key:t[1],pos:t[2],val:v[0]+t[3].trim()+v[1]}:{val:e.trim()}},i.array=function(e){return e?r(e):v},Object.defineProperty(i,"settings",{set:a,get:function(){return u}}),i.settings="undefined"!=typeof Q&&Q.settings||{},i.set=o,i.R_STRINGS=f,i.R_MLCOMMS=l,i.S_QBLOCKS=p,i}(),he=function(){function t(e,t){return e?(s[e]||(s[e]=r(e))).call(t,n):e}function n(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function r(e){var t=i(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function i(e){var t,n=[],r=de.split(e.replace(f,'"'),1);if(r.length>2||r[0]){var i,a,s=[];for(i=a=0;i<r.length;++i)t=r[i],t&&(t=1&i?o(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(s[a++]=t);t=2>a?s[0]:"["+s.join(",")+'].join("")'}else t=o(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function o(e,t,n){function r(t,n){var r,i=1,o=d[t];for(o.lastIndex=n.lastIndex;r=o.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:o.lastIndex}if(e=e.replace(l,function(e,t){return e.length>2&&!t?u+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,o=[],s=0;e&&(i=e.match(c))&&!i.index;){var f,p,h=/,|([[{(])|$/g;for(e=RegExp.rightContext,f=i[2]?n[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];p=(i=h.exec(e))[1];)r(p,h);p=e.slice(0,i.index),e=RegExp.rightContext,o[s++]=a(p,1,f)}e=s?s>1?"["+o.join(",")+'].join(" ").trim()':o[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(g,function(e,t,n,i,o){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+h+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!m.test(o.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var s={};t.haveRaw=de.hasRaw,t.hasExpr=de.hasExpr,t.loopKeys=de.loopKeys,t.errorHandler=null;var u="⁗",c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,l=RegExp(de.S_QBLOCKS,"g"),f=/\u2057/g,p=/\u2057(\d+)~/g,d={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof e?"global":"window")+").",g=/[,{][$\w]+:|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,m=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.parse=function(e){return e},t.version=de.version="v2.4.0",t}(),ge=function(e){function t(e,t,i){var o=e.tmpl,a=o&&o.match(/^\s*<([-\w]+)/),s=a&&a[1].toLowerCase(),u=H(l,v(s));return t||(t=""),e.attrs&&(i.attrs=r(e.attrs,t)),o=r(o,t),f.test(s)?u=n(u,o,s):m(u,o),u.stub=!0,u}function n(e,t,n){var r="o"===n[0],i=r?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"</"+i,i=e.firstChild,r)i.selectedIndex=-1;else{var o=c[n];o&&1===i.childNodes.length&&(i=z(o,i))}return i}function r(e,t){if(!i.test(e))return e;var n=1;return e=e.replace(s,function(e,r,i){var o=t.match(RegExp(u.replace("@",r),"i"));return n=0,(o?o[1]:i)||""}),(n||i.test(e))&&(t&&(t=t.replace(a,"").trim()),e=e.replace(o,function(e,n){return t||n||""})),e}var i=/<yield\b/i,o=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,a=/<yield\s+to=[^>]+>[\S\s]*?<\/yield\s*>\s*/gi,s=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,u="<yield\\s+to=['\"]@['\"]\\s*>([\\S\\s]*?)</yield\\s*>",c={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},l="div";e=e&&10>e;var f=e?se:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/;return t}(fe);a.prototype.update=function(){var e=he(this.expr,this.parentTag);e&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],u(this.current,this.parentTag,this.expressions,!0)):!e&&this.current&&(T(this.expressions),this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),e&&f(this.expressions,this.parentTag)},a.prototype.unmount=function(){T(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub},s.prototype.update=function(){var e=this.rawValue;if(this.hasExp&&(e=he(this.rawValue,this.parent)),this.firstRun||e!==this.value){var t=this.tag||this.dom;y(this.value)||U(this.customParent,this.value,t),y(e)?b(this.dom,this.attr):(Z(this.customParent,e,t),_(this.dom,this.attr,e)),this.value=e,this.firstRun=!1}},s.prototype.unmount=function(){var e=this.tag||this.dom;y(this.value)||U(this.customParent,this.value,e),delete this.dom,delete this.parent,delete this.customParent};var me=function(t){if(!e)return{add:function(){},inject:function(){}};var n=function(){var e=H("style");_(e,"type","text/css");var t=z("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),r=n.styleSheet,i="";return Object.defineProperty(t,"styleNode",{value:n,writable:!0}),{add:function(e){i+=e},inject:function(){i&&(r?r.cssText+=i:n.innerHTML+=i,i="")}}}(Q);(function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame;if(!t||/iP(ad|hone|od).*OS 6/.test(e.navigator.userAgent)){var n=0;t=function(e){var t=Date.now(),r=Math.max(16-(t-n),0);setTimeout(function(){e(n=t+r)},r)}}return t})(e||{});Q.util={brackets:de,tmpl:he},Q.mixin=function(){var e={},t=e[Y]={},n=0;return function(r,i,o){if(x(r))return void Q.mixin("__unnamed_"+n++,r,!0);var a=o?t:e;return i?void(a[r]=M(a[r]||{},i)):a[r]}}(),Q.tag=function(e,t,n,r,i){return h(r)&&(i=r,/^[\w\-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(h(n)?i=n:me.add(n)),e=e.toLowerCase(),W[e]={name:e,tmpl:t,attrs:r,fn:i},e},Q.tag2=function(e,t,n,r,i){return n&&me.add(n),W[e]={name:e,tmpl:t,attrs:r,fn:i},e},Q.mount=function(e,t,n){function r(e){var t="";return d(e,function(e){/[^-\w]/.test(e)||(e=e.trim().toLowerCase(),t+=",["+ne+'="'+e+'"],['+te+'="'+e+'"]')}),t}function i(){var e=Object.keys(W);return e+r(e)}function o(e){if(e.tagName){var r=C(e,ne)||C(e,te);t&&r!==t&&(r=t,_(e,ne,t),_(e,te,t));var i=G(e,r||e.tagName.toLowerCase(),n);i&&u.push(i)}else e.length&&d(e,o)}var a,s,u=[];if(me.inject(),x(t)&&(n=t,t=0),typeof e===re?("*"===e?e=s=i():e+=r(e.split(/, */)),a=e?B(e):[]):a=e,"*"===t){if(t=s||i(),a.tagName)a=B(t,a);else{var c=[];d(a,function(e){c.push(B(t,e))}),a=c}t=0}return o(a),u},Q.update=function(){return d(X,function(e){e.update()})},Q.unregister=function(e){delete W[e]},Q.vdom=X,Q.Tag=c;var ve=function(){function t(t){var n=e[t];if(n)return n;throw new Error(t+" parser not found.")}function n(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var r={html:{jade:function(e,r,i){return r=n({pretty:!0,filename:i,doctype:"html"},r),t("jade").render(e,r)}},css:{less:function(e,r,i,o){var a;return i=n({sync:!0,syncImport:!0,filename:o},i),t("less").render(r,i,function(e,t){if(e)throw e;a=t.css}),a}},js:{es6:function(e,r){return r=n({blacklist:["useStrict","strict","react"],sourceMaps:!1,comments:!1},r),t("babel").transform(e,r).code},babel:function(e,r,i){return t("babel").transform(e,n({filename:i},r)).code},coffee:function(e,r){return t("CoffeeScript").compile(e,n({bare:!0},r))},livescript:function(e,r){return t("livescript").compile(e,n({bare:!0,header:!1},r))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}}};return r.js.javascript=r.js.none,r.js.coffeescript=r.js.coffee,r}();Q.parsers=ve;var xe=function(){function e(e){var t,n=N;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function t(e,t){var n,r,i,o=[];for(E.lastIndex=0,e=e.replace(/\s+/g," ");n=E.exec(e);){var a=n[1].toLowerCase(),s=n[2];s?(s[0]!==P&&(s=P+(s[0]===H?s.slice(1,-1):s)+P),"type"===a&&j.test(s)?r=s:(I.test(s)&&("value"===a?i=1:~L.indexOf(a)&&(a="riot-"+a)),o.push(a+"="+s))):o.push(a)}return r&&(i&&(r=P+t._bp[0]+H+r.slice(1,-1)+H+t._bp[1]+P),o.push("type="+r)),o.join(" ")}function n(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,o=t.expr&&(t.parser||t.type)?s:0,a=de.split(e,0,r),u=1;u<a.length;u+=2)i=a[u],"^"===i[0]?i=i.slice(1):o&&(i=o(i,t).trim(),";"===i.slice(-1)&&(i=i.slice(0,-1))),a[u]=$+(n.push(i)-1)+r[1];e=a.join("")}return e}function r(e,t){return t.length&&(e=e.replace(F,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,k)})),e}function i(e,i,o){if(e=n(e,i,o).replace(O,function(e,n,r,i){return n=n.toLowerCase(),i=i&&!R.test(n)?"></"+n:"",r&&(n+=" "+t(r,o)),"<"+n+i+">"}),!i.whitespace){var a=[];/<pre[\s>]/.test(e)&&(e=e.replace(M,function(e){return a.push(e),""})),e=e.trim().replace(/\s+/g," "),a.length&&(e=e.replace(/\u0002/g,function(){return a.shift()}))}return i.compact&&(e=e.replace(T,"><$1")),r(e,o).replace(A,"")}function o(t,n,r){return Array.isArray(n)?(r=n,n={}):(r||(r=[]),n||(n={})),r._bp=de.array(n.brackets),i(e(t),n,r)}function a(e){function t(e,t,n){for(t.lastIndex=0;n=t.exec(e);)"/"!==n[0][0]||n[1]||n[2]||(e=u.leftContext+" "+u.rightContext,t.lastIndex=n[3]+1);return e}function n(e,t){var n,r=1;for(t.lastIndex=0;r&&(n=t.exec(e));)"{"===n[0]?++r:"}"===n[0]&&--r;return r?e.length:t.lastIndex}var r,i,o,a,s=[],u=RegExp;for(~e.indexOf("/")&&(e=t(e,D));r=e.match(B);)s.push(u.leftContext),e=u.rightContext,o=n(e,z),a=r[1],i=!/^(?:if|while|for|switch|catch|function)$/.test(a),a=i?r[0].replace(a,"this."+a+" = function"):r[0],s.push(a,e.slice(0,o)),e=e.slice(o),i&&!/^\s*.\s*bind\b/.test(e)&&s.push(".bind(this)");return s.length?s.join("")+e:e}function s(e,t,n,r,i){if(!/\S/.test(e))return"";n||(n=t.type);var o=t.parser||(n?ve.js[n]:a);if(!o)throw new Error('JS parser not found: "'+n+'"');return o(e,r,i).replace(/\r\n?/g,"\n").replace(A,"")}function u(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),s(e,t||{},n,r.parserOptions,r.url)}function c(e,t){var n=":scope";return t.replace(Z,function(t,r,i){return i?(i=i.replace(/[^,]+/g,function(t){var r=t.trim();return r&&"from"!==r&&"to"!==r&&"%"!==r.slice(-1)?r=r.indexOf(n)<0?e+" "+r+',[riot-tag="'+e+'"] '+r+',[data-is="'+e+'"] '+r:r.replace(n,e)+","+r.replace(n,'[riot-tag="'+e+'"]')+","+r.replace(n,'[data-is="'+e+'"]'):t}),r?r+" "+i:i):t})}function l(e,t,n,r){var i=(r||(r={})).scoped;if(n)if("scoped-css"===n)i=!0;else if(ve.css[n])e=ve.css[n](t,e,r.parserOpts||{},r.url);else if("css"!==n)throw new Error('CSS parser not found: "'+n+'"');if(e=e.replace(de.R_MLCOMMS,"").replace(/\s+/g," ").trim(),i){if(!t)throw new Error("Can not parse scoped CSS without a tagName");e=c(t,e)}return e}function f(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),l(e,n.tagName,t,n)}function p(e,t){return e?(e=H+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+H,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function d(e,t,n,r,i,o){var a=o.debug?",\n  ":", ",s="});";return i&&"\n"!==i.slice(-1)&&(s="\n"+s),"riot.tag2('"+e+H+a+p(t,1)+a+p(n)+a+p(r)+", function(opts) {\n"+i+s}function h(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(G))return n+=t.index+t[0].length,[e.slice(0,n),e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function g(e){if(e){var t=e.match(U);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function m(e,t){if(e){var n=e.match(RegExp("\\s"+t+q,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function v(e){return e.replace("&amp;",/&/g).replace("&lt;",/</g).replace("&gt;",/>/g).replace("&quot;",/"/g).replace("&#039;",/'/g)}function x(e){var t=v(m(e,"options"));return t?JSON.parse(t):null}function y(e,t,n,r){var i=g(n),o=m(n,"src");return o?!1:s(e,t,i,x(n),r)}function b(e,t,n,r,i){var o={parserOpts:x(n),scoped:n&&/\sscoped(\s|=|$)/i.test(n),url:r};return l(e,i,g(n)||t.style,o)}function w(e,t,n,r){var i=ve.html[n];if(!i)throw new Error('Template parser not found: "'+n+'"');return i(e,r,t)}function C(o,a,u){var c,l=[];a||(a={}),c=a.exclude?function(e){return a.exclude.indexOf(e)<0}:function(){return 1},u||(u="");var f=de.array(a.brackets);return a.template&&(o=w(o,u,a.template,a.templateOptions)),o=e(o).replace(K,function(e,o,p,g,m,v){var x="",w="",C="",_=[];if(_._bp=f,p=p.toLowerCase(),g=g&&c("attribs")?r(t(n(g,a,_),_),_):"",(m||(m=v))&&/\S/.test(m))if(v)c("html")&&(C=i(v,a,_));else{m=m.replace(RegExp("^"+o,"gm"),""),m=m.replace(J,function(e,t,n){return c("css")&&(w+=(w?" ":"")+b(n,a,t,u,p)),""}),m=m.replace(V,function(e,t,n){if(c("js")){var r=y(n,a,t,u);r&&(x+=(x?"\n":"")+r)}return""});var S=h(m.replace(A,""));c("html")&&(C=i(S[0],a,_)),c("js")&&(m=s(S[1],a,null,null,u),m&&(x+=(x?"\n":"")+m))}return x=/\S/.test(x)?x.replace(/\n{3,}/g,"\n\n"):"",a.entities?(l.push({tagName:p,html:C,css:w,attribs:g,js:x}),""):d(p,C,w,g,x,a)}),a.entities?l:o}var _=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,S=de.R_STRINGS.source,E=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,N=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+_,"g"),O=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,T=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,L=["style","src","d"],R=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,M=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,j=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,A=/[ \t]+$/gm,I=/\x01#\d/,F=/\x01#(\d+)/g,$="#",k="⁗",P='"',H="'",B=/^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m,z=RegExp("[{}]|"+de.S_QBLOCKS,"g"),D=RegExp(de.R_MLCOMMS.source+"|//[^\r\n]*|"+de.S_QBLOCKS,"g"),Z=RegExp("([{}]|^)[ ;]*([^@ ;{}][^{}]*)(?={)|"+_,"g"),U=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,q="\\s*=\\s*("+S+"|{[^}]+}|\\S+)",G=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,K=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",S),"gim"),V=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,J=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi;return Q.util.compiler={compile:C,html:o,css:f,js:u,version:"v3.0.0-alpha.1"},C}();Q.compile=function(){function e(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length)&&t(r.responseText,n,e)},r.open("GET",e,!0),r.send("")}function n(e,t){if(typeof e===re){var n=H("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function r(t,r){function a(){i.trigger("ready"),o=!0,t&&t()}function s(e,t,r){var i=xe(e,t,r);n(i,r),--c||a()}var u=B('script[type="riot/tag"]'),c=u.length;if(c)for(var l=0;l<u.length;++l){var f=u[l],p=M({template:C(f,"template")},r),d=C(f,"src");d?e(d,s,p):s(f.innerHTML,p)}else a()}var i,o;return function(a,s,u){if(typeof a===re){if(x(s)&&(u=s,s=!1),/^\s*</m.test(a)){var c=xe(a,u);return s!==!0&&n(c),h(s)&&s(c,a,u),c}e(a,function(e,t,r){var i=xe(e,t,r);n(i,r),s&&s(i,e,t)})}else{if(h(a)?(u=s,s=a):(u=a,s=t),o)return s&&s();i?s&&i.on("ready",s):(i=Q.observable(),r(s,u))}}}();var ye=Q.mount;Q.mount=function(e,t,n){var r;return Q.compile(function(){r=ye(e,t,n)}),r},typeof exports===ie?module.exports=Q:typeof define===ae&&typeof define.amd!==oe?define(function(){return Q}):e.riot=Q}("undefined"!=typeof window?window:void 0);
<page1-component>
  <!-- Page 1 contents as a Riot Component -->
  <ons-toolbar>
    <div class="left">
      <ons-back-button>Back</ons-back-button>
    </div>
    <div class="center">Page 1</div>
    <div class="right"></div>
  </ons-toolbar>
  <br/>
  <div>
    {opts.contents}
  </div>
  <div style="text-align:center">
    <ons-button onclick="{goToPage2}">Next</ons-button>
  </div>
  <script>
    goToPage2() {
      document.getElementById('navigator').pushPage('page2.html', { animation: 'lift', animationOptions: { delay: 0.3 } })
    }
  </script>
</page1-component>
<page2-component>
  <!-- Page 2 contents as a Riot Component -->
  <ons-toolbar>
    <div class="left">
      <ons-back-button>Cancel</ons-back-button>
    </div>
    <div class="center">{opts.title}</div>
    <div class="right"></div>
  </ons-toolbar>
  {opts.contents}
  <script>
  </script>
</page2-component>